{"id":3114,"date":"2023-12-14T10:58:05","date_gmt":"2023-12-14T18:58:05","guid":{"rendered":"http:\/\/www.taosdata.com.cn:88\/blog\/?p=3114"},"modified":"2025-03-30T23:25:32","modified_gmt":"2025-03-31T06:25:32","slug":"test-tdengine-with-taosbenchmark","status":"publish","type":"post","link":"https:\/\/tdengine.com\/test-tdengine-with-taosbenchmark\/","title":{"rendered":"Test TDengine with taosBenchmark"},"content":{"rendered":"\n<p>Some <a href=\"https:\/\/tdengine.com\/what-is-a-time-series-database\/\">time-series databases<\/a> may perform well with smaller datasets but begin to experience performance deterioration as your data increases in scale or with <a href=\"https:\/\/tdengine.com\/high-cardinality\/\">high cardinality<\/a>. In other cases, such as a proof of concept, it may be inconvenient or impossible to run tests on your own data to obtain realistic results.<\/p>\n\n\n\n<p>To assist users in testing the performance of TDengine, the taosBenchmark utility is included in all client and server packages. This utility generates a sample dataset that simulates a smart meter monitoring scenario. You can use this dataset to test the features of TDengine and run queries similar to those that you would use in production.<\/p>\n\n\n\n<h2 class=\"gb-headline gb-headline-d703f343 gb-headline-text\">Install taosBenchmark<\/h2>\n\n\n\n<p>The taosBenchmark utility is installed automatically when you deploy a TDengine OSS or TDengine Enterprise client or server. If you are using TDengine Cloud only, you can download the TDengine OSS client package and install it on your local machine to use taosBenchmark with your cloud instances. To download TDengine OSS, see <a href=\"https:\/\/docs.tdengine.com\/get-started\/\">Get Started<\/a>.<\/p>\n\n\n\n<h2 class=\"gb-headline gb-headline-5d28735b gb-headline-text\">Generate a Sample Dataset<\/h2>\n\n\n\n<p>To generate a sample dataset, simply run <code class=\"\" data-line=\"\">taosBenchmark<\/code> from a terminal, using the <code class=\"\" data-line=\"\">-h<\/code> command-line parameter if you are connecting to a remote host. Note that taosBenchmark will delete and re-create the <code class=\"\" data-line=\"\">test<\/code> database on your TDengine deployment, so ensure that no important data is located in this database before generating your sample dataset. To connect taosBenchmark to a TDengine Cloud instance, set the <code class=\"\" data-line=\"\">TDENGINE_CLOUD_DSN<\/code> environment variable and create the database <a href=\"https:\/\/docs.tdengine.com\/cloud\/tools\/taosbenchmark\/\">as described in the documentation<\/a>.<\/p>\n\n\n\n<p>By default, taosBenchmark creates a sample dataset as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>taosBenchmark creates the <code class=\"\" data-line=\"\">test<\/code> database, the <code class=\"\" data-line=\"\">meters<\/code> supertable, and 10,000 tables named <code class=\"\" data-line=\"\">d0<\/code> through <code class=\"\" data-line=\"\">d9999<\/code>.<\/li>\n\n\n\n<li>The <code class=\"\" data-line=\"\">meters<\/code> supertable contains the following columns:\n<ul class=\"wp-block-list\">\n<li>timestamp column <code class=\"\" data-line=\"\">ts<\/code> (TIMESTAMP)<\/li>\n\n\n\n<li>metric columns <code class=\"\" data-line=\"\">current<\/code> (FLOAT), <code class=\"\" data-line=\"\">voltage<\/code> (INT), and <code class=\"\" data-line=\"\">phase<\/code> (FLOAT)<\/li>\n\n\n\n<li>tag columns <code class=\"\" data-line=\"\">groupid<\/code> (INT) and <code class=\"\" data-line=\"\">location<\/code> (VARCHAR)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Each table from d0 to d9999 is populated with random data in each column.<\/li>\n<\/ul>\n\n\n\n<p>After the dataset has been generated, you can run queries on the sample data to test the performance of TDengine and verify whether it would be suitable for your use case. In addition, taosBenchmark is highly configurable, and you can control a number of settings with command-line parameters &#8212; for example, generating out-of-order data, other metric or tag columns, and more or fewer tables. For detailed information about configuring taosBenchmark, <a href=\"https:\/\/docs.tdengine.com\/cloud\/tools\/taosbenchmark\/\">see the documentation<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>taosBenchmark generates a sample industrial dataset that you can use to test the performance and features of TDengine.<\/p>\n","protected":false},"author":48,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[21],"tags":[],"ppma_author":[100],"class_list":["post-3114","post","type-post","status-publish","format-standard","hentry","category-engineering"],"authors":[{"term_id":100,"user_id":48,"is_guest":0,"slug":"sangshuduo","display_name":"Shuduo Sang","avatar_url":{"url":"https:\/\/tdengine.com\/wp-content\/uploads\/29.04-28-sdsang.jpg","url2x":"https:\/\/tdengine.com\/wp-content\/uploads\/29.04-28-sdsang.jpg"},"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/posts\/3114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/users\/48"}],"replies":[{"embeddable":true,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/comments?post=3114"}],"version-history":[{"count":12,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/posts\/3114\/revisions"}],"predecessor-version":[{"id":24707,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/posts\/3114\/revisions\/24707"}],"wp:attachment":[{"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/media?parent=3114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/categories?post=3114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/tags?post=3114"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/tdengine.com\/wp-json\/wp\/v2\/ppma_author?post=3114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}