{"id":751,"date":"2017-03-06T13:59:32","date_gmt":"2017-03-06T20:59:32","guid":{"rendered":"http:\/\/www.jacksonleung.com\/blog\/?p=751"},"modified":"2017-03-06T13:59:32","modified_gmt":"2017-03-06T20:59:32","slug":"useful-command-to-test-speed-of-a-container-vm-or-system","status":"publish","type":"post","link":"http:\/\/www.jacksonleung.com\/blog\/useful-command-to-test-speed-of-a-container-vm-or-system\/","title":{"rendered":"Useful command to test speed of a container, vm, or system"},"content":{"rendered":"<p>I&#8217;ll be breaking down the following command part by part:<\/p>\n<p>time dd if=\/dev\/zero of=test.dat bs=1024 count=100000<\/p>\n<p>&nbsp;<\/p>\n<p>What does time do? It runs a process and then captures how long it took to execute.<\/p>\n<p>What about DD? Well, it&#8217;s a command that copies data from a standard input to a standard output.<\/p>\n<p>What about the params if, of, bs, and count?<\/p>\n<p>&#8220;if&#8221;: It&#8217;s decently obvious, but &#8220;if&#8221; specifies the input, in this case we&#8217;re taking input from a special file\u00a0that provides as many null characters as there are read from it; an infinity file of sorts.<\/p>\n<p>&#8220;of&#8221;: It&#8217;s the output file.<\/p>\n<p>&#8220;bs&#8221;: Byte size<\/p>\n<p>&#8220;count&#8221;: the number of blocks<\/p>\n<p>So all together, the command writes 100,000 blocks of 1,024 bytes of binary zeroes into the file of &#8220;test.dat&#8221;. In other words, generates a 100 MB file. This command allows you to generate a 100 MB file and test the \u00a0IO performance of a system. As we move towards a world we&#8217;re optimizing the crap out of everything, this is a very useful command to know.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ll be breaking down the following command part by part: time dd if=\/dev\/zero of=test.dat bs=1024 count=100000 &nbsp; What does time do? It runs a process and then captures how long it took to execute. What about DD? Well, it&#8217;s a command that copies data from a standard input to a standard output. What about the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.jacksonleung.com\/blog\/useful-command-to-test-speed-of-a-container-vm-or-system\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Useful command to test speed of a container, vm, or system&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[],"class_list":["post-751","post","type-post","status-publish","format-standard","hentry","category-programming","category-work","entry"],"_links":{"self":[{"href":"http:\/\/www.jacksonleung.com\/blog\/wp-json\/wp\/v2\/posts\/751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.jacksonleung.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jacksonleung.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jacksonleung.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jacksonleung.com\/blog\/wp-json\/wp\/v2\/comments?post=751"}],"version-history":[{"count":1,"href":"http:\/\/www.jacksonleung.com\/blog\/wp-json\/wp\/v2\/posts\/751\/revisions"}],"predecessor-version":[{"id":752,"href":"http:\/\/www.jacksonleung.com\/blog\/wp-json\/wp\/v2\/posts\/751\/revisions\/752"}],"wp:attachment":[{"href":"http:\/\/www.jacksonleung.com\/blog\/wp-json\/wp\/v2\/media?parent=751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jacksonleung.com\/blog\/wp-json\/wp\/v2\/categories?post=751"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jacksonleung.com\/blog\/wp-json\/wp\/v2\/tags?post=751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}