<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>Joshi's Tech Blog</title><description>Notes to thy self.</description><managingEditor>noreply@blogger.com (Rohit Joshi)</managingEditor><pubDate>Fri, 5 Jun 2026 10:43:03 -0400</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">30</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>http://joshitech.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle>Notes to thy self.</itunes:subtitle><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><title>LightQ Performance:  transient 1M+ msg/sec, durable 300K+ msg/sec with latency in micro seconds</title><link>http://joshitech.blogspot.com/2015/04/lightq-performance-transient-1m-msgsec.html</link><category>C++</category><category>mq</category><category>performance</category><category>queue</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Thu, 9 Apr 2015 19:24:00 -0400</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-1173098263240380449</guid><description>&lt;a href="https://github.com/LightIO/LightQ" style="background-color: #f7f7f7; color: #224466; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; text-decoration: none;"&gt;LightQ&lt;/a&gt;&lt;span style="background-color: #f7f7f7; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px;"&gt;&amp;nbsp;is a high performance, brokered messaging queue which supports transient (1M+ msg/sec) and durable (300K+ msg/sec) queues. Durable queues are similar to&amp;nbsp;&lt;/span&gt;&lt;b style="background-color: #f7f7f7; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px;"&gt;Kafka&lt;/b&gt;&lt;span style="background-color: #f7f7f7; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px;"&gt;&amp;nbsp;where data are written to the file and consumers consume from the file.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: #f7f7f7; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px;"&gt;See the &lt;/span&gt;&lt;a href="http://joshitech.blogspot.com/2015/03/lightq-high-performance-brokered.html" style="font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px;"&gt;blog post&lt;/a&gt;&lt;span style="background-color: #f7f7f7; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px;"&gt; for more details. &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: #f7f7f7; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px;"&gt;For source code, &lt;a href="https://github.com/LightIO/LightQ"&gt;LightIO/LightQ&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
End to end average latency &amp;nbsp;is calculated as below.&lt;/div&gt;
&lt;ul class="task-list" style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;Producer sends first message with current timestamp&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;Consumer stores this time stamp as a start time&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;Consumer stores current time stamp when last message is received.&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;Latency = (Consumers's received last message timestamp - Producer's sent first message timestamp)/total messages received&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Laptop hardware:&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;MacBook Pro (Retina, 15-inch, Late 2013)
Processor 2.3 GHz Intel Core i7
Memory 16 GB 1600 MHz DDR3
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Broker Type: Transient&lt;/div&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ/blob/master/LatencyTests.md#create-a-transient-topic-test-num-partition-1" id="user-content-create-a-transient-topic-test-num-partition-1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;Create a transient topic (test), num partition 1&lt;/h2&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-topic -n 1
topic test created successfully
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ/blob/master/LatencyTests.md#100-bytes-10m-messages" id="user-content-100-bytes-10m-messages" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;100 bytes, 10M messages&lt;/h2&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Producer: ( 1250000 msg/sec, Bandwidth: 119.2093 MB)&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-producer -m 10000000  -n 1 -s 100
Topic[test_1], Producer: first message sent timestamp [6378502l]
Topic[test_1], Producer: last message sent timestamp [6386647l]
Topic[test_1], Total message sent [10000000] in [8.00] sec
Topic[test_1], Average messages sent per second [1250000.00]
Topic[test_1], Average bandwidth sent per second [119.2093] MB
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Consumer: ( 1250000 msg/sec, Latency: 813 ns, Bandwidth: 119.2093 MB)&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-consumer -m 10000000  -n 1
Topic[test_1], First message:  producer start time [6378502], consumer start time [6378520]
Topic[test_1], Total message received [10000000] in [8.00]sec
Topic[test_1], &lt;b&gt;Average messages received per second [1250000.00]&lt;/b&gt;
Topic[test_1], Total bytes received [999999907], average bandwidth received per second [119.2093]MB
Topic[test_1], Last Message: consumer endtime [6386632]
Topic[test_1], Consumer first message latency [18] ms
Topic[test_1], Consumer last message received -   producer first message sent timestamp [8130]
Topic[test_1], &lt;b&gt;Average latency [813.00] nano sec&lt;/b&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ/blob/master/LatencyTests.md#256-bytes-10m-messages" id="user-content-256-bytes-10m-messages" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;256 bytes, 10M messages&lt;/h2&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Producer: ( 1250000 msg/sec, Bandwidth: 305.1758 MB)&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-producer -m 10000000  -n 1 -s 256
Topic[test_1], Producer: first message sent timestamp [5826133l]
Topic[test_1], Producer: last message sent timestamp [5834823l]
Topic[test_1], Total message sent [10000000] in [8.00] sec
Topic[test_1], Average messages sent per second [1250000.00]
Topic[test_1], Average bandwidth sent per second [305.1758] MB
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Consumer: ( 1250000 msg/sec, Latency: 868 ns, Bandwidth: 305.1758 MB)&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-consumer -m 10000000  -n 1
Topic[test_1], First message:  producer start time [5826133], consumer start time [5826155]
Topic[test_1], Total message received [10000000] in [8.00]sec
Topic[test_1], &lt;b&gt;Average messages received per second [1250000.00]&lt;/b&gt;
Topic[test_1], Total bytes received [2559999751], average bandwidth received per second [305.1758]MB
Topic[test_1], Last Message: consumer endtime [5834813]
Topic[test_1], Consumer first message latency [22] ms
Topic[test_1], Consumer last message received - producer first message sent timestamp [8680]
Topic[test_1], &lt;b&gt;Average latency [868.00] nano sec&lt;/b&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ/blob/master/LatencyTests.md#512-bytes-10m-messages" id="user-content-512-bytes-10m-messages" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;512 bytes, 10M messages&lt;/h2&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Producer: ( 1000000 msg/sec, Bandwidth: [488.2812 MB )&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-producer -m 10000000  -n 1 -s 512
Topic[test_1], Producer: first message sent timestamp [6231211l]
Topic[test_1], Producer: last message sent timestamp [6241288l]
Topic[test_1], Total message sent [10000000] in [10.00] sec
Topic[test_1], Average messages sent per second [1000000.00]
Topic[test_1], Average bandwidth sent per second [488.2812] MB
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Consumer: ( 1000000 msg/sec, Latency: 1006 ns, Bandwidth: [488.2812 MB )&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-consumer -m 10000000  -n 1
Topic[test_1], First message:  producer start time [6231211], consumer start time [6231235]
Topic[test_1], Total message received [10000000] in [10.00]sec
Topic[test_1], &lt;b&gt;Average messages received per second [1000000.00]&lt;/b&gt;
Topic[test_1], Total bytes received [5119999495], average bandwidth received per second [488.2812]MB
Topic[test_1], Last Message: consumer endtime [6241279]
Topic[test_1], Consumer first message latency [24] ms
Topic[test_1], Consumer last message received -   producer first message sent timestamp [10068]
Topic[test_1], &lt;b&gt;Average latency [1006.00] nano sec&lt;/b&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ/blob/master/LatencyTests.md#1024-bytes-10m-messages" id="user-content-1024-bytes-10m-messages" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;1024 bytes, 10M messages&lt;/h2&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Producer: ( 526315 msg/sec, Bandwidth: 513.9802 MB)&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-producer -m 10000000  -n 1 -s 1024
Topic[test_1], Producer: first message sent timestamp [6029718l]
Topic[test_1], Producer: last message sent timestamp [6049370l]
Topic[test_1], Total message sent [10000000] in [19.00] sec
Topic[test_1], Average messages sent per second [526315.81]
Topic[test_1], Average bandwidth sent per second [513.9802] MB
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Consumer: ( 526315 msg/sec, Latency: 1964 ns, Bandwidth: 513.9802 MB)&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-consumer -m 10000000  -n 1
Topic[test_1], First message:  producer start time [6029718], consumer start time [6029727]
Topic[test_1], Total message received [10000000] in [19.00]sec
Topic[test_1], &lt;b&gt;Average messages received per second [526315.81]&lt;/b&gt;
Topic[test_1], Total bytes received [10239998983], average bandwidth received per second [513.9802]MB
Topic[test_1], Last Message: consumer endtime [6049366]
Topic[test_1], Consumer first message latency [9] ms
Topic[test_1], Consumer last message received - producer first message sent timestamp [19648]
Topic[test_1], &lt;b&gt;Average latency [1964.00] nano sec&lt;/b&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Broker Type: Durable (file)&lt;/div&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ/blob/master/LatencyTests.md#create-a-durable-topic-test-num-partition-1" id="user-content-create-a-durable-topic-test-num-partition-1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;Create a durable topic (test), num partition 1&lt;/h2&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-topic -n 1 -s file
topic test created successfully
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ/blob/master/LatencyTests.md#100-bytes-10m-messages-1" id="user-content-100-bytes-10m-messages-1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;100 bytes, 10M messages&lt;/h2&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Producer: ( 400000 msg/sec, Bandwidth: 38.1470 MB)&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-producer -m 10000000  -s 100 -n 1
Topic[test_1], Producer: first message sent timestamp [4906704l]
Topic[test_1], Producer: last message sent timestamp [4932029l]
Topic[test_1], Total message sent [10000000] in [25.00] sec
Topic[test_1], Average messages sent per second [400000.00]
Topic[test_1], Average bandwidth sent per second [38.1470] MB
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Consumer: ( 400000 msg/sec, Latency: 2535 ns, Bandwidth: 38.1470 MB)&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-consumer -c socket -m 10000000 -n 1
Topic[test_1], First message:  producer start time [4906704], consumer start time [4906718]
Topic[test_1], Total message received [10000000] in [25.00]sec
Topic[test_1], &lt;b&gt;Average messages received per second [400000.00]&lt;/b&gt;
Topic[test_1], Total bytes received [999999907], average bandwidth received per second [38.1470]MB
Topic[test_1], Last Message: consumer endtime [4932061]
Topic[test_1], Consumer first message latency [14] ms
Topic[test_1], Consumer last message received -   producer first message sent timestamp [25357]
Topic[test_1], &lt;b&gt;Average latency [2535.00] nano sec&lt;/b&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ/blob/master/LatencyTests.md#256-bytes-10m-messages-1" id="user-content-256-bytes-10m-messages-1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;256 bytes, 10M messages&lt;/h2&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Producer: ( 370370 msg/sec, Bandwidth: 90.4224 MB)&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-producer -m 10000000  -s 256 -n 1
Topic[test_1], Producer: first message sent timestamp [4783156l]
Topic[test_1], Producer: last message sent timestamp [4810966l]
Topic[test_1], Total message sent [10000000] in [27.00] sec
Topic[test_1], Average messages sent per second [370370.38]
Topic[test_1], Average bandwidth sent per second [90.4224] MB
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Consumer: ( 370370 msg/sec, Latency: 2783 ns, Bandwidth: 90.4224 MB)&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-consumer -c socket -m 10000000 -n 1
Topic[test_1], First message:  producer start time [4783156], consumer start time [4783163]
Topic[test_1], Total message received [10000000] in [27.00]sec
Topic[test_1], &lt;b&gt;Average messages received per second [370370.38]&lt;/b&gt;
Topic[test_1], Total bytes received [2559999751], average bandwidth received per second [90.4224]MB
Topic[test_1], Last Message: consumer endtime [4810993]
Topic[test_1], Consumer first message latency [7] ms
Topic[test_1], Consumer last message received -   producer first message sent timestamp [27837]
Topic[test_1], &lt;b&gt;Average latency [2783.00] nano sec&lt;/b&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ/blob/master/LatencyTests.md#512-bytes-10m-messages-1" id="user-content-512-bytes-10m-messages-1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;512 bytes, 10M messages&lt;/h2&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Producer: ( 322580 msg/sec, Bandwidth: 157.5101 MB)&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-producer -m 10000000  -s 512 -n 1
Topic[test_1], Producer: first message sent timestamp [4563339l]
Topic[test_1], Producer: last message sent timestamp [4595009l]
Topic[test_1], Total message sent [10000000] in [31.00] sec
Topic[test_1], Average messages sent per second [322580.66]
Topic[test_1], Average bandwidth sent per second [157.5101] MB
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Consumer: ( 322580 msg/sec, Latency: 3168 ns, Bandwidth: 157.5101 MB)&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-consumer -c socket -m 10000000 -n 1
Topic[test_1], First message:  producer start time [4563339], consumer start time [4563361]
Topic[test_1], Total message received [10000000] in [31.00]sec
Topic[test_1], &lt;b&gt;Average messages received per second [322580.66]&lt;/b&gt;
Topic[test_1], Total bytes received [5119999495], average bandwidth received per second [157.5101]MB
Topic[test_1], Last Message: consumer endtime [4595027]
Topic[test_1], Consumer first message latency [22] ms
Topic[test_1], Consumer last message received -   producer first message sent timestamp [31688]
Topic[test_1], &lt;b&gt;Average latency [3168.00] nano sec&lt;/b&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ/blob/master/LatencyTests.md#1024-bytes-10m-messages-1" id="user-content-1024-bytes-10m-messages-1" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;1024 bytes, 10M messages&lt;/h2&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Producer: ( 270270 msg/sec, Bandwidth: 263.9358 MB)&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-producer -m 10000000  -s 1024 -n 1
Topic[test_1], Producer: first message sent timestamp [4319543l]
Topic[test_1], Producer: last message sent timestamp [4357308l]
Topic[test_1], Total message sent [10000000] in [37.00] sec
Topic[test_1], Average messages sent per second [270270.28]
Topic[test_1], Average bandwidth sent per second [263.9358] MB
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Consumer: ( 270270 msg/sec, Latency: 3779 ns, Bandwidth: 263.9358 MB)&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./lightq-consumer -c socket -m 10000000 -n 1
Topic[test_1], First message:  producer start time [4319543], consumer start time [4319564]
Topic[test_1], Total message received [10000000] in [37.00]sec
Topic[test_1], &lt;b&gt;Average messages received per second [270270.28]&lt;/b&gt;
Topic[test_1], Total bytes received [10239998983], average bandwidth received per second [263.9358]MB
Topic[test_1], Last Message: consumer endtime [4357340]
Topic[test_1], Consumer first message latency [21] ms
Topic[test_1], Consumer last message received -   producer first message sent timestamp [37797]
Topic[test_1], &lt;b&gt;Average latency [3779.00] nano sec&lt;/b&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;span style="background-color: #f7f7f7; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-color: #f7f7f7; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px;"&gt;&lt;br /&gt;&lt;/span&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">39</thr:total></item><item><title>LightQ : High Performance, brokered messaging queue (transient 1M msg/sec, durable 300K msg/sec)</title><link>http://joshitech.blogspot.com/2015/03/lightq-high-performance-brokered.html</link><category>C++</category><category>mq</category><category>performance</category><category>queue</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Sun, 29 Mar 2015 16:52:00 -0400</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-3452016877966115640</guid><description>&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;&lt;div style="box-sizing: border-box; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px; white-space: normal;"&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
&lt;a href="https://github.com/LightIO/LightQ"&gt;LightQ&lt;/a&gt; is a high performance, brokered messaging queue which supports transient (1M msg/sec) and durable (~300K msg/sec) queues. Durable queues are similar to&amp;nbsp;&lt;b style="box-sizing: border-box;"&gt;Kafka&lt;/b&gt;&amp;nbsp;where data are written to the file and consumers consume from the file.&lt;/div&gt;
&lt;h3 style="box-sizing: border-box; font-size: 1.5em; line-height: 1.43; margin-bottom: 16px; margin-top: 1em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#features" id="user-content-features" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1.2; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;Features:&lt;/h3&gt;
&lt;ol class="task-list" style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;Transient and durable queue (similar to&amp;nbsp;&lt;b style="box-sizing: border-box;"&gt;Kafka&lt;/b&gt;&amp;nbsp;where producer writes to the file, consumer reads from the file)&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;Authentication per topic (userid/password validation)&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;Header only project (embed within your project)&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;Consumer in load balancing mode(pipeline): One of the consumer gets a message mostly in round robin)&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;Consumer as Subscribers (Each consumer gets a copy of a message)&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;Both subscriber and pipelining mode are supported for a single topic&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;Multi Producers/Consumers for a single topic&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;Unlimited* topics per broker&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;JSON protocol to create topic and join topic (at runtime)&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;C++11 support/require&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;Logging support&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;Dynamic port allocation for topic and consumer/producer bind uri&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;Apache License&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;Cluster support (todo)&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;Client API (todo): C, Go, Java, Rust, Lua, Ruby&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
It is mostly header only project with main.cpp as an example for broker, producer and consumer.&lt;/div&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
NOTE: This is an initial version and may not be ready for production use.&lt;/div&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#protocol" id="user-content-protocol" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;Protocol:&lt;/h2&gt;
&lt;h3 style="box-sizing: border-box; font-size: 1.5em; line-height: 1.43; margin-bottom: 16px; margin-top: 1em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#create-a-topic" id="user-content-create-a-topic" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1.2; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;Create a Topic:&lt;/h3&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
(Admin userid and password must be passed to create a topic. Also we need to define userid/password per topic which consumer/produder need to pass for authentication)&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt; Send a request  to the broker
{
 "admin_password": "T0p$3cr31",
 "admin_user_id": "lightq_admin",
 "broker_type": "queue",
 "cmd": "create_topic",
 "password": "T0p$3cr31",
 "topic": "test",
 "user_id": "test_admin"
}


Response: 
{
   "cmd": "create_topic",
   "description": "topic created successfully",
   "status": "ok"
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 style="box-sizing: border-box; font-size: 1.5em; line-height: 1.43; margin-bottom: 16px; margin-top: 1em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#join-topic-consumer" id="user-content-join-topic-consumer" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1.2; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;Join Topic (Consumer):&lt;/h3&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
(Need to pass userid/password for topic 'test')&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;Request:
{
   "cmd": "join",
   "connection_type": "zmq",
   "password": "T0p$3cr31",
   "topic": "test",
   "type": "pull",
   "user_id": "test_admin"
}
Response: 
{
   "bind_uri": "tcp://127.0.0.1:5002",
   "cmd": "join",
   "status": "ok",
   "topic": "test"
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 style="box-sizing: border-box; font-size: 1.5em; line-height: 1.43; margin-bottom: 16px; margin-top: 1em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#join-topic-producer" id="user-content-join-topic-producer" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1.2; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;Join Topic (Producer):&lt;/h3&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
(Need to pass userid/password for topic 'test')&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;Request:
{
   "cmd": "join",
   "connection_type": "zmq",
   "password": "T0p$3cr31",
   "topic": "test",
   "type": "pub",
   "user_id": "test_admin"
 }
Response:
{
  "bind_uri": "tcp://127.0.0.1:5003",
  "cmd": "join",
  "status": "ok",
  "topic": "test"
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 style="box-sizing: border-box; font-size: 1.5em; line-height: 1.43; margin-bottom: 16px; margin-top: 1em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#get-the-statistics-about-the-topic" id="user-content-get-the-statistics-about-the-topic" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1.2; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;Get the statistics about the topic&lt;/h3&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;Request:
{
   "cmd": "stats",
   "password": "T0p$3cr31",
   "topic": "test",
   "user_id": "test_admin"
}
Response:
{
  "cmd": "stats",
  "messages_received": 9499570,
  "messages_sent": 9491554,
  "publishers_count": 1,
  "queue_size": 8016,
  "status": "ok",
  "subscribers_count": 1,
  "total_bytes_read": 0,
  "total_bytes_written": 0
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
}&lt;/div&gt;
&lt;h1 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; font-size: 2.25em; line-height: 1.2; margin: 1em 0px 16px; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#performance" id="user-content-performance" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;Performance:&lt;/h1&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Laptop hardware:&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;MacBook Pro (Retina, 15-inch, Late 2013)
Processor 2.3 GHz Intel Core i7
Memory 16 GB 1600 MHz DDR3
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Broker Type: Transient&lt;/div&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#100-bytes-10m-messages" id="user-content-100-bytes-10m-messages" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;100 bytes, 10M messages&lt;/h2&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Producer:&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq producer 10000000 100 event
Total Messages:10000000, Time Taken:8.46577 seconds.
Start Time: 1427658489112, End Time:1427658497577
1181227 messages per seconds.
1000000000 bytes sent
112.6507 MB per second
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Consumer:&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq consumer queue zmq  pull event
Total Messages:10000001, Time Taken:8.47781 seconds.
Start Time: 1427658489122, End Time:1427658497600
1179550 messages per seconds.
1000000004 bytes received
112.4907 MB per second.
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#256-bytes-10m-messages" id="user-content-256-bytes-10m-messages" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;256 bytes 10M Messages&lt;/h2&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Producer:&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq producer 10000000 256 event
Total Messages:10000000, Time Taken:9.2752 seconds.
Start Time: 1427658738559, End Time:1427658747834
1078143 messages per seconds.
2560000000 bytes sent
263.2186 MB per second.
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Consumer:&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq consumer queue zmq  pull event
Total Messages:10000001, Time Taken:9.30292 seconds.
Start Time: 1427658738562, End Time:1427658747865
1074931 messages per seconds.
2560000004 bytes received
262.4345 MB per second.
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#512-bytes-10m-messages" id="user-content-512-bytes-10m-messages" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;512 bytes 10M Messages&lt;/h2&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Producer:&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq producer 10000000 512 event
Total Messages:10000000, Time Taken:10.5182 seconds.
Start Time: 1427658940094, End Time:1427658950612
950734 messages per seconds.
5120000000 bytes sent
464.2258 MB per second.
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Consumer:&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq consumer queue zmq  pull event
Total Messages:10000001, Time Taken:10.5296 seconds.
Start Time: 1427658940097, End Time:1427658950627
949706 messages per seconds.
5120000004 bytes received
463.7239 MB per second.
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#1024-bytes-10m-messages" id="user-content-1024-bytes-10m-messages" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;1024 bytes 10M Messages&lt;/h2&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Producer:&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq producer 10000000 1024 event
Total Messages:10000000, Time Taken:19.8285 seconds.
Start Time: 1427659063592, End Time:1427659083420
504324 messages per seconds.
10240000000 bytes sent
492.5049 MB per second.
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Consumer:&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq consumer queue zmq  pull event
Total Messages:10000001, Time Taken:19.8222 seconds.
Start Time: 1427659063603, End Time:1427659083425
504485 messages per seconds.
10240000004 bytes received
492.6617 MB per second.
&lt;/code&gt;&lt;/pre&gt;
&lt;h1 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; font-size: 2.25em; line-height: 1.2; margin: 1em 0px 16px; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#performance-durable-broker-file" id="user-content-performance-durable-broker-file" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;Performance: (Durable broker: file)&lt;/h1&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#100-bytes-10m-messages-1" id="user-content-100-bytes-10m-messages-1" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;100 bytes, 10M messages&lt;/h2&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Producer:&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq producer 10000000 100 event
Total Messages:10000000, Time Taken:25.0786 seconds.
Start Time: 1427659575158, End Time:1427659600236
398746 messages per seconds.
1000000000 bytes sent
38.0275 MB per second.
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Consumer:&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq consumer file socket  pull event
Total Messages:10000001, Time Taken:25.0945 seconds.
Start Time: 1427659575170, End Time:1427659600264
398493 messages per seconds.
1000000004 bytes received
38.0033 MB per second.
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#256-bytes-10m-messages-1" id="user-content-256-bytes-10m-messages-1" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;256 bytes 10M Messages&lt;/h2&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Producer:&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq producer 10000000 256 event
Total Messages:10000000, Time Taken:28.3802 seconds.
Start Time: 1427659339399, End Time:1427659367779
352358 messages per seconds.
2560000000 bytes sent
86.0250 MB per second.
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Consumer:&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq consumer file socket  pull event
Total Messages:10000001, Time Taken:28.3939 seconds.
Start Time: 1427659339410, End Time:1427659367804
352188 messages per seconds.
2560000004 bytes received
85.9834 MB per second.
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#512-bytes-10m-messages-1" id="user-content-512-bytes-10m-messages-1" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;512 bytes 10M Messages&lt;/h2&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Producer:&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq producer 10000000 512 event
Total Messages:10000000, Time Taken:31.0832 seconds.
Start Time: 1427890737326, End Time:1427890768409
321716 messages per seconds.
5120000000 bytes sent
157.0884 MB per second.
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Consumer:&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq consumer file socket  pull event
Total Messages:10000001, Time Taken:31.0935 seconds.
Start Time: 1427890737329, End Time:1427890768423
321610 messages per seconds.
5120000004 bytes received
157.0363 MB per second.
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#1024-bytes-10m-messages-1" id="user-content-1024-bytes-10m-messages-1" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;1024 bytes 10M Messages&lt;/h2&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Producer:&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq producer 10000000 1024 event
Total Messages:10000000, Time Taken:37.4027 seconds.
Start Time: 1427890878446, End Time:1427890915848
267360 messages per seconds.
10240000000 bytes sent
261.0942 MB per second.
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Consumer:&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq consumer file socket  pull event
Total Messages:10000001, Time Taken:37.4166 seconds.
Start Time: 1427890878455, End Time:1427890915871
267260 messages per seconds.
10240000004 bytes received
260.9970 MB per second.
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Performance Test with 100M &amp;nbsp;:&amp;nbsp;&lt;span style="background-color: transparent; line-height: 34.1333351135254px;"&gt;&lt;a href="https://github.com/LightIO/LightQ/blob/master/PerfTest100M.md"&gt;https://github.com/LightIO/LightQ/blob/master/PerfTest100M.md&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;h3 style="box-sizing: border-box; font-size: 1.5em; line-height: 1.43; margin-bottom: 16px; margin-top: 1em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#example-transient-broker" id="user-content-example-transient-broker" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1.2; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;Example: (transient broker)&lt;/h3&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Start Broker: (broker type: queue, logging level: event)&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq queue event
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Start Consumer: (client: consumer, broker type: queue, client socket: zmq, logging level: event)&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq consumer queue zmq  pull event
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Start Producer: (client: producer, number of messages 10M, payload size: 100 bytes, logging level: event)&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;./dist/Release/GNU-MacOSX/lightq producer 10000000 100 event
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/LightIO/LightQ#license-" id="user-content-license-" style="background: transparent; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;License :&lt;/h2&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Source code of LighQ:&amp;nbsp;&lt;a href="https://github.com/rohitjoshi/LightQ/blob/master/LICENSE" style="background: transparent; box-sizing: border-box; color: #4183c4; text-decoration: none;"&gt;Apache License&lt;/a&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Dependecies:&lt;/div&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px;"&gt;
&lt;a href="http://zeromq.org/area:licensing" style="background: transparent; box-sizing: border-box; color: #4183c4; text-decoration: none;"&gt;ZeroMQ LGPL&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 1.75em; line-height: 1.225; margin-bottom: 16px; margin-top: 1em; padding-bottom: 0.3em; position: relative;"&gt;
&lt;a aria-hidden="true" class="anchor" href="https://github.com/rohitjoshi/LightQ/blob/master/README.md#license" id="user-content-license" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #4183c4; display: block; left: 0px; line-height: 1; margin-left: -30px; padding-left: 30px; padding-right: 6px; position: absolute; text-decoration: none; top: 0px;"&gt;&lt;/a&gt;&lt;/h2&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>Queue Benchmark</title><link>http://joshitech.blogspot.com/2015/02/queue-benchmark.html</link><category>C++</category><category>queue</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Tue, 24 Feb 2015 11:53:00 -0500</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-8382034919512898361</guid><description>&lt;h1 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 2.25em; line-height: 1.2; margin-bottom: 16px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0.3em; position: relative;"&gt;
Comparison between boost lock free and moodycamle queues&lt;/h1&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 16px; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Here are comparison between boost lock-free queue and moodycamel queues.&lt;/div&gt;
&lt;ol class="task-list" style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;Multi Consumers and Multi Producers: boost::lockfree::queue , boost::lockfree::stack, and &lt;a href="https://github.com/cameron314/concurrentqueue"&gt;moodycamel::ConcurrentQueue&lt;/a&gt; for concurrent access.&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;Single Consumer and Single Producer: boost::lockfree::spsc_queue and &lt;a href="https://github.com/cameron314/readerwriterqueue"&gt;moodycamel::ReaderWriterQueue&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Observations:&lt;/div&gt;
&lt;ol class="task-list" style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;&lt;div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;"&gt;
For single consumer/single producer: moodycamel::ReaderWriterQueue is faster than boost::lockfree::spsc_queue&lt;/div&gt;
&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;&lt;div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;"&gt;
For concurrent access, moodycamel::ConcurrentQueue outperforms both boost queue and stack&lt;/div&gt;
&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;&lt;div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;"&gt;
For some reason, moodycamel::ConcurrentQueue has better performance when 3 or 4 producers/consumers are used than 1 or 2 threads.&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
boost::lockfree::queue:&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;boost::lockfree::queue: Producer threads:1, Consumer threads:1, producer_counter: 10000000, consumer_counter 10000000. Time      Taken:2.52799 seconds.
boost::lockfree::queue: Producer threads:2, Consumer threads:2, producer_counter: 10000000, consumer_counter 10000000. Time      Taken:2.63741 seconds.
boost::lockfree::queue: Producer threads:3, Consumer threads:3, producer_counter: 9999999, consumer_counter 9999999. Time        Taken:2.74344 seconds.
boost::lockfree::queue: Producer threads:4, Consumer threads:4, producer_counter: 10000000, consumer_counter 10000000. Time      Taken:2.93172 seconds.
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
boost::lockfree::stack:&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;boost::lockfree::stack: Producer threads:1, Consumer threads:1, producer_counter: 10000000, consumer_counter 10000000. Time      Taken:2.22722 seconds.
boost::lockfree::stack: Producer threads:2, Consumer threads:2, producer_counter: 10000000, consumer_counter 10000000. Time      Taken:2.58529 seconds.
boost::lockfree::stack: Producer threads:3, Consumer threads:3, producer_counter: 9999999, consumer_counter 9999999. Time        Taken:2.81599 seconds.
boost::lockfree::stack: Producer threads:4, Consumer threads:4, producer_counter: 10000000, consumer_counter 10000000. Time      Taken:3.22939 seconds.
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
moodycamel::ConcurrentQueue:&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;moodycamel::ConcurrentQueue: Producer threads:1, Consumer threads:1, producer_counter: 10000000, consumer_counter 10000000.      Time Taken:1.49435 seconds.
moodycamel::ConcurrentQueue: Producer threads:2, Consumer threads:2, producer_counter: 10000000, consumer_counter 10000000.      Time Taken:1.31297 seconds.
moodycamel::ConcurrentQueue: Producer threads:3, Consumer threads:3, producer_counter: 9999999, consumer_counter 9999999.        Time Taken:0.868555 seconds.
moodycamel::ConcurrentQueue: Producer threads:4, Consumer threads:4, producer_counter: 10000000, consumer_counter 10000000.      Time Taken:0.810693 seconds.
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
Single Producer / Single Consumer:&lt;/div&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
boost::lockfree::spsc_queue:&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;boost::lockfree::spsc_queue: Producer threads:1, Consumer threads:1, producer_counter: 10000000, consumer_counter 10000000. Time Taken:0.776101 seconds.
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; line-height: 34.1333351135254px; margin-bottom: 16px;"&gt;
moodycamel::ReaderWriterQueue:&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; font-stretch: normal; line-height: 1.45; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;code style="background: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 0px; box-sizing: border-box; display: inline; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.3333330154419px; line-height: inherit; margin: 0px; padding: 0px; word-break: normal; word-wrap: normal;"&gt;moodycamel::ReaderWriterQueue: Producer threads:1, Consumer threads:1, producer_counter: 10000000, consumer_counter 10000000. Time Taken:0.586292 seconds.&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total></item><item><title>Rust:  Custom Logger with time-stamp, file name and line number</title><link>http://joshitech.blogspot.com/2014/12/rust-customer-logger.html</link><category>logging</category><category>Rust</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Wed, 17 Dec 2014 09:33:00 -0500</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-2480495927154565747</guid><description>Rust language has a built-in support for logging.&amp;nbsp; The default logger logs the log level, module name and log message which are not sufficient for troubleshooting. Fortunately,&amp;nbsp; Rust log crate does allow overriding with a custom logger. &lt;br /&gt;
&lt;br /&gt;
I wanted to log the current time-stamp,&amp;nbsp; module name, function name and line number and posted a question on &lt;a href="http://www.reddit.com/r/rust/comments/2pijdj/accessing_file_name_function_name_and_line_number/"&gt;Reddit&lt;/a&gt; on how do log these information. Based on the answers, Rust does have support for module, line and file name but no support for function name.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
To implement the Custom Logger, I looked at the default logger implementation in&amp;nbsp; &lt;a href="https://github.com/rust-lang/rust/blob/master/src/liblog/lib.rs"&gt;lib.rs&lt;/a&gt; in log crate and realized that LogRecord does support file-name and line number but while logging, it does not use it. &lt;br /&gt;
&lt;br /&gt;
&lt;pre nbsp="" style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT61Voyd12yJWsqt1FZW_OQTu1-uXFFfk4Ana0BY8uJD0JX_tb6cHlhDnh5nIcnehJW4jlImts9tHsWWNSTlgfuNDzsKo8vRV5OZ3qKJvB7WXSA6mcXipmEBgMexu7yVv9D-QHs8DxixuY/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; pub fn log(level: u32, loc: &amp;amp;'static LogLocation, args: &amp;amp;fmt::Arguments) {&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Test the literal string from args against the current filter, if there&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; // is one.&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; match unsafe { FILTER.as_ref() } {&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Some(filter) if !filter.is_match(args.to_string().as_slice()) =&amp;gt; return,&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _ =&amp;gt; {}&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Completely remove the local logger from TLS in case anyone attempts to&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; // frob the slot while we're doing the logging. This will destroy any logger&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; // set during logging.&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; let mut logger = LOCAL_LOGGER.with(|s| {&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s.borrow_mut().take()&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; }).unwrap_or_else(|| {&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; box DefaultLogger { handle: io::stderr() } as Box&amp;lt;Logger + Send&amp;gt;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; logger.log(&amp;amp;LogRecord {&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; level: LogLevel(level),&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; args: args,&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: red;"&gt; file: loc.file,&lt;/span&gt;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; module_path: loc.module_path,&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: red;"&gt; line: loc.line,&amp;nbsp;&lt;/span&gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; set_logger(logger);&amp;nbsp; 
&amp;nbsp; }&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
To support the logging of function name, there is a pending &lt;a href="https://github.com/rust-lang/rfcs/pull/466"&gt;RFC/Pull Request&lt;/a&gt;, hope that gets implemented before Rust 1.0.&lt;br /&gt;
&lt;br /&gt;
For time being, let manage without function name and implement our custom logger. &lt;br /&gt;
&lt;br /&gt;
&lt;pre nbsp="" style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT61Voyd12yJWsqt1FZW_OQTu1-uXFFfk4Ana0BY8uJD0JX_tb6cHlhDnh5nIcnehJW4jlImts9tHsWWNSTlgfuNDzsKo8vRV5OZ3qKJvB7WXSA6mcXipmEBgMexu7yVv9D-QHs8DxixuY/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; #![feature(phase)] &amp;nbsp;
&amp;nbsp;#[phase(plugin, link)]extern crate log; &amp;nbsp;
&amp;nbsp;#[phase(plugin, link)]extern crate time; &amp;nbsp;
&amp;nbsp;/// import &amp;nbsp;
&amp;nbsp;use log::{Logger,LogRecord,LogLevel,LogLocation, set_logger}; &amp;nbsp;
&amp;nbsp;use std::io::{ LineBufferedWriter, stdio, stderr} ; &amp;nbsp;
&amp;nbsp;/// Custom Logger &amp;nbsp;
&amp;nbsp;struct CustomLogger { &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; handle: LineBufferedWriter&amp;lt;stdio::StdWriter&amp;gt;, &amp;nbsp;
&amp;nbsp; } &amp;nbsp;
&amp;nbsp;/// Implements Logger trait for Custom Logger which support logging timestamp, file name and line number &amp;nbsp;
&amp;nbsp;/// in addition to log level, module path and message. &amp;nbsp;
&amp;nbsp;impl Logger for CustomLogger { &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; fn log(&amp;amp;mut self, record: &amp;amp;LogRecord) { &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; match writeln!(&amp;amp;mut self.handle, &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "{}:{}:{}:{}:{} {}", &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time::strftime("%Y-%m-%d %H:%M:%S %Z", &amp;amp;time::now()).unwrap(), &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; record.level, &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; record.module_path, &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; record.file, &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; record.line, &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; record.args) { &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Err(e) =&amp;gt; panic!("failed to log: {}", e), &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ok(()) =&amp;gt; {} &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;
&amp;nbsp; } &amp;nbsp;
&amp;nbsp;///main&amp;nbsp; &amp;nbsp;
&amp;nbsp;fn main() { &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; log::set_logger(box CustomLogger { handle: stderr() } ); &amp;nbsp;
&amp;nbsp;&amp;nbsp; debug!("Debug message"); &amp;nbsp;
&amp;nbsp;&amp;nbsp; warn!("Warn message"); &amp;nbsp;
&amp;nbsp;&amp;nbsp; error!("Error message"); &amp;nbsp;
&amp;nbsp;} &amp;nbsp;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is output:&lt;br /&gt;
&lt;pre nbsp="" style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT61Voyd12yJWsqt1FZW_OQTu1-uXFFfk4Ana0BY8uJD0JX_tb6cHlhDnh5nIcnehJW4jlImts9tHsWWNSTlgfuNDzsKo8vRV5OZ3qKJvB7WXSA6mcXipmEBgMexu7yVv9D-QHs8DxixuY/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; RUST_LOG=debug ./target/custom-logger&amp;nbsp; 
&amp;nbsp;2014-12-17 09:23:48 :DEBUG:custom-logger:/projects/rust/custom-logger/src/main.rs:32 Debug message&amp;nbsp; 
&amp;nbsp;2014-12-17 09:23:48 :WARN:custom-logger:/projects/rust/custom-logger/src/main.rs:33 Warn message&amp;nbsp; 
&amp;nbsp;2014-12-17 09:23:48 :ERROR:custom-logger:/projects/rust/custom-logger/src/main.rs:34 Error message&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
NOTE:&amp;nbsp; I notice it doesn't print the timezone and leave an empty space.&lt;br /&gt;
&lt;br /&gt;
Once I figure out the timezone issue and logging function name , it will look like below which is much better than file with being repeated.&lt;br /&gt;
&lt;br /&gt;
&lt;pre nbsp="" style="background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT61Voyd12yJWsqt1FZW_OQTu1-uXFFfk4Ana0BY8uJD0JX_tb6cHlhDnh5nIcnehJW4jlImts9tHsWWNSTlgfuNDzsKo8vRV5OZ3qKJvB7WXSA6mcXipmEBgMexu7yVv9D-QHs8DxixuY/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;RUST_LOG=debug ./target/custom-logger&amp;nbsp; 
&amp;nbsp;2014-12-17 09:23:48 EST:DEBUG:custom-logger::main::32 Debug message&amp;nbsp; 
&amp;nbsp;2014-12-17 09:23:48 EST:WARN:custom-logger::main:33 Warn message&amp;nbsp; 
&amp;nbsp;2014-12-17 09:23:48 EST:ERROR:custom-logger::main:34 Error message&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">93</thr:total></item><item><title>Nginx: Mutual (Two way) SSL authentication for upstream HTTPS servers</title><link>http://joshitech.blogspot.com/2014/11/nginx-mutual-two-way-ssl-authentication.html</link><category>Nginx</category><category>Proxy</category><category>SSL</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Fri, 14 Nov 2014 10:30:00 -0500</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-9080567345267756704</guid><description>&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://wiki.nginx.org/Main" style="font-family: Arial;"&gt;Nginx&lt;/a&gt;&lt;span style="font-family: Arial;"&gt;&lt;span style="background-color: white;"&gt;&amp;nbsp; is a really good, &amp;nbsp;high performance reverse proxy server which supports&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Mutual_authentication"&gt;Mutual Authentication&amp;nbsp;&lt;/a&gt;&amp;nbsp;for incoming requests but doesn't support for upstream/backend servers. &amp;nbsp;In most of the deployments where nginx is used as a reverse proxy, it also acts as a SSL termination point where upstream requests are routed using either non SSL or one-way SSL connections.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial;"&gt;&lt;span style="background-color: white;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="background-color: white; font-family: Arial;"&gt;Recently, I was working on a prototype to develop Api Gateway + reverse proxy which manages SSL certificates for different upstream backends and route incoming requests based on the routing rules. Some of the upstream backends expect to have their own certificates with mutual authentication.&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white; font-family: Arial;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial;"&gt;&lt;span style="background-color: white;"&gt;After spending sometime on google search and seeing questions posted on stack overflow, &amp;nbsp;I realized that nginx doesn't support mutual/two-way authentications for upstreams so decided to implement support. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial;"&gt;&lt;span style="background-color: white;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Arial;"&gt;&lt;span style="background-color: white;"&gt;I modified&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: white; font-family: Arial;"&gt;ngx_http_proxy_module.c to add following two new config parameters which allows to specify client certificate pem and client certificate key files. I have submitted my patch to nginx development community &lt;a href="http://forum.nginx.org/read.php?29,252656,252657#msg-252657"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white; font-family: Arial;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="background-color: white; font-family: Arial;"&gt;NOTE: Make sure you do not populate&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Arial;"&gt;proxy_ssl_trusted_certificate. &amp;nbsp;As it is supported by nginx for upstream one way ssl, it takes preference over my config parameters.&lt;/span&gt;&lt;br /&gt;
&lt;pre style="background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT61Voyd12yJWsqt1FZW_OQTu1-uXFFfk4Ana0BY8uJD0JX_tb6cHlhDnh5nIcnehJW4jlImts9tHsWWNSTlgfuNDzsKo8vRV5OZ3qKJvB7WXSA6mcXipmEBgMexu7yVv9D-QHs8DxixuY/s320/codebg.gif) rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; width: 450.828125px;"&gt;&lt;code style="word-wrap: normal;"&gt; proxy_ssl_client_certificate  
 proxy_ssl_client_certificate_key  &lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style="font-family: Arial;"&gt;&lt;span style="background-color: white;"&gt;1. Apply below patch to your Nginx source code and recompile. &amp;nbsp;I have verified this patch against nginx-1.4.7&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial;"&gt;&lt;span style="background-color: white;"&gt;Download patch &lt;a href="http://forum.nginx.org/read.php?29,252656,252657#msg-252657"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial;"&gt;&lt;span style="background-color: white;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Arial;"&gt;&lt;span style="background-color: white;"&gt;2. &amp;nbsp;Configure your nginx.conf as below. &amp;nbsp;See the comments for more details.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT61Voyd12yJWsqt1FZW_OQTu1-uXFFfk4Ana0BY8uJD0JX_tb6cHlhDnh5nIcnehJW4jlImts9tHsWWNSTlgfuNDzsKo8vRV5OZ3qKJvB7WXSA6mcXipmEBgMexu7yVv9D-QHs8DxixuY/s320/codebg.gif) rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; width: 450.828125px;"&gt;&lt;code style="word-wrap: normal;"&gt;location /  
      {  
       default_type application/json;  
   
       #this enables client verification  
       proxy_ssl_verify on;  
       proxy_ssl_verify_depth 3;  
   
       #client certificate for upstream server  
       proxy_ssl_client_certificate /etc/upstream-a.pem;  
        
       #client key generated from upstream cert  
       proxy_ssl_client_certificate_key /etc/upstream-a.key;  
        
       #configure based on your security requirement  
       proxy_ssl_ciphers ALL;  
       proxy_ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;  
   
       #make sure to match the ssl server name from upstream server certificate   
       proxy_ssl_name "abc.company.com;  
       proxy_pass https://abc.company.com:9900;  
    }  &lt;/code&gt;&lt;/pre&gt;
&lt;span style="font-family: Arial;"&gt;&lt;span style="background-color: white;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style="font-family: Arial;"&gt;&lt;span style="background-color: white;"&gt;Hope this help. &amp;nbsp;Let me know if you have any questions.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial;"&gt;&lt;span style="background-color: white;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><title>Go vs Rust : Productivity vs Performance</title><link>http://joshitech.blogspot.com/2014/11/go-vs-rust-productivity-vs-performance.html</link><category>rust go performance loc</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Tue, 11 Nov 2014 20:07:00 -0500</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-1251315591695394396</guid><description>Recently, I have been spending some time learning both Go and Rust languages and really excited about these languages evolving differently to solve different problems.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;I think Rust will attract developers from C, C++, Fortran and will be used for developing high performance systems like gaming, browsers, telco servers, distributed computing systems as well as low level, cpu efficient embedded/micro computers.&lt;br /&gt;
&lt;br /&gt;
Go seems to be for the Python, Ruby and Java developers and will be used for enterprise applications, mobile apps and application servers.&lt;br /&gt;
&lt;br /&gt;
With my 10+ years of experience in C++ writing applications for telecom service providers where latency and throughput is very important, &amp;nbsp;I really like Rust which simplifies C++ , eliminates memory corruption, improves compile time significantly and being claimed as &lt;i&gt;&lt;a href="http://www.rust-lang.org/"&gt;blazing fast&lt;/a&gt;&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Today I came across &lt;a href="http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&amp;amp;lang=rust&amp;amp;lang2=go&amp;amp;data=u64q"&gt;Computer Language Benchmark&lt;/a&gt;&amp;nbsp;comparing Rust and Go from one of the blog I was reading. These are &lt;a href="https://code.google.com/p/caliper/wiki/JavaMicrobenchmarks"&gt;microbenchmark&lt;/a&gt; and gives rough idea about how these languages perform for specific algorithm implementation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table style="background-color: white; color: black; font-family: verdana, arial, sans-serif; font-size: small; margin-bottom: 1em;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th style="background-color: #dddddd; font-weight: normal; text-align: center; vertical-align: top;"&gt;Program&amp;nbsp;Source&amp;nbsp;Code&lt;/th&gt;&lt;th style="background-color: #dddddd; font-weight: normal; text-align: center; vertical-align: top;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/play.html#time" style="color: black; text-decoration: none;" title="How do you measure program CPU secs?"&gt;CPU&amp;nbsp;secs&lt;/a&gt;&lt;/th&gt;&lt;th style="background-color: #dddddd; font-weight: normal; text-align: center; vertical-align: top;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/play.html#time" style="color: black; text-decoration: none;" title="How do you measure program Elapsed secs?"&gt;Elapsed&amp;nbsp;secs&lt;/a&gt;&lt;/th&gt;&lt;th style="background-color: #dddddd; font-weight: normal; text-align: center; vertical-align: top;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/play.html#memory" style="color: black; text-decoration: none;" title="How do you measure program Memory KB?"&gt;Memory&amp;nbsp;KB&lt;/a&gt;&lt;/th&gt;&lt;th style="background-color: #dddddd; font-weight: normal; text-align: center; vertical-align: top;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/play.html#gzbytes" style="color: black; text-decoration: none;" title="How do you measure program Source Code Bytes?"&gt;Code&amp;nbsp;B&lt;/a&gt;&lt;/th&gt;&lt;th style="background-color: #dddddd; font-weight: normal; text-align: center; vertical-align: top;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/play.html#cpuloadpercent" style="color: black; text-decoration: none;" title="How do you measure CPU Load?"&gt;≈&amp;nbsp;CPU&amp;nbsp;Load&lt;/a&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th class="txt" colspan="3" style="background-color: #dddddd; font-weight: normal; vertical-align: top;"&gt;&amp;nbsp;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=binarytrees" name="binarytrees" style="color: black; text-decoration: none;" title="Measurements for all the binary-trees benchmark programs"&gt;binary-trees&lt;/a&gt;&amp;nbsp;&lt;/th&gt;&lt;th colspan="3" style="background-color: #dddddd; font-weight: normal; text-align: center; vertical-align: top;"&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=binarytrees&amp;amp;lang=rust&amp;amp;id=1" style="text-decoration: none;" title="Read the Program Source Code : Rust binary-trees"&gt;&lt;strong&gt;Rust&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;22.05&lt;/td&gt;&lt;td class="sort" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-weight: bold; text-align: right;"&gt;5.97&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;228,196&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;788&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;96%&amp;nbsp;87%&amp;nbsp;95%&amp;nbsp;93%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=binarytrees&amp;amp;lang=go&amp;amp;id=8" style="text-decoration: none;" title="Read the Program Source Code : Go binary-trees"&gt;Go&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;68.41&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;18.42&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;266,624&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;814&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;94%&amp;nbsp;94%&amp;nbsp;92%&amp;nbsp;93%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th class="txt" colspan="3" style="background-color: #dddddd; font-weight: normal; vertical-align: top;"&gt;&amp;nbsp;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=pidigits" name="pidigits" style="color: black; text-decoration: none;" title="Measurements for all the pidigits benchmark programs"&gt;pidigits&lt;/a&gt;&amp;nbsp;&lt;/th&gt;&lt;th colspan="3" style="background-color: #dddddd; font-weight: normal; text-align: center; vertical-align: top;"&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=pidigits&amp;amp;lang=rust&amp;amp;id=2" style="text-decoration: none;" title="Read the Program Source Code : Rust pidigits"&gt;&lt;strong&gt;Rust&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;1.73&lt;/td&gt;&lt;td class="sort" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-weight: bold; text-align: right;"&gt;1.73&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;5,308&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;1297&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;1%&amp;nbsp;100%&amp;nbsp;0%&amp;nbsp;0%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=pidigits&amp;amp;lang=go&amp;amp;id=2" style="text-decoration: none;" title="Read the Program Source Code : Go pidigits"&gt;Go&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;3.76&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;3.52&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;3,668&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;674&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;4%&amp;nbsp;48%&amp;nbsp;7%&amp;nbsp;51%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th class="txt" colspan="3" style="background-color: #dddddd; font-weight: normal; vertical-align: top;"&gt;&amp;nbsp;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm" name="spectralnorm" style="color: black; text-decoration: none;" title="Measurements for all the spectral-norm benchmark programs"&gt;spectral-norm&lt;/a&gt;&amp;nbsp;&lt;/th&gt;&lt;th colspan="3" style="background-color: #dddddd; font-weight: normal; text-align: center; vertical-align: top;"&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=spectralnorm&amp;amp;lang=rust&amp;amp;id=3" style="text-decoration: none;" title="Read the Program Source Code : Rust spectral-norm"&gt;&lt;strong&gt;Rust&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;7.87&lt;/td&gt;&lt;td class="sort" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-weight: bold; text-align: right;"&gt;2.06&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;5,112&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;1020&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;95%&amp;nbsp;96%&amp;nbsp;96%&amp;nbsp;96%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=spectralnorm&amp;amp;lang=go&amp;amp;id=3" style="text-decoration: none;" title="Read the Program Source Code : Go spectral-norm"&gt;Go&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;15.70&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;3.96&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;1,816&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;536&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;99%&amp;nbsp;99%&amp;nbsp;99%&amp;nbsp;99%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th class="txt" colspan="3" style="background-color: #dddddd; font-weight: normal; vertical-align: top;"&gt;&amp;nbsp;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=revcomp" name="revcomp" style="color: black; text-decoration: none;" title="Measurements for all the reverse-complement benchmark programs"&gt;reverse-complement&lt;/a&gt;&amp;nbsp;&lt;/th&gt;&lt;th colspan="3" style="background-color: #dddddd; font-weight: normal; text-align: center; vertical-align: top;"&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=revcomp&amp;amp;lang=rust&amp;amp;id=4" style="text-decoration: none;" title="Read the Program Source Code : Rust reverse-complement"&gt;&lt;strong&gt;Rust&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;0.74&lt;/td&gt;&lt;td class="sort" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-weight: bold; text-align: right;"&gt;0.49&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;257,160&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;2015&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;12%&amp;nbsp;82%&amp;nbsp;41%&amp;nbsp;18%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=revcomp&amp;amp;lang=go&amp;amp;id=1" style="text-decoration: none;" title="Read the Program Source Code : Go reverse-complement"&gt;Go&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;0.93&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;0.77&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;250,564&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;1243&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;10%&amp;nbsp;69%&amp;nbsp;11%&amp;nbsp;35%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th class="txt" colspan="3" style="background-color: #dddddd; font-weight: normal; vertical-align: top;"&gt;&amp;nbsp;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=fasta" name="fasta" style="color: black; text-decoration: none;" title="Measurements for all the fasta benchmark programs"&gt;fasta&lt;/a&gt;&amp;nbsp;&lt;/th&gt;&lt;th colspan="3" style="background-color: #dddddd; font-weight: normal; text-align: center; vertical-align: top;"&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=fasta&amp;amp;lang=rust&amp;amp;id=1" style="text-decoration: none;" title="Read the Program Source Code : Rust fasta"&gt;&lt;strong&gt;Rust&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;4.99&lt;/td&gt;&lt;td class="sort" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-weight: bold; text-align: right;"&gt;5.00&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;4,812&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;1224&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;1%&amp;nbsp;0%&amp;nbsp;100%&amp;nbsp;0%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=fasta&amp;amp;lang=go&amp;amp;id=1" style="text-decoration: none;" title="Read the Program Source Code : Go fasta"&gt;Go&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;7.26&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;7.27&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;1,028&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;1036&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;1%&amp;nbsp;1%&amp;nbsp;1%&amp;nbsp;100%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th class="txt" colspan="3" style="background-color: #dddddd; font-weight: normal; vertical-align: top;"&gt;&amp;nbsp;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=regexdna" name="regexdna" style="color: black; text-decoration: none;" title="Measurements for all the regex-dna benchmark programs"&gt;regex-dna&lt;/a&gt;&amp;nbsp;&lt;/th&gt;&lt;th colspan="3" style="background-color: #dddddd; font-weight: normal; text-align: center; vertical-align: top;"&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=regexdna&amp;amp;lang=rust&amp;amp;id=1" style="text-decoration: none;" title="Read the Program Source Code : Rust regex-dna"&gt;&lt;strong&gt;Rust&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;35.26&lt;/td&gt;&lt;td class="sort" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-weight: bold; text-align: right;"&gt;11.95&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;228,296&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;763&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;65%&amp;nbsp;66%&amp;nbsp;87%&amp;nbsp;78%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=regexdna&amp;amp;lang=go&amp;amp;id=2" style="text-decoration: none;" title="Read the Program Source Code : Go regex-dna"&gt;Go&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;47.40&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;16.27&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;543,868&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;789&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;86%&amp;nbsp;64%&amp;nbsp;64%&amp;nbsp;78%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th class="txt" colspan="3" style="background-color: #dddddd; font-weight: normal; vertical-align: top;"&gt;&amp;nbsp;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=fannkuchredux" name="fannkuchredux" style="color: black; text-decoration: none;" title="Measurements for all the fannkuch-redux benchmark programs"&gt;fannkuch-redux&lt;/a&gt;&amp;nbsp;&lt;/th&gt;&lt;th colspan="3" style="background-color: #dddddd; font-weight: normal; text-align: center; vertical-align: top;"&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=fannkuchredux&amp;amp;lang=rust&amp;amp;id=2" style="text-decoration: none;" title="Read the Program Source Code : Rust fannkuch-redux"&gt;&lt;strong&gt;Rust&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;50.01&lt;/td&gt;&lt;td class="sort" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-weight: bold; text-align: right;"&gt;12.81&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;7,072&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;1180&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;99%&amp;nbsp;100%&amp;nbsp;97%&amp;nbsp;95%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=fannkuchredux&amp;amp;lang=go&amp;amp;id=1" style="text-decoration: none;" title="Read the Program Source Code : Go fannkuch-redux"&gt;Go&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;67.16&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;16.86&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;1,032&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;900&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;100%&amp;nbsp;100%&amp;nbsp;100%&amp;nbsp;100%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th class="txt" colspan="3" style="background-color: #dddddd; font-weight: normal; vertical-align: top;"&gt;&amp;nbsp;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=mandelbrot" name="mandelbrot" style="color: black; text-decoration: none;" title="Measurements for all the mandelbrot benchmark programs"&gt;mandelbrot&lt;/a&gt;&amp;nbsp;&lt;/th&gt;&lt;th colspan="3" style="background-color: #dddddd; font-weight: normal; text-align: center; vertical-align: top;"&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=mandelbrot&amp;amp;lang=rust&amp;amp;id=1" style="text-decoration: none;" title="Read the Program Source Code : Rust mandelbrot"&gt;&lt;strong&gt;Rust&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;20.14&lt;/td&gt;&lt;td class="sort" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-weight: bold; text-align: right;"&gt;5.09&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;56,824&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;1290&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;98%&amp;nbsp;99%&amp;nbsp;100%&amp;nbsp;99%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=mandelbrot&amp;amp;lang=go&amp;amp;id=3" style="text-decoration: none;" title="Read the Program Source Code : Go mandelbrot"&gt;Go&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;25.44&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;6.39&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;32,276&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;894&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;100%&amp;nbsp;100%&amp;nbsp;100%&amp;nbsp;100%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th class="txt" colspan="3" style="background-color: #dddddd; font-weight: normal; vertical-align: top;"&gt;&amp;nbsp;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=nbody" name="nbody" style="color: black; text-decoration: none;" title="Measurements for all the n-body benchmark programs"&gt;n-body&lt;/a&gt;&amp;nbsp;&lt;/th&gt;&lt;th colspan="3" style="background-color: #dddddd; font-weight: normal; text-align: center; vertical-align: top;"&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=nbody&amp;amp;lang=rust&amp;amp;id=1" style="text-decoration: none;" title="Read the Program Source Code : Rust n-body"&gt;&lt;strong&gt;Rust&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;20.99&lt;/td&gt;&lt;td class="sort" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-weight: bold; text-align: right;"&gt;20.99&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;4,824&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;1371&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;1%&amp;nbsp;0%&amp;nbsp;0%&amp;nbsp;100%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=nbody&amp;amp;lang=go&amp;amp;id=1" style="text-decoration: none;" title="Read the Program Source Code : Go n-body"&gt;Go&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;22.95&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;22.95&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;1,036&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;1310&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;0%&amp;nbsp;0%&amp;nbsp;100%&amp;nbsp;1%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;th class="txt" colspan="3" style="background-color: #dddddd; font-weight: normal; vertical-align: top;"&gt;&amp;nbsp;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=knucleotide" name="knucleotide" style="color: black; text-decoration: none;" title="Measurements for all the k-nucleotide benchmark programs"&gt;k-nucleotide&lt;/a&gt;&amp;nbsp;&lt;/th&gt;&lt;th colspan="3" style="background-color: #dddddd; font-weight: normal; text-align: center; vertical-align: top;"&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=knucleotide&amp;amp;lang=rust&amp;amp;id=1" style="text-decoration: none;" title="Read the Program Source Code : Rust k-nucleotide"&gt;&lt;strong&gt;Rust&lt;/strong&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;26.06&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;9.76&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;152,536&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;2113&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;42%&amp;nbsp;83%&amp;nbsp;43%&amp;nbsp;99%&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px;"&gt;&lt;a href="http://benchmarksgame.alioth.debian.org/u64q/program.php?test=knucleotide&amp;amp;lang=go&amp;amp;id=3" style="text-decoration: none;" title="Read the Program Source Code : Go k-nucleotide"&gt;Go&lt;/a&gt;&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;30.93&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;8.42&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; text-align: right;"&gt;251,024&lt;/td&gt;&lt;td style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;1399&lt;/td&gt;&lt;td class="smaller" style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; font-size: smaller; margin-left: 1em; text-align: right;"&gt;&amp;nbsp;&amp;nbsp;98%&amp;nbsp;91%&amp;nbsp;90%&amp;nbsp;90%&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
To get the comparative data across all these algorithms, &amp;nbsp; I calculated average for combined these algorithms for both the languages. &lt;br /&gt;
&lt;br /&gt;
Results: &amp;nbsp;Average Elapsed seconds and code written for each language:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 247px;"&gt;
&lt;!--StartFragment--&gt;
 &lt;colgroup&gt;&lt;col style="width: 65pt;" width="65"&gt;&lt;/col&gt;
 &lt;col style="mso-width-alt: 4992; mso-width-source: userset; width: 117pt;" width="117"&gt;&lt;/col&gt;
 &lt;col style="width: 65pt;" width="65"&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl63" height="15" style="height: 15.0pt; width: 65pt;" width="65"&gt;&lt;b&gt;Language&lt;/b&gt;&lt;/td&gt;
  &lt;td class="xl64" style="width: 117pt;" width="117"&gt;&lt;b&gt;CPU&lt;/b&gt; (Elapsed seconds)&lt;/td&gt;
  &lt;td class="xl64" style="width: 65pt;" width="65"&gt;&lt;b&gt;Code&lt;/b&gt; (B)&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td height="15" style="height: 15.0pt;"&gt;Rust&lt;/td&gt;
  &lt;td class="xl64"&gt;&lt;b&gt;&lt;span style="color: lime;"&gt;7.585&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;
  &lt;td class="xl65"&gt;1306.1&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td height="15" style="height: 15.0pt;"&gt;Go&lt;/td&gt;
  &lt;td class="xl65"&gt;10.483&lt;/td&gt;
  &lt;td class="xl64"&gt;&lt;b&gt;&lt;span style="color: lime;"&gt;959.5&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;!--EndFragment--&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;These microbenchmarks shows Rust is ~30+% faster than Go but has ~30+% more code.&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Given the computers are getting faster and cheaper but software becoming more complex and maintenance is expensive, I would use Go for an enterprise application.&lt;br /&gt;
&lt;br /&gt;
Which language would you choose and for what kinds of applications? &amp;nbsp;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">15</thr:total></item><item><title>Fibonacci(50): Rust slower than Go ?</title><link>http://joshitech.blogspot.com/2014/11/fibonacci50-rust-slower-than-go.html</link><category>Go</category><category>Rust</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Sat, 8 Nov 2014 11:20:00 -0500</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-3731906685989307382</guid><description>I my previous blog post "&lt;a href="https://www.blogger.com/"&gt;&lt;span id="goog_1929959015"&gt;&lt;/span&gt;Fibonnaci (50) : Java &amp;gt; C &amp;gt; C++ &amp;gt; D &amp;gt; Go &amp;gt; Terra (Lua) &amp;gt; LuaJit (Lua) &lt;span id="goog_1929959016"&gt;&lt;/span&gt;&lt;/a&gt;", &amp;nbsp;I compared language performance using Fibonnaci algorithm where Rust language was not included.&lt;br /&gt;
&lt;br /&gt;
Rust language is being clamined to &amp;nbsp;be "&lt;i&gt;a system programming language that runs blazingly fast, prevents almost all crashes*, and eliminates data races&lt;/i&gt;".&lt;br /&gt;
&lt;br /&gt;
I thought of running same fibonnaci algorithm against Rust to see how blazingly fast is it.&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
You can find&lt;a href="https://github.com/rohitjoshi/lang-compare/blob/master/fibonacci/fib.rs"&gt; &lt;u&gt;fib.rs&amp;nbsp;&lt;/u&gt;&lt;/a&gt;source code here on&amp;nbsp;&lt;a href="https://github.com/rohitjoshi/lang-compare"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="e9cefa2c-d1c6-49c5-912e-ab5cf304d67d" id="3e3b256b-8a8d-49cb-999f-cbe2192bf6c5"&gt;lang&lt;/span&gt;-compare&lt;/a&gt;&amp;nbsp; on my github. &amp;nbsp;I compared it against &lt;a href="https://github.com/rohitjoshi/lang-compare/blob/master/fibonacci/fib.go"&gt;fib.go&lt;/a&gt; and &lt;a href="https://github.com/rohitjoshi/lang-compare/blob/master/fibonacci/fib.c"&gt;fib.c&lt;/a&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;FIBONACCI - 50&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;Language C (gcc-4.9.1):&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;gcc-4.9 -O3 fib.c&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;/usr/bin/time -lp ./a.out 50&lt;/i&gt;&lt;br /&gt;
&lt;span style="font-size: xx-small;"&gt;LANGUAGE C&lt;/span&gt;: 12586269025&lt;br /&gt;
&lt;b&gt;real &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;52.87&lt;/b&gt;&lt;br /&gt;
user &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;52.83&lt;br /&gt;
sys &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.01&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 557056 &amp;nbsp;maximum resident set size&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;average shared memory size&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;average unshared data size&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;average unshared stack size&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;163 &amp;nbsp;page reclaims&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;page faults&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;swaps&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;block input operations&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;block output operations&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;messages sent&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;messages received&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;signals received&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;voluntary context switches&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;497 &amp;nbsp;involuntary context switches&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Language Go (go1.4beta1 darwin/amd64):&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;go build fib.go&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;/usr/bin/time -lp ./fib 50&lt;/i&gt;&lt;br /&gt;
&lt;span style="font-size: xx-small;"&gt;LANGUAGE GO&lt;/span&gt;: 12586269025&lt;br /&gt;
&lt;b&gt;real &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;96.56&lt;/b&gt;&lt;br /&gt;
user &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;96.47&lt;br /&gt;
sys &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.06&lt;br /&gt;
&amp;nbsp; &amp;nbsp;1232896 &amp;nbsp;maximum resident set size&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;average shared memory size&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;average unshared data size&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;average unshared stack size&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;300 &amp;nbsp;page reclaims&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;page faults&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;swaps&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;block input operations&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;block output operations&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;messages sent&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;messages received&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;signals received&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 9010 &amp;nbsp;voluntary context switches&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; 1338 &amp;nbsp;involuntary context switches&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Language Rust (0.13.0-nightly&lt;/b&gt; (45cbdec41 2014-11-07 00:02:18 +0000)&lt;b&gt;):&lt;/b&gt;&lt;br /&gt;
&lt;i&gt;/usr/local/bin/rustc --opt-level 3 fib.rs&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;/usr/bin/time -lp ./fib 50&lt;/i&gt;&lt;br /&gt;
&lt;span style="font-size: xx-small;"&gt;LANGUAGE&lt;/span&gt; Rust: 12586269025&lt;br /&gt;
&lt;b&gt;real &amp;nbsp; &amp;nbsp; &amp;nbsp; 101.53&lt;/b&gt;&lt;br /&gt;
user &amp;nbsp; &amp;nbsp; &amp;nbsp; 101.44&lt;br /&gt;
sys &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.01&lt;br /&gt;
&amp;nbsp; &amp;nbsp;1040384 &amp;nbsp;maximum resident set size&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;average shared memory size&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;average unshared data size&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;average unshared stack size&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;229 &amp;nbsp;page reclaims&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 46 &amp;nbsp;page faults&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;swaps&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;block input operations&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;block output operations&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;messages sent&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;messages received&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp;signals received&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp;voluntary context switches&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;914 &amp;nbsp;involuntary context switches&lt;br /&gt;
&lt;br /&gt;
Surprisingly results are as below where CPU usage (real) is as C (52.87) &amp;gt; Go (96.56) &amp;nbsp;&amp;gt; Rust (101.53).&lt;br /&gt;
&lt;br /&gt;
&lt;table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 260px;"&gt;
&lt;!--StartFragment--&gt;
 &lt;colgroup&gt;&lt;col style="width: 65pt;" width="65"&gt;&lt;/col&gt;
 &lt;col style="mso-width-alt: 2304; mso-width-source: userset; width: 54pt;" width="54"&gt;&lt;/col&gt;
 &lt;col style="mso-width-alt: 6016; mso-width-source: userset; width: 141pt;" width="141"&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl63" height="15" style="height: 15.0pt; width: 65pt;" width="65"&gt;&lt;b&gt;Language&lt;/b&gt;&lt;/td&gt;
  &lt;td class="xl63" style="width: 54pt;" width="54"&gt;&lt;b&gt;CPU(real)&lt;/b&gt;&lt;/td&gt;
  &lt;td class="xl63" style="width: 141pt;" width="141"&gt;&lt;b&gt;Memory(Max resident size)&lt;/b&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl64" height="15" style="height: 15.0pt;"&gt;C&lt;/td&gt;
  &lt;td class="xl64"&gt;52.87&lt;/td&gt;
  &lt;td class="xl64"&gt;544K&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl64" height="15" style="height: 15.0pt;"&gt;Go&lt;/td&gt;
  &lt;td class="xl64"&gt;96.56&lt;/td&gt;
  &lt;td class="xl64"&gt;1204K&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl64" height="15" style="height: 15.0pt;"&gt;Rust&lt;/td&gt;
  &lt;td class="xl64"&gt;101.53&lt;/td&gt;
  &lt;td class="xl64"&gt;1016K&lt;/td&gt;
 &lt;/tr&gt;
&lt;!--EndFragment--&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
NOTE: &amp;nbsp;Is there a better way to read command line argument and convert into integer? &amp;nbsp; I felt it was very painful to figure that out.&lt;br /&gt;
&lt;br /&gt;
E.g.&lt;br /&gt;
In C language:&lt;br /&gt;
&lt;span class="kt" style="background-color: white; box-sizing: border-box; color: #445588; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-weight: bold; line-height: 22.399999618530273px; white-space: pre;"&gt;long&lt;/span&gt;&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt; n  = &lt;/span&gt;&lt;span class="nf" style="background-color: white; box-sizing: border-box; color: #945277; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-weight: bold; line-height: 22.399999618530273px; white-space: pre;"&gt;atol&lt;/span&gt;&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt;(argv[&lt;/span&gt;&lt;span class="m" style="background-color: white; box-sizing: border-box; color: #945277; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt;1&lt;/span&gt;&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt;]);&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt;&lt;br /&gt;&lt;/span&gt;
In Go language:&lt;br /&gt;
&lt;span class="nv" style="background-color: white; box-sizing: border-box; color: teal; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt;n&lt;/span&gt;&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt;, &lt;/span&gt;&lt;span class="nv" style="background-color: white; box-sizing: border-box; color: teal; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt;_&lt;/span&gt;&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt; &lt;/span&gt;&lt;span class="o" style="background-color: white; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-weight: bold; line-height: 22.399999618530273px; white-space: pre;"&gt;:=&lt;/span&gt;&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt; strconv.&lt;/span&gt;&lt;span class="nf" style="background-color: white; box-sizing: border-box; color: #945277; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-weight: bold; line-height: 22.399999618530273px; white-space: pre;"&gt;Atoi&lt;/span&gt;&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt;(os.&lt;/span&gt;&lt;span class="nv" style="background-color: white; box-sizing: border-box; color: teal; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt;Args&lt;/span&gt;&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt;[&lt;/span&gt;&lt;span class="m" style="background-color: white; box-sizing: border-box; color: #945277; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt;1&lt;/span&gt;&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt;])&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt;&lt;br /&gt;&lt;/span&gt;
In Rust language:&lt;br /&gt;
&lt;span class="k" style="background-color: white; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-weight: bold; line-height: 22.399999618530273px; white-space: pre;"&gt;let&lt;/span&gt;&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt; &lt;/span&gt;&lt;span class="nv" style="background-color: white; box-sizing: border-box; color: teal; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt;args&lt;/span&gt;&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt; &lt;/span&gt;&lt;span class="o" style="background-color: white; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-weight: bold; line-height: 22.399999618530273px; white-space: pre;"&gt;=&lt;/span&gt;&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt; os::&lt;/span&gt;&lt;span class="nf" style="background-color: white; box-sizing: border-box; color: #945277; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-weight: bold; line-height: 22.399999618530273px; white-space: pre;"&gt;args&lt;/span&gt;&lt;span style="background-color: white; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 22.399999618530273px; white-space: pre;"&gt;()&lt;/span&gt;&lt;span class="o" style="background-color: white; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; font-weight: bold; line-height: 22.399999618530273px; white-space: pre;"&gt;;
&lt;span class="k" style="box-sizing: border-box;"&gt;let&lt;/span&gt;&lt;span style="font-weight: normal;"&gt; &lt;/span&gt;&lt;span class="nv" style="box-sizing: border-box; color: teal; font-weight: normal;"&gt;args&lt;/span&gt;&lt;span style="font-weight: normal;"&gt; &lt;/span&gt;&lt;span class="o" style="box-sizing: border-box;"&gt;=&lt;/span&gt;&lt;span style="font-weight: normal;"&gt; args&lt;/span&gt;&lt;span class="o" style="box-sizing: border-box;"&gt;.&lt;/span&gt;&lt;span class="nf" style="box-sizing: border-box; color: #945277;"&gt;as_slice&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;()&lt;/span&gt;&lt;span class="o" style="box-sizing: border-box;"&gt;;
&lt;/span&gt;&lt;span class="k" style="box-sizing: border-box;"&gt;let&lt;/span&gt;&lt;span style="font-weight: normal;"&gt; &lt;/span&gt;&lt;span class="nv" style="box-sizing: border-box; color: teal; font-weight: normal;"&gt;n&lt;/span&gt;&lt;span style="font-weight: normal;"&gt; &lt;/span&gt;&lt;span class="kt" style="box-sizing: border-box; color: #445588;"&gt;:u64 &lt;/span&gt;&lt;span class="o" style="box-sizing: border-box;"&gt;=&lt;/span&gt;&lt;span style="font-weight: normal;"&gt; from_str::&lt;/span&gt;&lt;span class="o" style="box-sizing: border-box;"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt" style="box-sizing: border-box; color: #445588;"&gt;u64&lt;/span&gt;&lt;span class="o" style="box-sizing: border-box;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;(args[&lt;/span&gt;&lt;span class="m" style="box-sizing: border-box; color: #945277; font-weight: normal;"&gt;1&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;]&lt;/span&gt;&lt;span class="o" style="box-sizing: border-box;"&gt;.&lt;/span&gt;&lt;span class="nf" style="box-sizing: border-box; color: #945277;"&gt;as_slice&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;())&lt;/span&gt;&lt;span class="o" style="box-sizing: border-box;"&gt;.&lt;/span&gt;&lt;span class="nf" style="box-sizing: border-box; color: #945277;"&gt;unwrap&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;()&lt;/span&gt;&lt;span class="o" style="box-sizing: border-box;"&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style="-webkit-text-stroke-width: 0px; color: black; font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;
&lt;div style="margin: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">7</thr:total></item><item><title>Fibonacci(50) performance : Java &gt; C &gt; C++ &gt; D &gt; Go &gt; Terra (Lua) &gt; Lua-JIT (Lua)</title><link>http://joshitech.blogspot.com/2014/10/fibonacci50-performance-java-c-c-d-go.html</link><category>C++</category><category>D</category><category>Go</category><category>Java</category><category>lua</category><category>luajit</category><category>performance fibonacci</category><category>terra</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Mon, 20 Oct 2014 08:32:00 -0400</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-315913201492532342</guid><description>Recently, &amp;nbsp;I have been spending some time to learn D and Go &amp;nbsp;languages. &amp;nbsp;D Lang is an evolution&amp;nbsp;of C++ where as&amp;nbsp;Go is being claimed to be an evolution of C but I think &amp;nbsp;it is a Google's attempt to replace dependency on the Java.&lt;br /&gt;
&lt;br /&gt;
I really like the simplicity of Go where the learning curve is very lean but accepting it as a system level programming would be a tough sell. &amp;nbsp; I think it is more for Java/Python developers for building the enterprise softwares rather than using it for hardware/device-drivers/embedded programming, but you never know as &amp;nbsp;Google is very successful selling &amp;nbsp;Android on low powered smart devices.&lt;br /&gt;
&lt;br /&gt;
I did some performance bench for C, C++, D and Go &amp;nbsp;languages using the Fibonacci algorithm.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="a2a6fd1a-d686-4a63-9de9-2b9b7567d97a" id="1c42ff71-336f-44e7-8473-d1478f942e02"&gt;Results&lt;/span&gt;&lt;/b&gt;: &lt;span style="color: red;"&gt;(see updated results at the end)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
For &lt;a href="https://github.com/rohitjoshi/lang-compare/blob/master/fibonacci/results_fib_25.txt"&gt;Fibonacci&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="25187b16-680b-4896-a821-1094b6ecfbf4" id="288364f1-1c1b-4285-995d-8b5eea0d6db9"&gt;(&lt;/span&gt;25)&lt;/a&gt;, C++ &amp;gt;= Go &amp;gt; &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="25187b16-680b-4896-a821-1094b6ecfbf4" id="83e1048b-3c33-4220-8413-1494e46a65c8"&gt;C&lt;/span&gt; &amp;gt;= Lua-JIT &amp;gt; D &amp;gt; Lua-Terra &amp;gt; Java 1.6 &lt;br /&gt;
&lt;br /&gt;
For &lt;a href="https://github.com/rohitjoshi/lang-compare/blob/master/fibonacci/results_fib_50.txt"&gt;Fibonacci(50)&lt;/a&gt;, Java &amp;gt; C &amp;gt; C++ &amp;gt; D-ldc &amp;gt; D-dmd &amp;gt; Go &amp;gt; Lua-Terra &amp;gt; Lua-JIT&lt;br /&gt;
&lt;br /&gt;
Now surprisingly, &amp;nbsp;Java out performed C/C++ &amp;nbsp;f&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="640f2883-97ea-48cf-853c-1ad78d4014ad" id="76cf97d0-157a-40e6-a6b1-a7f124c288d8"&gt;or &lt;/span&gt;Fibonacci (50) which hurts my ego :)&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="10d1e33a-617b-41df-a8c2-2d9cb721ef81" id="e1b8b56c-20d6-40f2-9423-761cbb01db1c"&gt; !!&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; table-layout: fixed; width: 469px;"&gt;
 &lt;colgroup&gt;&lt;col style="mso-width-alt: 4650; mso-width-source: userset; width: 109pt;" width="109"&gt;&lt;/col&gt;
 &lt;col class="xl77" style="mso-width-alt: 4010; mso-width-source: userset; width: 94pt;" width="94"&gt;&lt;/col&gt;
 &lt;col class="xl70" style="mso-width-alt: 7338; mso-width-source: userset; width: 172pt;" width="172"&gt;&lt;/col&gt;
 &lt;col class="xl86" style="mso-width-alt: 4010; mso-width-source: userset; width: 94pt;" width="94"&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height="20" style="height: 20.0pt;"&gt;
  &lt;td class="xl78" height="20" style="height: 20.0pt; width: 109pt;" width="109"&gt;Language&lt;/td&gt;
  &lt;td class="xl79" style="border-left: none; width: 94pt;" width="94"&gt;% C++ Speed&lt;/td&gt;
  &lt;td class="xl80" style="border-left: none; width: 172pt;" width="172"&gt;Compiler/VM&lt;/td&gt;
  &lt;td class="xl87" style="border-left: none; width: 94pt;" width="94"&gt;Flags&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="20" style="height: 20.0pt;"&gt;
  &lt;td class="xl81" height="20" style="border-top: none; height: 20.0pt;"&gt;FIBONACCI-25&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;&lt;/td&gt;
  &lt;td class="xl83" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;&lt;/td&gt;
  &lt;td class="xl88" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl84" height="15" style="border-top: none; height: 15.0pt;"&gt;C++&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;100.0000&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;Apple
  LLVM version 6.0&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;-&lt;span class="font7"&gt;O3&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl84" height="15" style="border-top: none; height: 15.0pt;"&gt;GO&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;100.0000&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;go
  version go1.3.3 darwin/amd64&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl84" height="15" style="border-top: none; height: 15.0pt;"&gt;C&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;77.7778&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;Apple
  LLVM version 6.0&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;-&lt;span class="font7"&gt;O3&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl84" height="15" style="border-top: none; height: 15.0pt;"&gt;LUA&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;77.7778&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;LuaJIT
  2.0.3&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="30" style="height: 30.0pt;"&gt;
  &lt;td class="xl84" height="30" style="border-top: none; height: 30.0pt;"&gt;D&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;63.6364&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;dmd&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;-m64 -O&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;-inline -noboundscheck&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl84" height="15" style="border-top: none; height: 15.0pt;"&gt;D&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;63.6364&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;ldc&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;-m64
  -O&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;-inline&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl84" height="15" style="border-top: none; height: 15.0pt;"&gt;LUA&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;43.7500&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;Terra&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl84" height="15" style="border-top: none; height: 15.0pt;"&gt;JAVA 1.6&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;43.4783&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;1.6.0_65-b14-462-11M4609)&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl84" height="15" style="border-top: none; height: 15.0pt;"&gt;&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="20" style="height: 20.0pt;"&gt;
  &lt;td class="xl81" height="20" style="border-top: none; height: 20.0pt;"&gt;FIBONACCI-50&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl84" height="15" style="border-top: none; height: 15.0pt;"&gt;JAVA 1.6&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;169.6710&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;1.6.0_65-b14-462-11M4609)&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl84" height="15" style="border-top: none; height: 15.0pt;"&gt;C&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;101.9846&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;Apple
  LLVM version 6.0&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;-&lt;span class="font7"&gt;O3&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl84" height="15" style="border-top: none; height: 15.0pt;"&gt;C++&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;100.0000&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;Apple
  LLVM version 6.0&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;-&lt;span class="font7"&gt;O3&lt;/span&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl84" height="15" style="border-top: none; height: 15.0pt;"&gt;D&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;92.6376&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;ldc&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;-m64
  -O&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;-inline&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="30" style="height: 30.0pt;"&gt;
  &lt;td class="xl84" height="30" style="border-top: none; height: 30.0pt;"&gt;D&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;81.7197&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;dmd&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;-m64 -O&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;-inline -noboundscheck&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl84" height="15" style="border-top: none; height: 15.0pt;"&gt;GO&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;76.7760&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;go
  version go1.3.3 darwin/amd64&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl84" height="15" style="border-top: none; height: 15.0pt;"&gt;LUA&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;43.9684&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;Terra&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr height="15" style="height: 15.0pt;"&gt;
  &lt;td class="xl84" height="15" style="border-top: none; height: 15.0pt;"&gt;LUA&lt;/td&gt;
  &lt;td class="xl82" style="border-left: none; border-top: none;"&gt;38.9649&lt;/td&gt;
  &lt;td class="xl85" style="border-left: none; border-top: none; width: 172pt;" width="172"&gt;LuaJIT
  2.0.3&lt;/td&gt;
  &lt;td class="xl89" style="border-left: none; border-top: none; width: 94pt;" width="94"&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; width: 469px;"&gt;&lt;colgroup&gt;&lt;col style="mso-width-alt: 4650; mso-width-source: userset; width: 109pt;" width="109"&gt;&lt;/col&gt;&lt;col style="mso-width-alt: 4010; mso-width-source: userset; width: 94pt;" width="94"&gt;&lt;/col&gt;&lt;col style="mso-width-alt: 7338; mso-width-source: userset; width: 172pt;" width="172"&gt;&lt;/col&gt;&lt;col style="mso-width-alt: 4010; mso-width-source: userset; width: 94pt;" width="94"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr height="20" style="height: 20.0pt;"&gt;&lt;td class="xl67" height="20" style="height: 20.0pt; width: 109pt;" width="109"&gt;&lt;table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse; table-layout: fixed; width: 469px;"&gt;&lt;colgroup&gt;&lt;col style="mso-width-alt: 4650; mso-width-source: userset; width: 109pt;" width="109"&gt;&lt;/col&gt;&lt;col class="xl77" style="mso-width-alt: 4010; mso-width-source: userset; width: 94pt;" width="94"&gt;&lt;/col&gt;&lt;col class="xl70" style="mso-width-alt: 7338; mso-width-source: userset; width: 172pt;" width="172"&gt;&lt;/col&gt;&lt;col class="xl86" style="mso-width-alt: 4010; mso-width-source: userset; width: 94pt;" width="94"&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/td&gt;&lt;td class="xl68" style="border-left: none; width: 94pt;" width="94"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="xl69" style="border-left: none; width: 172pt;" width="172"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="xl76" style="border-left: none; width: 94pt;" width="94"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
For &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="196a2cdc-e089-4246-bfe1-33cd1353a906" id="644ecee6-3bca-4cd8-b1ad-a54ed16994d1"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="3e0394d9-94b4-44c8-8d2e-65a0c5c36fa8" id="ba036687-cbb5-4906-b523-0b31332b9c48"&gt;Source&lt;/span&gt;&lt;/span&gt; code and results: &amp;nbsp;check out my &lt;a href="https://github.com/rohitjoshi/lang-compare/tree/master/fibonacci"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="363b45db-0e27-4326-b5f5-e7104c08bdb2" id="7acb2660-ae33-444c-bfee-9855b5822317"&gt;github&lt;/span&gt;&lt;/a&gt;&amp;nbsp;project.&lt;br /&gt;
&lt;br /&gt;
Update:&lt;br /&gt;
&lt;span style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;"&gt;It seems Clang on MacOS has some issue. I executed these on my Linux Virtual machine with gnu g++ and g++ is outperforming Java. My ego is intact :)&lt;/span&gt;&lt;br style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;" /&gt;&lt;br style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;" /&gt;&lt;span style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;"&gt;$g++ --version&lt;/span&gt;&lt;br style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;" /&gt;&lt;span style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;"&gt;g++ (GCC) 4.4.7 201&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="08caa218-9bac-4b17-b6ef-333a65ed9511" id="27fb161e-8f6e-4e74-8269-4f333c98dd3e"&gt;2031&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="08caa218-9bac-4b17-b6ef-333a65ed9511" id="daba069e-37ab-4c7b-bb86-b2eb296221d3"&gt;3 &lt;/span&gt;(&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="08caa218-9bac-4b17-b6ef-333a65ed9511" id="898cb8a4-f65b-4bba-80ec-65296c589733"&gt;Re&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="08caa218-9bac-4b17-b6ef-333a65ed9511" id="793f9b2b-1b0b-4632-ac6c-a942b385f0aa"&gt;d H&lt;/span&gt;at &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="ea51f469-4d01-4b3b-9f64-9fef7f43536a" id="aa5e2c8d-db49-4861-a5ae-12e0d2468a34"&gt;4.4.&lt;/span&gt;7-4)&lt;/span&gt;&lt;br style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;" /&gt;&lt;span style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;"&gt;$g++ -&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="ca4755b0-81eb-49fc-b4d1-e53d3add6f7b" id="d6d0843e-dd96-4d05-a8de-a2c2ee7b9859"&gt;O3 f&lt;/span&gt;ib.cpp&lt;/span&gt;&lt;br style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;" /&gt;&lt;span style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;"&gt;time&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8230f9a8-587f-4efa-a2eb-ff2f0a974108" id="ab566eee-1b2f-47c9-994b-8efe2b1a6774"&gt; ./&lt;/span&gt;a.out 50&lt;/span&gt;&lt;br style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;" /&gt;&lt;span style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;"&gt;real 0m47.991s&lt;/span&gt;&lt;br style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;" /&gt;&lt;span style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;"&gt;u&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="56d80a96-56a3-428c-b99b-28e89392614e" id="741403ee-9383-44d3-b575-1cfa0b8ec315"&gt;ser &lt;/span&gt;0m47.981s&lt;/span&gt;&lt;br style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;" /&gt;&lt;span style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;"&gt;sys 0m0.000s&lt;/span&gt;&lt;br style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;" /&gt;&lt;br style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;" /&gt;&lt;span style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;"&gt;$java -version&lt;/span&gt;&lt;br style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;" /&gt;&lt;span style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;"&gt;java &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="59cea606-3ebe-48ad-a23f-4aa7ce657c1b" id="80f0d323-3477-408a-97e1-c632a9641a2b"&gt;vers&lt;/span&gt;i&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="59cea606-3ebe-48ad-a23f-4aa7ce657c1b" id="c946f507-0f16-407d-b943-157959c70a28"&gt;on &lt;/span&gt;"1.&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="2a9575ee-8663-46e7-9cb3-b5db1e5e4687" id="5767a285-a5cc-47d6-aa09-e78058d7b461"&gt;7.0_&lt;/span&gt;51"&lt;/span&gt;&lt;br style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;" /&gt;&lt;span style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;"&gt;$javac &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="b1b6487b-653e-4c25-945b-fa32768f8824" id="14cd07b1-4273-420d-b451-1e26cbfb6fed"&gt;fib.&lt;/span&gt;java&lt;/span&gt;&lt;br style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;" /&gt;&lt;span style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;"&gt;$time &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="79f2d46b-232e-4330-a2df-759eb6beb794" id="b3a67cc0-c56f-4ccb-9f42-96bd57f8083b"&gt;jav&lt;/span&gt;a fib 50&lt;/span&gt;&lt;br style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;" /&gt;&lt;span style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;"&gt;real 0m51.897s&lt;/span&gt;&lt;br style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;" /&gt;&lt;span style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;"&gt;user 0m51.815s&lt;/span&gt;&lt;br style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;" /&gt;&lt;span style="background-color: #f6f6f6; color: #333333; font-family: arial; font-size: 13px; line-height: 20.799999237060547px;"&gt;sys 0m0.113s&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">12</thr:total></item><item><title>Fibonacci numbers:  LuaJIT vs Terra</title><link>http://joshitech.blogspot.com/2014/10/fibonacci-numbers-luajit-vs-terra.html</link><category>lua luajit terra performance fibonacci</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Sun, 19 Oct 2014 21:12:00 -0400</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-8726426649482218572</guid><description>Recently I came across &lt;a href="http://terralang.org/"&gt;Terra &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="3bec7bdd-acfd-4c0a-95a9-c745b34f600b" id="3757b878-b3c6-413c-8a3a-e553375b2adb"&gt;Languange&lt;/span&gt;&lt;/a&gt;&amp;nbsp;which is &amp;nbsp;a&amp;nbsp;&lt;span style="font-family: Ubuntu, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 21px;"&gt;new low-level system programming language that is designed to interoperate seamlessly with the&amp;nbsp;&lt;/span&gt;&lt;span style="color: #444444; font-family: Ubuntu, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 21px;"&gt;Lua&lt;/span&gt;&lt;span style="font-family: Ubuntu, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 21px;"&gt;&amp;nbsp;programming language.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I thought of comparing the performance between &lt;a href="http://luajit.org/"&gt;Lua-Jit&lt;/a&gt; and &lt;a href="http://terralang.org/"&gt;Terra&lt;/a&gt;. &amp;nbsp;We all know Lua-JIT is extremely fast thanks to Mike Pall.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
You can find &lt;a href="https://github.com/rohitjoshi/lang-compare/blob/master/fibonacci/fib.lua"&gt;fib&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="e9cefa2c-d1c6-49c5-912e-ab5cf304d67d" id="47ca5902-c97a-4457-9fba-efee55dac544"&gt;.&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="e9cefa2c-d1c6-49c5-912e-ab5cf304d67d" id="80e35fcd-1b70-4a84-8d0b-efc3c9e5f0d1"&gt;lua&lt;/span&gt;&lt;/a&gt; source code here as &lt;a href="https://github.com/rohitjoshi/lang-compare"&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="e9cefa2c-d1c6-49c5-912e-ab5cf304d67d" id="3e3b256b-8a8d-49cb-999f-cbe2192bf6c5"&gt;lang&lt;/span&gt;-compare&lt;/a&gt;&amp;nbsp; on my github.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;FIBONACCI -&amp;nbsp;25&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="59862f48-1c7b-4078-b876-52cc82ece7ad" id="3da3c349-e683-4b8f-ab3f-fa2e1e4cb5e4"&gt;time&lt;/span&gt;&amp;nbsp;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="59862f48-1c7b-4078-b876-52cc82ece7ad" id="2bce29c5-2f34-45ca-96fb-13e158900cb5"&gt;luajit&lt;/span&gt;-2.0.3&amp;nbsp;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="59862f48-1c7b-4078-b876-52cc82ece7ad" id="02a9bb31-9cc9-42df-a984-528e5a385517"&gt;fib&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="59862f48-1c7b-4078-b876-52cc82ece7ad" id="f1c30cd9-740f-45e8-bf67-818e414dce55"&gt;.&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="59862f48-1c7b-4078-b876-52cc82ece7ad" id="de908e01-fa97-40b2-bf3b-456e532279eb"&gt;lua&lt;/span&gt;&amp;nbsp;25&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
Running LUA-JIT 2.0.3 test&lt;/div&gt;
&lt;div&gt;
LANGUAGE LUA: 75025&lt;/div&gt;
&lt;div&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="85f3e7aa-902d-4465-8acc-68fcd3e4501c" id="f06ad7e5-180f-4888-a1a5-fd4befb9797d"&gt;real&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;0m0.009s&lt;/div&gt;
&lt;div&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="3ee93292-e00d-487a-b2f8-6c2e451d6a44" id="3148bb7f-c622-4922-972b-cf04be7b9135"&gt;user&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;0m0.002s&lt;/div&gt;
&lt;div&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="348cd429-cfc7-4ec8-9285-2a9009ba2a5c" id="86da6340-04eb-4318-832a-3cc06e3668c0"&gt;sys&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;0m0.006s&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Running fib&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="1e128c84-c044-4c1b-a5fe-ecbf886ffd35" id="adb1f391-adbf-400a-8967-24cb44c3a8b4"&gt;.&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="1e128c84-c044-4c1b-a5fe-ecbf886ffd35" id="d0ced66c-b93b-4caf-ae70-5722f69610c5"&gt;lua&lt;/span&gt; with Terra&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="1e128c84-c044-4c1b-a5fe-ecbf886ffd35" id="6bb0f47a-4928-4ec5-ad80-4a8a03828008"&gt; :&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="220d23df-54f6-4732-a29d-af8de60cbcf5" id="b2773e7d-08d6-4e48-b0cf-0402775ce3c1"&gt;time&lt;/span&gt; terra &amp;nbsp;fib&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="220d23df-54f6-4732-a29d-af8de60cbcf5" id="54206c04-7811-449c-9919-d6d6c8761946"&gt;.&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="220d23df-54f6-4732-a29d-af8de60cbcf5" id="f2a15edb-1ce2-4dcc-b81d-d2d79d609ed7"&gt;lua&lt;/span&gt; 25&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Running Terra test&lt;/div&gt;
&lt;div&gt;
LANGUAGE LUA: 75025&lt;/div&gt;
&lt;div&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="95f13b03-f595-494a-9de0-b7e79fed6229" id="b8c88a2e-777c-4db6-8a04-6c4848a71dc7"&gt;real&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;0m0.016s&lt;/div&gt;
&lt;div&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="823bb5fb-c17c-4d85-b049-03f34f4614bb" id="bd472f00-dfec-47a5-8071-6d82bfe13659"&gt;user&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;0m0.005s&lt;/div&gt;
&lt;div&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="f4e032ef-f800-42e1-aae7-35538b4672d3" id="51819f1f-be2a-4c61-a1ce-09e5fedcbd7f"&gt;sys&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;0m0.010s&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here LuaJIT is &lt;b&gt;&lt;span style="color: red;"&gt;77% faster&lt;/span&gt; &lt;/b&gt;than Terra for the same fib&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="6238405d-e34d-48ef-9eae-ef6dbdbd8cbf" id="e076fff8-f6f8-4a29-8c94-4f4dad419d5c"&gt;.&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="6238405d-e34d-48ef-9eae-ef6dbdbd8cbf" id="6669aba0-1199-4328-9f62-57c10b302ecd"&gt;lua&lt;/span&gt; file.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;FIBONACCI -&amp;nbsp;50&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="2c26cc5e-e37e-42c0-8687-07cdbf11bd91" id="4581045c-b534-4358-8562-d2779f8db384"&gt;time&lt;/span&gt;&amp;nbsp;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="2c26cc5e-e37e-42c0-8687-07cdbf11bd91" id="38d1d3a0-33d4-4720-901c-28d49c170540"&gt;luajit&lt;/span&gt;-2.0.3&amp;nbsp;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="2c26cc5e-e37e-42c0-8687-07cdbf11bd91" id="58ea13d5-8b93-4c42-80d4-f04dea007d8a"&gt;fib&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="2c26cc5e-e37e-42c0-8687-07cdbf11bd91" id="a5c11e03-2f1f-49df-9718-bcd044f3892e"&gt;.&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="2c26cc5e-e37e-42c0-8687-07cdbf11bd91" id="10154cd0-a18a-4866-98ec-6554eeca430b"&gt;lua&lt;/span&gt;&amp;nbsp;50&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
Running LUA-JIT test&lt;/div&gt;
&lt;div&gt;
LANGUAGE LUA: 12586269025&lt;/div&gt;
&lt;div&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="df4cd84d-2812-468e-9db3-b4ecd0d320b5" id="c50bf386-6641-4046-a4e4-89f3da638966"&gt;real&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;3m8.326s&lt;/div&gt;
&lt;div&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="b1e06497-de97-45d6-973d-79a8ff9fbdc3" id="7de76491-6372-46fb-9e1c-0aedd8161e51"&gt;user&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;3m8.157s&lt;/div&gt;
&lt;div&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="fe6a92fe-66f1-40e8-a767-8d3c11e2bb20" id="0eeb839a-5d93-43b7-851b-d731b0603705"&gt;sys&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;0m0.045s&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="95a12965-d5a3-4546-b4fc-e98f4f35f24f" id="0e4975e7-6493-4ecb-9921-f4eb7d015924"&gt;time&lt;/span&gt;&amp;nbsp;terra &amp;nbsp;fib&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="95a12965-d5a3-4546-b4fc-e98f4f35f24f" id="4f850a6e-2c6d-4283-9f78-83f2091e72cb"&gt;.&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="95a12965-d5a3-4546-b4fc-e98f4f35f24f" id="09b755dc-37fd-46d7-b79b-dcd468340838"&gt;lua&lt;/span&gt; 50&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
Running Terra test&lt;/div&gt;
&lt;div&gt;
LANGUAGE LUA: 12586269025&lt;/div&gt;
&lt;div&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="454d8812-9470-4632-bf5a-9733be0306a3" id="ed1f38f5-8cf6-4e67-859f-69a57fd80d63"&gt;real&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;2m46.895s&lt;/div&gt;
&lt;div&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="046e7311-dfbf-4ca4-b6ea-350f26743a6e" id="5ba484b6-66d1-40c0-8ddb-d65a8fa9b119"&gt;user&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;2m46.734s&lt;/div&gt;
&lt;div&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="8fe47ef7-114e-456a-a3ff-934f58325248" id="353add6f-745b-4545-b14a-14a7dc9b94ea"&gt;sys&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;0m0.043s&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Here LuaJit is &lt;span style="color: red;"&gt;56% slower&lt;/span&gt; than terra. &amp;nbsp; I ran the same tests multiple times and the results are consistently same where &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="75b53f81-e538-482b-b3e8-6177dddce09c" id="fec9bfa3-41a8-4be0-ac0e-127bd616021a"&gt;terra&lt;/span&gt; is out performing &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="75b53f81-e538-482b-b3e8-6177dddce09c" id="44197bbb-a1c4-4bec-b8a2-d7c6c2871208"&gt;luajit&lt;/span&gt;&amp;nbsp;by ~45% when ran for longer duration.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><title>Apple Push Notification Service (APNS) Simulator</title><link>http://joshitech.blogspot.com/2014/10/apple-push-notification-service-apns.html</link><category>lua APNS simulator</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Thu, 16 Oct 2014 11:28:00 -0400</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-4662012329925909882</guid><description>&lt;h1 style="border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 2.25em; line-height: 1.2; margin-bottom: 16px; margin-left: 0px; margin-right: 0px; margin-top: 0px !important; padding-bottom: 0.3em; position: relative;"&gt;
&lt;/h1&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 15.555556297302246px; line-height: 28.444446563720703px; margin-bottom: 16px;"&gt;
&lt;a href="https://github.com/rohitjoshi/apns-sim"&gt;APNS simulator&lt;/a&gt; &lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="154ab377-0233-4041-a25b-8ce2f74c4f50" id="13538c2e-f3a4-4d2a-a0ee-01d0dcb5be8b"&gt;implementes&lt;/span&gt;&amp;nbsp;&lt;a href="https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #4183c4; text-decoration: none;"&gt;APNS Specs&lt;/a&gt;&amp;nbsp;for a simple and an enhanced push notification.&lt;/div&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 15.555556297302246px; line-height: 28.444446563720703px; margin-bottom: 16px;"&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="9ff566cc-d51a-4196-a9de-d66314944909" id="b1dd84ef-b399-4a24-94e8-8253a1109dc8"&gt;GitHub&lt;/span&gt;:&amp;nbsp;&lt;a href="https://github.com/rohitjoshi/apns-sim"&gt;https://github.com/rohitjoshi/apns-sim&lt;/a&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 15.555556297302246px; line-height: 28.444446563720703px; margin-bottom: 16px;"&gt;
Prerequisite:&lt;/div&gt;
&lt;ol class="task-list" style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 15.555556297302246px; line-height: 28.444446563720703px; margin-bottom: 16px; margin-top: 0px; padding: 0px 0px 0px 2em;"&gt;
&lt;li style="box-sizing: border-box;"&gt;&lt;div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;"&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="88483773-701b-4211-9140-2eba5d674423" id="dad1435f-1794-4368-92a5-f5f60cda8a0f"&gt;LuaJit&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="88483773-701b-4211-9140-2eba5d674423" id="5ea2f1a8-f30a-4eeb-96a5-ca260bd9143c"&gt; :&lt;/span&gt;&amp;nbsp;&lt;a href="http://luajit.org/download.html" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #4183c4; text-decoration: none;"&gt;http://luajit.org/download.html&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;&lt;div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;"&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="2ec91917-d456-4559-864b-2910c73ae9f0" id="81c81e39-dcaf-4538-b17b-8a857445bf39"&gt;LuaSec&lt;/span&gt;&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="2ec91917-d456-4559-864b-2910c73ae9f0" id="666c52cc-168a-4f23-9560-23404a426605"&gt; :&lt;/span&gt;&amp;nbsp;&lt;a href="https://github.com/brunoos/luasec" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #4183c4; text-decoration: none;"&gt;https://github.com/brunoos/luasec&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;&lt;div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;"&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="d4015a0c-41dd-481a-a3ff-8d86378056bf" id="c1eb1b64-1085-45bf-ac7b-10e9fe03ad25"&gt;LuaLogging&lt;/span&gt;:&amp;nbsp;&lt;a href="http://keplerproject.org/lualogging/" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #4183c4; text-decoration: none;"&gt;http://keplerproject.org/lualogging/&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style="box-sizing: border-box;"&gt;&lt;div style="box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;"&gt;
&lt;span class="GINGER_SOFTWARE_mark" ginger_software_uiphraseguid="9362bc94-493c-498d-aace-2ef49a3d8e55" id="24ee215b-cd9f-4061-8c1b-e3806580082d"&gt;copas&lt;/span&gt;:&amp;nbsp;&lt;a href="http://keplerproject.github.io/copas/" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; box-sizing: border-box; color: #4183c4; text-decoration: none;"&gt;http://keplerproject.github.io/copas/&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.333333969116211px; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;Once you have downloaded/installed LuaJit and luarocks, other dependencies can be installed using luarocks
e.g.
luarocks install copas

luarocks install LuaSec

luarocks install LuaLogging
&lt;/pre&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; line-height: 1.45; margin-bottom: 16px; overflow: auto; padding: 16px; word-wrap: normal;"&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Usage: &lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: x-small;"&gt;  apns-sim.lua -t ssl_enabled [ -k ssl_key -c ssl_cert] [ -s server -p port -l loglevel -]

Here ssl_key  and ssl_cert fields are mandatory if ssl_enabled is set to true.  

ssl_enabled :  defaul false
server : default value is 127.0.0.1

port  :  default 8080

loglevel : default value is 'warn'

e.g. for ssl connection:
lua  apns-sim.lua -t true -k ./key.pem -c ./cert.pem

for non-ssl connection:  lua  apns-sim.lua 
&lt;/span&gt;&lt;/pre&gt;
&lt;div style="box-sizing: border-box; color: #333333; font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif; font-size: 15.555556297302246px; line-height: 28.444446563720703px; margin-bottom: 16px;"&gt;
When client connect to this simulator and send a push notification, you will see log entries on console.&lt;/div&gt;
&lt;pre style="background-color: #f7f7f7; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; box-sizing: border-box; color: #333333; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 13.333333969116211px; line-height: 1.45; overflow: auto; padding: 16px; word-wrap: normal;"&gt;Wed Oct 15 09:16:13 2014 INFO Received client connection  from '127.0.0.1:53444':
Wed Oct 15 09:16:13 2014 INFO Received notification: command=1; id=21; expiry=1413382573; token=adf3b210e7adf35f540f45b2697760d9d41081569dc4509ee98bb4d4c92a72ae; payload={"aps":{"alert":{"body":"Hello World"}}}&lt;/pre&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Improving performance of C# Binding for ZeroMQ (clrzmq)</title><link>http://joshitech.blogspot.com/2013/01/improving-performance-of-c-binding-for.html</link><category>C#</category><category>Optimization</category><category>performance</category><category>ZeroMQ</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Fri, 4 Jan 2013 11:55:00 -0500</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-5937587771746337026</guid><description>&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;In one of my project, I used&amp;nbsp;&lt;a href="http://www.zeromq.org/"&gt;ZeroMQ&amp;nbsp;&lt;/a&gt;&amp;nbsp;for inter-process communication which is&amp;nbsp;extremely&amp;nbsp;fast, allows async IO, different messaging patterns and supported on multiple platforms/languages.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;I used &amp;nbsp;following three messaging patterns.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;&lt;b&gt;Publish/Subscribe&lt;/b&gt;: Where client subscribes to specific types of messages. When server reads these messages from hardware, it will publish to these clients.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;&lt;b&gt;Request/Response&lt;/b&gt;: Client can send request to server who execute the request, interact with hardware and get's the response back. E.g Client can request to open a serial port or play an audio.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;&lt;b&gt;Push/Pull&lt;/b&gt;: All clients will push the logs to the central logging server, central logging server pulls the messages and writes to the file.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;As the development is done using C# on &amp;nbsp;Windows Embedded&amp;nbsp;environment, &amp;nbsp;I use &lt;a href="https://github.com/zeromq/clrzmq"&gt;clrzmq &lt;/a&gt;which is a C# binding for ZeroMQ. &amp;nbsp; Based on my initial performance test, I realized that clrzmq is taking lot more CPU than I expected.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;I used RedGate's &lt;a href="http://www.red-gate.com/products/dotnet-development/ants-performance-profiler/"&gt;ANTS performance&lt;/a&gt; profiler for .NET which gives detail analysis on how much &amp;nbsp;CPU cycles are spent on each function and how many times it is called.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;What I &amp;nbsp;found is that ZmqSocket.Receive() method spent it's time on&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 20px;"&gt;SpinWait:17.1%&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 20px;"&gt;Stopwatch.GetElapsedDateTimeTicks: 4.1%&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 20px;"&gt;Stopwatch.StartNew: 2.4%&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 20px;"&gt;Receive: 73.3%&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style="color: #333333; font-family: Georgia, Times New Roman, serif;"&gt;&lt;span style="line-height: 20px;"&gt;In which Receive() function &amp;nbsp;spent 64.4% of the time on SocketProxy.Receive()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 20px;"&gt;ErrorProxy.get_ShouldTryAgain: 5.1%&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 20px;"&gt;SocketProxy.Receive: 64.4%&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style="background-color: #fbfbfb; color: #333333; line-height: 20px;"&gt;&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;Now CPU Usage for SocketProxy.Receive()&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 20px;"&gt;DisposableIntPtr.Dispose: 11.1%&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 20px;"&gt;ZmqMsgT.Init:7.1%&lt;/span&gt;&lt;span style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 20px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 20px;"&gt;ZmqMsgT.Close:5.8%&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="background-color: #fbfbfb; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 13px; line-height: 20px;"&gt;SocketProxy.RetryIfInterrupted: 20.8%&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;&lt;span style="color: #333333;"&gt;&lt;span style="line-height: 20px;"&gt;See the attached Picture where &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: white; line-height: 22px;"&gt;&lt;span style="color: #333333;"&gt;SocketProxy.Receive() uses &lt;/span&gt;&lt;b&gt;&lt;span style="color: red;"&gt;13142.42&lt;/span&gt;&lt;span style="color: #333333;"&gt; CPU ticks&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="background-color: white; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px;"&gt;&lt;b style="color: #333333;"&gt;Average CPU ticks per request = 191,196,025 / 14,548 =&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: white; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px;"&gt;&lt;b&gt;&lt;span style="color: red;"&gt;13142.42&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga9ij-0511FPbX0UAn0VuoY2L8XaDhFmbQTgi4WiT1081-l5F7-stCAxr1Hx6dFlkSp-noFx9031rAn3cID6Sbqko67LN2DWH8fxj_sYfRZOgd1bgbOwO7MOUEzg1bdMq4P5QUvzsj_x4/s1600/ZmqSocketReceive.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="110" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga9ij-0511FPbX0UAn0VuoY2L8XaDhFmbQTgi4WiT1081-l5F7-stCAxr1Hx6dFlkSp-noFx9031rAn3cID6Sbqko67LN2DWH8fxj_sYfRZOgd1bgbOwO7MOUEzg1bdMq4P5QUvzsj_x4/s400/ZmqSocketReceive.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;As part of optimization, &amp;nbsp;I used pre-allocated raw buffer to send and receive data instead of ZmqMsg object, moved StopWatch and SpinWait code in to a limited scope where timeout is defined and longer than certain value.&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
After these optimization, SocketProxy.Receive() uses only&amp;nbsp;&lt;span style="background-color: white; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px;"&gt;&lt;b&gt;&lt;span style="color: red;"&gt;2696.54&lt;/span&gt;&lt;span style="color: #333333;"&gt; CPU ticks &lt;/span&gt;&lt;/b&gt;&lt;span style="color: #333333;"&gt;which is almost &lt;b&gt;1/5&lt;/b&gt; of original cpu usages.&lt;/span&gt;&lt;b style="color: #333333;"&gt;&amp;nbsp;See the attached picture below.&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span style="background-color: white; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px;"&gt;&lt;b style="color: #333333;"&gt;Average CPU ticks per request = 5,132,725,522 / 1,903,448 =&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="background-color: white; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px;"&gt;&lt;b&gt;&lt;span style="color: red;"&gt;2696.54&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim4Wol1V_SCv8f7XG37EJipjR-e-q4sdWIbkL8MSzJtWSlFs-SKt3W8enu8TOaCl-5odEum95I4tP3elqr1zn07mVE8E4r3bE-3Nili53wzfIil-6yof3TbXXkTOz_QzoGJB9WUraiCVg/s1600/ZmqSocketReceive_Improved.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="392" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEim4Wol1V_SCv8f7XG37EJipjR-e-q4sdWIbkL8MSzJtWSlFs-SKt3W8enu8TOaCl-5odEum95I4tP3elqr1zn07mVE8E4r3bE-3Nili53wzfIil-6yof3TbXXkTOz_QzoGJB9WUraiCVg/s400/ZmqSocketReceive_Improved.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;span style="background-color: white; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: 14px; line-height: 22px;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="color: #333333;"&gt;&lt;span style="font-family: Georgia, Times New Roman, serif; line-height: 20px;"&gt;Here is github link for &lt;a href="https://github.com/rohitjoshi/clrzmq-optimized"&gt;optimized ZeroMQ&lt;/a&gt; library.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="font-family: Georgia, Times New Roman, serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="color: #333333;"&gt;&lt;span style="font-family: Georgia, Times New Roman, serif; line-height: 20px;"&gt;I am happy to say that my &lt;a href="https://github.com/zeromq/clrzmq/issues/83"&gt;patch &lt;/a&gt;was accepted by clrzmq author and merge into the mainline clrzmq library.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: x-small;"&gt;&lt;span style="line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style="color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; font-size: x-small;"&gt;&lt;span style="line-height: 20px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga9ij-0511FPbX0UAn0VuoY2L8XaDhFmbQTgi4WiT1081-l5F7-stCAxr1Hx6dFlkSp-noFx9031rAn3cID6Sbqko67LN2DWH8fxj_sYfRZOgd1bgbOwO7MOUEzg1bdMq4P5QUvzsj_x4/s72-c/ZmqSocketReceive.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total></item><item><title>Accessing ZeroMQ from Windows PowerShell</title><link>http://joshitech.blogspot.com/2012/10/accessing-zeromq-from-windows-powershell.html</link><category>C#</category><category>PowerShell</category><category>ZeroMQ</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Wed, 31 Oct 2012 11:27:00 -0400</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-697362523959176600</guid><description>&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;code&gt;&lt;/code&gt;In one of the project, we wanted to write logs from Windows PowerShell script to our central logging server when script is executed to update the packages and restart the windows service. &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;On server side, we implemented ZeroMQ Server (C#) which pulls data from multiple processes and write to the log file using NLog. &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;On client side, I used Windows PowerShell accessing ZeroMQ push socket to push the messages.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Window PowerShell support loading and accessing&amp;nbsp;functionality&amp;nbsp;from any CLR assemblies.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;To load the assembly, you need to use LoadFile function.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: monospace;"&gt;[System.Reflection.Assembly]::LoadFile("C:\zmqclr\bin\clrzmq.dll");&lt;/span&gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;&lt;/code&gt;
&lt;code&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;To create the ZeroMQ Context which is a static function,&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;span style="font-family: monospace;"&gt;[ZeroMQ.ZmqContext]::Create()&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: monospace;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;To create a socket (push) from Zmq Context&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: monospace;"&gt;([ZeroMQ.ZmqSocket]$zmqCtx.CreateSocket([ZeroMQ.SocketType]::PUSH));&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: monospace;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;And now connect to the central logging server on port 10000&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: monospace;"&gt;zmqSocket.Connect("tcp://localhost:10000");&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: monospace;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Once Socket is connected, you can send messages using send function.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: monospace;"&gt;zmqSocket.Send($data, $data.Length, [ZeroMQ.SocketFlags]::None)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Below is the script.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); color: #333333; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 13px; line-height: 19px; margin-top: 15px; overflow: auto; padding: 6px 10px;"&gt;#=======================================================================
# Purpose: Send logs to logging server using ZeroMQ
# Author: Rohit Joshi
# Date: 10/31/2012
#=======================================================================
#Global variables
$global:zmqSocket=$null
$enc = [system.Text.Encoding]::Unicode

#=======================================================================
# Function: Init ZeroMQ
# Arguments:
#=======================================================================
# Purpose: Initialize the zeromq
#=======================================================================
Function InitZeroMQ()
{

  $zmqCtx= [ZeroMQ.ZmqContext]::Create()
  $global:zmqSocket =([ZeroMQ.ZmqSocket]$zmqCtx.CreateSocket([ZeroMQ.SocketType]::PUSH));
  $global:zmqSocket.SendHighWatermark = 5000;
  $global:zmqSocket.Connect("tcp://localhost:10000");
}

#=======================================================================
# Function: SendMessage
# Arguments: string 
#=======================================================================
# Purpose:Send Message
#=======================================================================
Function SendMessage($msg)
{
 $data=$enc.GetBytes($msg) 
 $global:zmqSocket.Send($data, $data.Length, [ZeroMQ.SocketFlags]::None)
}

InitZeroMQ();
SendMessage("Sending data from PowerShell script");&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Map-Reduce implementation in Lua</title><link>http://joshitech.blogspot.com/2012/09/map-reduce-implementation-in-lua.html</link><category>bigdata</category><category>lua</category><category>map-reduce</category><category>mapreduce</category><category>word-count</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Sun, 9 Sep 2012 12:07:00 -0400</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-6264094922391093375</guid><description>&lt;br /&gt;
&lt;div style="background-color: white; border: 0px; color: #333333; font-family: Helvetica, arial, freesans, clean, sans-serif; margin-bottom: 15px; padding: 0px;"&gt;
&lt;div style="font-size: 14px; line-height: 22px;"&gt;
&lt;a href="https://github.com/rohitjoshi/lua-mapreduce"&gt;lua-mapreduce&lt;/a&gt;&amp;nbsp;&lt;span style="background-color: white;"&gt;is a fast and easy MapReduce implementation for lua inspired by other ma-reduce implementation and particularly octopy in python.&lt;/span&gt;&lt;/div&gt;
&lt;div style="border: 0px; font-size: 14px; line-height: 22px; margin-bottom: 15px; margin-top: 15px; padding: 0px;"&gt;
It doesn't aim to meet all your distributed computing needs, but its simple approach is amendable to a large proportion of parallelizable tasks. If your code has a for-loop, there's a good chance that you can make it distributed with just a few small changes.&lt;/div&gt;
&lt;div style="border: 0px; font-size: 14px; line-height: 22px; margin-bottom: 15px; margin-top: 15px; padding: 0px;"&gt;
It uses following lua modules.&lt;/div&gt;
&lt;ol style="border: 0px; font-size: 14px; line-height: 22px; margin: 15px 0px; padding: 0px 0px 0px 30px;"&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;a href="http://w3.impa.br/~diego/software/luasocket/" style="border: 0px; color: #4183c4; margin: 0px; padding: 0px; text-decoration: none;"&gt;lausocket&lt;/a&gt;: tcp client-server connectivity&lt;/li&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;a href="http://keplerproject.github.com/copas/" style="border: 0px; color: #4183c4; margin: 0px; padding: 0px; text-decoration: none;"&gt;copas&lt;/a&gt;: Coroutine Oriented Portable Asynchronous Services for Lua&lt;/li&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;a href="https://github.com/rohitjoshi/lua-mapreduce/www.keplerproject.org/lualogging" style="border: 0px; color: #4183c4; margin: 0px; padding: 0px; text-decoration: none;"&gt;lualogging&lt;/a&gt;&lt;/li&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;a href="https://github.com/fab13n/metalua/blob/master/src/lib/serialize.lua" style="border: 0px; color: #4183c4; margin: 0px; padding: 0px; text-decoration: none;"&gt;serialize&lt;/a&gt;(included in this project)&lt;/li&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;a href="http://keplerproject.github.com/luafilesystem/" style="border: 0px; color: #4183c4; margin: 0px; padding: 0px; text-decoration: none;"&gt;luafilesystem&lt;/a&gt;: Used only in the task-file example to list files from the directory. lua-mapreduce client/server doesn't depend on this module&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="border: 0px; font-size: 14px; line-height: 22px; margin-bottom: 15px; margin-top: 15px; padding: 0px;"&gt;
For windows, you can install&amp;nbsp;&lt;a href="http://code.google.com/p/luaforwindows/" style="border: 0px; color: #4183c4; margin: 0px; padding: 0px; text-decoration: none;"&gt;luaforwindows&lt;/a&gt;&amp;nbsp;which includes these modules.&lt;/div&gt;
&lt;div style="border: 0px; font-size: 14px; line-height: 22px; margin-bottom: 15px; margin-top: 15px; padding: 0px;"&gt;
For Linux/Unix/MacOS and Windows: you can use&amp;nbsp;&lt;a href="http://luadist.org/" style="border: 0px; color: #4183c4; margin: 0px; padding: 0px; text-decoration: none;"&gt;LuaDist&lt;/a&gt;&lt;/div&gt;
&lt;h3 style="-webkit-font-smoothing: antialiased; border: 0px; cursor: text; font-size: 18px; line-height: 22px; margin: 20px 0px 10px; padding: 0px; position: relative;"&gt;
Directory structure:&lt;/h3&gt;
&lt;ol style="border: 0px; font-size: 14px; line-height: 22px; margin: 15px 0px; padding: 0px 0px 0px 30px;"&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;div style="border: 0px; margin-bottom: 15px; padding: 0px;"&gt;
&lt;a href="https://github.com/rohitjoshi/lua-mapreduce/blob/master/lua-mapreduce-server.lua" style="border: 0px; color: #4183c4; margin: 0px; padding: 0px; text-decoration: none;"&gt;lua-mapreduce-server.lua&lt;/a&gt;&amp;nbsp;: It is a map-reduce server which receives the connections from clients, sends them task-file and than sends them tasks to perform map/reduce functionality.&lt;/div&gt;
&lt;/li&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;div style="border: 0px; margin-bottom: 15px; padding: 0px;"&gt;
&lt;a href="https://github.com/rohitjoshi/lua-mapreduce/blob/master/lua-mapreduce-client.lua" style="border: 0px; color: #4183c4; margin: 0px; padding: 0px; text-decoration: none;"&gt;lua-mapreduce-client.lua&lt;/a&gt;&amp;nbsp;: It connects to the server, receives the task and executes map/reduce functions defines in the task-file&lt;/div&gt;
&lt;/li&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;div style="border: 0px; margin-bottom: 15px; padding: 0px;"&gt;
&lt;a href="https://github.com/rohitjoshi/lua-mapreduce/blob/master/utils/utils.lua" style="border: 0px; color: #4183c4; margin: 0px; padding: 0px; text-decoration: none;"&gt;utils/utils.lua&lt;/a&gt;&amp;nbsp;: Provides utility functionality&lt;/div&gt;
&lt;/li&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;div style="border: 0px; margin-bottom: 15px; padding: 0px;"&gt;
&lt;a href="https://github.com/rohitjoshi/lua-mapreduce/blob/master/utils/serialize.lua" style="border: 0px; color: #4183c4; margin: 0px; padding: 0px; text-decoration: none;"&gt;utils/serialize.lua&lt;/a&gt;&amp;nbsp;: Provides table serialization functionality&lt;/div&gt;
&lt;/li&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;div style="border: 0px; margin-bottom: 15px; padding: 0px;"&gt;
&lt;a href="https://github.com/rohitjoshi/lua-mapreduce/blob/master/example/word-count-taskfile.lua"&gt;example/word-count-taskfile.lua&lt;/a&gt;&amp;nbsp;: Example task-file for counting words from all .lua files in current directory More details on how to create task file is given in&amp;nbsp;&lt;a href="https://github.com/rohitjoshi/lua-mapreduce/wiki/Example---word-count" style="border: 0px; color: #4183c4; margin: 0px; padding: 0px; text-decoration: none;"&gt;word-count example&lt;/a&gt;&amp;nbsp;page of wiki.&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 style="-webkit-font-smoothing: antialiased; border: 0px; cursor: text; font-size: 18px; line-height: 22px; margin: 20px 0px 10px; padding: 0px; position: relative;"&gt;
Usage:&lt;/h3&gt;
&lt;ol style="border: 0px; font-size: 14px; line-height: 22px; margin: 15px 0px; padding: 0px 0px 0px 30px;"&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;div style="border: 0px; margin-bottom: 15px; padding: 0px;"&gt;
Start Server: lua-mapreduce-server.lua -t task-file.lua [-s server-ip -p port -l loglevel]&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;div style="background-color: white; font-size: 14px; line-height: 22px;"&gt;
&amp;nbsp; &amp;nbsp;2. Start Client: lua-mapreduce-client.lua [-s server-ip -p port -l loglevel]&lt;/div&gt;
&lt;div style="background-color: white; font-size: 14px; line-height: 22px;"&gt;
&lt;/div&gt;
&lt;div id="head" style="border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-width: 0px 0px 1px; margin: 14px 0px 5px; overflow: hidden; padding: 5px 0px;"&gt;
&lt;br /&gt;
&lt;h1 class="instapaper_title" style="border: 0px; margin: 0px; padding: 2px 0px 0px;"&gt;
&lt;span style="font-size: 14px; line-height: 22px;"&gt;Creating a task file:&lt;/span&gt;&lt;/h1&gt;
&lt;/div&gt;
&lt;div id="wiki-content" style="border: 0px; font-size: 10px; line-height: 14px; margin: 0px; padding: 0px;"&gt;
&lt;div class="wrap" style="border: 0px; margin: 0px; padding: 0px;"&gt;
&lt;div class="gollum-markdown-content instapaper_body" id="wiki-body" style="border: 0px; margin: 0px; padding: 0px;"&gt;
&lt;div class="markdown-body" style="border: 0px; font-size: 14px; line-height: 1.6; margin: 0px; padding: 0px;"&gt;
&lt;div style="border: 0px; margin-bottom: 15px; margin-top: 15px; padding: 0px;"&gt;
example/word-counttask-file.lua is a sample task-file for work count which implements following functions. Each of these functions are invoked using coroutines to avoid non-blocking calls so as well as returning results one entry at a time to save the memory.&lt;/div&gt;
&lt;div style="border: 0px; margin-bottom: 15px; margin-top: 15px; padding: 0px;"&gt;
All these functions must be defines as part of table and return this table in function mapreduce()&lt;/div&gt;
&lt;h3 style="-webkit-font-smoothing: antialiased; border: 0px; cursor: text; font-size: 18px; margin: 20px 0px 10px; padding: 0px; position: relative;"&gt;
Server required functions:&lt;/h3&gt;
&lt;ol style="border: 0px; margin: 15px 0px; padding: 0px 0px 0px 30px;"&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;strong style="border: 0px; margin: 0px; padding: 0px;"&gt;taskfn&lt;/strong&gt;: It reads the source and creates the map of the tasks. E.g For word count, it reads the all file with .lua from current directory and creates a map with key as a file name and content as a value.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre style="background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 13px; line-height: 19px; margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px;"&gt;    mr.taskfn = function()
        --logger:debug("Getting map task")
        local tasks = read_source()  -- read source is utility function defined to read data source
        for key, value in pairs(tasks) do
            coroutine.yield(key, value)
        end
    end
&lt;/pre&gt;
&lt;div style="border: 0px; margin-bottom: 15px; margin-top: 15px; padding: 0px;"&gt;
Here read_source() is a local function defined as below. NOTE: it uses luafilesystem (lfs) module to read the files&lt;/div&gt;
&lt;pre style="background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 13px; line-height: 19px; margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px;"&gt;    local function read_source()
      --local file_path = system.pathForFile( "*.lua", lfs.currentdir() )
      local file_path = lfs.currentdir()
      --logger:debug("Current directory path:" .. file_path)
      local source_table = {}
      for file in lfs.dir(file_path) do
        if(string.find(file, ".lua") ~= nil) then
        --  logger:debug("File name:" .. file_path .. "/" .. file)
            local c = read_file(file_path .. "/" .. file)
        --  logger:debug("file:" .. file .. ", length:" .. #c)

            if( c ~= nil) then
                source_table[file]=c
            end
        end
      end
      return source_table
    end
&lt;/pre&gt;
&lt;ol style="border: 0px; margin: 15px 0px; padding: 0px 0px 0px 30px;"&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;strong style="border: 0px; margin: 0px; padding: 0px;"&gt;finalfn&lt;/strong&gt;&amp;nbsp;: How to output final result. Here it prints on the console.&lt;pre style="background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 13px; line-height: 19px; margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px;"&gt;mr.finalfn = function (results)
    print("Final results of the task:")
    for key, value in pairs(results) do
        print( key .. ":" .. value)
        coroutine.yield()
    end
end
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 style="-webkit-font-smoothing: antialiased; border: 0px; cursor: text; font-size: 18px; margin: 20px 0px 10px; padding: 0px; position: relative;"&gt;
Client required functions:&lt;/h3&gt;
&lt;ol style="border: 0px; margin: 15px 0px; padding: 0px 0px 0px 30px;"&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;div style="border: 0px; margin-bottom: 15px; padding: 0px;"&gt;
&lt;strong style="border: 0px; margin: 0px; padding: 0px;"&gt;mapfn&lt;/strong&gt;: Map function which processes the task (content of the file here) and splits into lines and each lines into words&lt;/div&gt;
&lt;pre style="background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 13px; line-height: 19px; margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px;"&gt;-- Map function : Here it splits the content of the files into lines and each line into words
mr.mapfn = function(key, value)
    --logger:debug("mapfn with key:" .. key .. ", value :" .. value .. "\r\n\r\n")
    local file_words = {}

&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); font-family: Consolas, 'Liberation Mono', Courier, monospace; margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px;"&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: none; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; margin: 0px; padding: 0px;"&gt;local lines = value:split("[^\r\n%s]+")
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="border: 0px; margin-bottom: 15px; margin-top: 15px; padding: 0px;"&gt;
--  logger:debug("Number of lines in " .. #lines .. " in the file " .. key)&lt;/div&gt;
&lt;pre style="border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); font-family: Consolas, 'Liberation Mono', Courier, monospace; margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px;"&gt;&lt;code style="background-color: transparent; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: none; font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; margin: 0px; padding: 0px;"&gt;for k, w in  ipairs(lines) do

    if(w ~= nil) then

        local words = {}
        string.gsub(w, "(%a+)", function (word)
            table.insert(words, string.lower(word))
        end)

        --local words = w:split("[^ %s]+")

        if(words ~= nil) then
            --logger:debug("Number of words in line " .. k .. " are " .. #words)
            for j=1, #words do
                --logger:debug("mapfn:yielding " .. words[j])
                coroutine.yield(words[j], 1)

            end
        end
    end
end
&lt;/code&gt;&lt;/pre&gt;
&lt;div style="border: 0px; margin-bottom: 15px; margin-top: 15px; padding: 0px;"&gt;
end&lt;/div&gt;
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;ol style="border: 0px; margin: 15px 0px; padding: 0px 0px 0px 30px;"&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;&lt;strong style="border: 0px; margin: 0px; padding: 0px;"&gt;reducefn&lt;/strong&gt;&amp;nbsp;: Reduce function which processes the number of occurrences for a word. Here it returns the size of an array.&lt;/li&gt;
&lt;/ol&gt;
&lt;pre style="background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(204, 204, 204); font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 13px; line-height: 19px; margin-top: 15px; overflow: auto; padding: 6px 10px;"&gt;    ---Reduce function: It returns the numbe of entries for the values

    mr.reducefn = function (key, value)
        --logger:debug("reducefn: for key:" .. key ..  ", number of words  :" .. #value)
        coroutine.yield(key, #value)
    end&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style="font-size: 14px; line-height: 22px;"&gt;
&lt;/div&gt;
&lt;ol style="border: 0px; font-size: 14px; line-height: 22px; margin: 15px 0px; padding: 0px 0px 0px 30px;"&gt;
&lt;/ol&gt;
&lt;h3 style="-webkit-font-smoothing: antialiased; border: 0px; cursor: text; font-size: 18px; line-height: 22px; margin: 20px 0px 10px; padding: 0px; position: relative;"&gt;
&amp;nbsp;Todo&lt;/h3&gt;
&lt;ol style="border: 0px; font-size: 14px; line-height: 22px; margin-bottom: 0px !important; margin-left: 0px; margin-right: 0px; margin-top: 15px; padding: 0px 0px 0px 30px;"&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;Add support to handled failed task. currently if client disconnect, the task handled by the client is lost&lt;/li&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;Support for multiple client connections based on number of cores available on the computer. Use copas for async&lt;/li&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;Ability to send multiple task-files to the server.&lt;/li&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;Add more example of task-files&lt;/li&gt;
&lt;li style="border: 0px; margin: 0px; padding: 0px;"&gt;Possibly integrate with apache-mesos&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>Performance: Nginx, RestExpress, CppCMS, Playframework, Gwan</title><link>http://joshitech.blogspot.com/2012/04/performance-nginx-netty-cppcms.html</link><category>CppCMS</category><category>Gwan</category><category>Nginx</category><category>performance</category><category>Play 2.0</category><category>RestExpress</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Sat, 7 Apr 2012 05:05:00 -0400</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-1292807884294299082</guid><description>Quick and not-scientific performance test comparison. Goal of this test is to find out how fast is the engine for my car. No car is faster than it's engine capacity. Ofcourse engine is not everything and we can't ride on the engine but it's good to know.&lt;br /&gt;
&lt;br /&gt;
Concurrency Level : 200&lt;br /&gt;
Total Request: 100,000&lt;br /&gt;
OS: Linux ubuntu 2.6.38-13-generic #57-Ubuntu SMP Mon Mar 5 18:29:54 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux&lt;br /&gt;
&lt;br /&gt;
NOTE: I have updated PlayFramework results by using "play start" command as some one mentioned in comment which has improved performance drastically.&lt;br /&gt;
&lt;h3&gt;
Summary: &lt;/h3&gt;
&lt;table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; table-layout: fixed; width: 415px;"&gt;&lt;colgroup&gt; &lt;col style="mso-width-alt: 5083; mso-width-source: userset; width: 120pt;" width="120"&gt;&lt;/col&gt;   &lt;col style="mso-width-alt: 2121; mso-width-source: userset; width: 70pt;" width="58"&gt;&lt;/col&gt;   &lt;col span="2" style="mso-width-alt: 2962; mso-width-source: userset; width: 70pt;" width="81"&gt;&lt;/col&gt;   &lt;col style="mso-width-alt: 2048; mso-width-source: userset; width: 70pt;" width="56"&gt;&lt;/col&gt;   &lt;/colgroup&gt; &lt;tbody&gt;
&lt;tr height="20" style="height: 15.0pt;"&gt;    &lt;td class="xl6513017" height="20" style="font-weight: bold; height: 15.0pt; width: 90pt;" width="100"&gt;&lt;/td&gt;   &lt;td class="xl6613017" style="border-left: 1pt; font-weight: bold; width: 44pt;" width="85"&gt;Nginx&lt;/td&gt;  &lt;td class="xl6613017" style="border-left: none; font-weight: bold; width: 61pt;" width="85"&gt;CppCMS&lt;/td&gt;   &lt;td class="xl6613017" style="border-left: none; font-weight: bold; width: 61pt;" width="100"&gt;RestExpress&lt;/td&gt;   &lt;td class="xl6613017" style="border-left: none; font-weight: bold; width: 42pt;" width="85"&gt;Play2.0&lt;/td&gt;   &lt;td class="xl6613017" style="border-left: none; font-weight: bold; width: 42pt;" width="85"&gt;Gwan&lt;/td&gt;   &lt;/tr&gt;
&lt;tr height="20" style="height: 15.0pt;"&gt;    &lt;td class="xl6513017" height="20" style="border-top: none; font-weight: bold; height: 15.0pt;"&gt;Time taken (sec)&lt;/td&gt;   &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;14.17&lt;/td&gt;  &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;14.724&lt;/td&gt;   &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;19.653&lt;/td&gt;   &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;20.896&lt;/td&gt;    &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;25.348&lt;/td&gt; &lt;/tr&gt;
&lt;tr height="20" style="height: 15.0pt;"&gt;    &lt;td class="xl6513017" height="20" style="border-top: none; font-weight: bold; font-weight: bold; height: 15.0pt;"&gt;Mean request time ms&lt;/td&gt;   &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;28.34&lt;/td&gt;   &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;29.448&lt;/td&gt;    &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;39.448&lt;/td&gt;   &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;41.793&lt;/td&gt;   &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;50.697&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height="20" style="height: 15.0pt;"&gt;    &lt;td class="xl6513017" height="20" style="border-top: none; font-weight: bold; height: 15.0pt;"&gt;Total requests/sec&lt;/td&gt;    &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;&lt;b&gt;7057.28&lt;/b&gt;&lt;/td&gt;     &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;6791.69&lt;/td&gt;    &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;5088.19&lt;/td&gt;    &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;4785.52&lt;/td&gt;   &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;3945.03&lt;/td&gt;   &lt;/tr&gt;
&lt;tr height="20" style="height: 15.0pt;"&gt;    &lt;td class="xl6513017" height="20" style="border-top: none; font-weight: bold; height: 15.0pt;"&gt;Transfer rate (kb/s)&lt;/td&gt;    &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;2494.86&lt;/td&gt;    &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;1883.63&lt;/td&gt;    &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;1157.76&lt;/td&gt;    &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;1065.53&lt;/td&gt;    &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;1587.46&lt;/td&gt;    &lt;/tr&gt;
&lt;tr height="20" style="height: 15.0pt;"&gt;    &lt;td class="xl6513017" height="20" style="border-top: none; font-weight: bold; height: 15.0pt;"&gt;Failed Requests&lt;/td&gt;     &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;0&lt;/td&gt;    &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;0&lt;/td&gt;    &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;0&lt;/td&gt;    &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;0&lt;/td&gt;  &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;2843&lt;/td&gt;    &lt;/tr&gt;
&lt;tr height="20" style="height: 15.0pt;"&gt;    &lt;td class="xl6713017" height="20" style="border-top: none; height: 15.0pt;"&gt;&lt;/td&gt;   &lt;td class="xl6713017" style="border-left: none; border-top: none;"&gt;&lt;/td&gt;   &lt;td class="xl6713017" style="border-left: none; border-top: none;"&gt;&lt;/td&gt;    &lt;td class="xl6713017" style="border-left: none; border-top: none;"&gt;&lt;/td&gt;   &lt;td class="xl6713017" style="border-left: none; border-top: none;"&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr height="20" style="height: 15.0pt;"&gt;    &lt;td class="xl6813017" height="20" style="border-top: none; color: red; font-weight: bold; height: 15.0pt;"&gt;With Nginx Frontend&lt;/td&gt;   &lt;td class="xl6913017" style="border-left: none; border-top: none; font-weight: bold;"&gt;CppCMS&lt;/td&gt;    &lt;td class="xl6913017" style="border-left: none; border-top: none; font-weight: bold;"&gt;RestExpress&lt;/td&gt;  &lt;td class="xl6913017" style="border-left: none; border-top: none; font-weight: bold;"&gt;Play2.0&lt;/td&gt;   &lt;td class="xl6713017" style="border-left: none; border-top: none; font-weight: bold;"&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height="20" style="height: 15.0pt;"&gt;    &lt;td class="xl6513017" height="20" style="border-top: none; font-weight: bold; height: 15.0pt;"&gt;Time taken (sec)&lt;/td&gt;      &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;14.672&lt;/td&gt;     &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;23.64&lt;/td&gt;      &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;26.810&lt;/td&gt;     &lt;td class="xl6713017" style="border-left: none; border-top: none;"&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height="20" style="height: 15.0pt;"&gt;   &lt;td class="xl6513017" height="20" style="border-top: none; font-weight: bold; height: 15.0pt;"&gt;Req  per&amp;nbsp; sec (ms)&lt;/td&gt;    &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;29.345&lt;/td&gt;   &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;47.281&lt;/td&gt;   &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;53.621&lt;/td&gt;   &lt;td class="xl6713017" style="border-left: none; border-top: none;"&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr height="20" style="height: 15.0pt;"&gt;    &lt;td class="xl6713017" height="20" style="border-top: none; font-weight: bold; height: 15.0pt;"&gt;Reqs per sec&lt;/td&gt;    &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;&lt;b&gt;6815.00&lt;/b&gt;&lt;/td&gt;   &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;4230.05&lt;/td&gt;   &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;3729.90&lt;/td&gt;   &lt;td class="xl6713017" style="border-left: none; border-top: none;"&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height="20" style="height: 15.0pt;"&gt;   &lt;td class="xl6513017" height="20" style="border-top: none; font-weight: bold; height: 15.0pt;"&gt;Transfer rate (kb/s)&lt;/td&gt;   &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;2076.62&lt;/td&gt;   &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;1206.23&lt;/td&gt;   &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;1114.60&lt;/td&gt;   &lt;td class="xl6713017" style="border-left: none; border-top: none;"&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height="20" style="height: 15.0pt;"&gt;   &lt;td class="xl6513017" height="20" style="border-top: none; font-weight: bold; height: 15.0pt;"&gt;Failed-Requests&lt;/td&gt;   &lt;td align="right" class="xl6913017" style="border-left: none; border-top: none; color: red;"&gt;18&lt;/td&gt;   &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;0&lt;/td&gt;   &lt;td align="right" class="xl6713017" style="border-left: none; border-top: none;"&gt;0&lt;/td&gt;   &lt;td class="xl6713017" style="border-left: none; border-top: none;"&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr height="0" style="display: none;"&gt;   &lt;td style="width: 104pt;" width="139"&gt;&lt;/td&gt;   &lt;td style="width: 44pt;" width="58"&gt;&lt;/td&gt;   &lt;td style="width: 61pt;" width="81"&gt;&lt;/td&gt;   &lt;td style="width: 61pt;" width="81"&gt;&lt;/td&gt;   &lt;td style="width: 42pt;" width="56"&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; table-layout: fixed; width: 415px;"&gt;&lt;colgroup&gt; &lt;col style="width: 100pt;" width="150"&gt;&lt;/col&gt; &lt;col style="width: 70pt;" width="58"&gt;&lt;/col&gt; &lt;col span="2" style="width: 70pt;" width="81"&gt;&lt;/col&gt; &lt;col style="width: 70pt;" width="56"&gt;&lt;/col&gt; &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr class="xl6513017" height="20" style="height: 15pt;"&gt;&lt;td height="20" style="font-weight: bold; height: 15pt; width: 250pt;" width="139"&gt;&lt;/td&gt; &lt;td class="xl6513017" style="border-left-color: initial; border-left-style: initial; border-left-width: 1pt; font-weight: bold; width: 44pt;" width="85"&gt;Nginx&lt;/td&gt; &lt;td class="xl6613017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; font-weight: bold; width: 61pt;" width="85"&gt;CppCMS&lt;/td&gt; &lt;td class="xl6613017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; font-weight: bold; width: 61pt;" width="100"&gt;RestExpress&lt;/td&gt; &lt;td class="xl6613017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; font-weight: bold; width: 42pt;" width="85"&gt;Play2.0&lt;/td&gt; &lt;td class="xl6613017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; font-weight: bold; width: 42pt;" width="85"&gt;Gwan&lt;/td&gt; &lt;/tr&gt;
&lt;tr height="20" style="height: 15pt;"&gt; &lt;td class="xl6513017" height="20" style="border-top-color: initial; border-top-style: none; border-top-width: initial; font-weight: bold; height: 15pt;"&gt;CPU%&lt;/td&gt; &lt;td align="right" class="xl6713017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; border-top-color: initial; border-top-style: none; border-top-width: initial;"&gt;90&lt;/td&gt; &lt;td align="right" class="xl6713017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; border-top-color: initial; border-top-style: none; border-top-width: initial;"&gt;237&lt;/td&gt; &lt;td align="right" class="xl6713017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; border-top-color: initial; border-top-style: none; border-top-width: initial;"&gt;254&lt;/td&gt; &lt;td align="right" class="xl6713017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; border-top-color: initial; border-top-style: none; border-top-width: initial;"&gt;210&lt;/td&gt; &lt;td align="right" class="xl6713017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; border-top-color: initial; border-top-style: none; border-top-width: initial;"&gt;360&lt;/td&gt; &lt;/tr&gt;
&lt;tr height="20" style="height: 15pt;"&gt; &lt;td class="xl6513017" height="20" style="border-top-color: initial; border-top-style: none; border-top-width: initial; font-weight: bold; height: 15pt;"&gt;Memory (RES)&lt;/td&gt; &lt;td align="right" class="xl6713017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; border-top-color: initial; border-top-style: none; border-top-width: initial;"&gt;10088&lt;/td&gt; &lt;td align="right" class="xl6713017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; border-top-color: initial; border-top-style: none; border-top-width: initial;"&gt;34m&lt;/td&gt; &lt;td align="right" class="xl6713017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; border-top-color: initial; border-top-style: none; border-top-width: initial;"&gt;404m&lt;/td&gt; &lt;td align="right" class="xl6713017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; border-top-color: initial; border-top-style: none; border-top-width: initial;"&gt;577m&lt;/td&gt; &lt;td align="right" class="xl6713017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; border-top-color: initial; border-top-style: none; border-top-width: initial;"&gt;30m&lt;/td&gt;&lt;/tr&gt;
&lt;tr height="20" style="height: 15pt;"&gt;&lt;td class="xl6513017" height="20" style="border-top-color: initial; border-top-style: none; border-top-width: initial; font-weight: bold; height: 15pt;"&gt;Memory (SHR)&lt;/td&gt; &lt;td align="right" class="xl6713017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; border-top-color: initial; border-top-style: none; border-top-width: initial;"&gt;3424&lt;/td&gt; &lt;td align="right" class="xl6713017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; border-top-color: initial; border-top-style: none; border-top-width: initial;"&gt;4444&lt;/td&gt; &lt;td align="right" class="xl6713017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; border-top-color: initial; border-top-style: none; border-top-width: initial;"&gt;9996&lt;/td&gt; &lt;td align="right" class="xl6713017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; border-top-color: initial; border-top-style: none; border-top-width: initial;"&gt;14m&lt;/td&gt; &lt;td align="right" class="xl6713017" style="border-left-color: initial; border-left-style: none; border-left-width: initial; border-top-color: initial; border-top-style: none; border-top-width: initial;"&gt;7704&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;b&gt;CppCMS + Nginx front end:&lt;/b&gt;&lt;br /&gt;
CPU% &amp;nbsp;: 247% ( CppCMS + Nginx)&lt;br /&gt;
CPU%: &amp;nbsp;149% (CppCMS)&lt;br /&gt;
Memory (RES) : 17252 (CppCMS + Nginx)&lt;br /&gt;
Memory (SHR): &amp;nbsp;8260 (CppCMS + Nginx)&lt;br /&gt;
Memory (RES) : 6700 (CppCMS)&lt;br /&gt;
Memory (SHR): 4444 (CppCMS)&lt;br /&gt;
&lt;h4&gt;
&lt;b&gt;1. &amp;nbsp;Nginx (0.8.54)&lt;/b&gt;&lt;/h4&gt;
$ ab -n 100000 -c 200 http://localhost:80/&lt;br /&gt;
This is ApacheBench, Version 2.3 &amp;lt;$Revision: 655654 $&amp;gt;&lt;br /&gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/&lt;br /&gt;
Licensed to The Apache Software Foundation, http://www.apache.org/&lt;br /&gt;
&lt;br /&gt;
Benchmarking localhost (be patient)&lt;br /&gt;
Completed 10000 requests&lt;br /&gt;
Completed 20000 requests&lt;br /&gt;
Completed 30000 requests&lt;br /&gt;
Completed 40000 requests&lt;br /&gt;
Completed 50000 requests&lt;br /&gt;
Completed 60000 requests&lt;br /&gt;
Completed 70000 requests&lt;br /&gt;
Completed 80000 requests&lt;br /&gt;
Completed 90000 requests&lt;br /&gt;
Completed 100000 requests&lt;br /&gt;
Finished 100000 requests&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Server Software: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;nginx/0.8.54&lt;br /&gt;
Server Hostname: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;localhost&lt;br /&gt;
Server Port: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;80&lt;br /&gt;
&lt;br /&gt;
Document Path: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/&lt;br /&gt;
Document Length: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;151 bytes&lt;br /&gt;
&lt;br /&gt;
Concurrency Level: &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;br /&gt;
Time taken for tests: &amp;nbsp; 14.170 seconds&lt;br /&gt;
Complete requests: &amp;nbsp; &amp;nbsp; &amp;nbsp;100000&lt;br /&gt;
Failed requests: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;br /&gt;
Write errors: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;br /&gt;
Total transferred: &amp;nbsp; &amp;nbsp; &amp;nbsp;36200000 bytes&lt;br /&gt;
HTML transferred: &amp;nbsp; &amp;nbsp; &amp;nbsp; 15100000 bytes&lt;br /&gt;
Requests per second: &amp;nbsp; &amp;nbsp;7057.28 [#/sec] (mean)&lt;br /&gt;
Time per request: &amp;nbsp; &amp;nbsp; &amp;nbsp; 28.340 [ms] (mean)&lt;br /&gt;
Time per request: &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.142 [ms] (mean, across all concurrent requests)&lt;br /&gt;
Transfer rate: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2494.86 [Kbytes/sec] received&lt;br /&gt;
&lt;br /&gt;
Connection Times (ms)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; min &amp;nbsp;mean[+/-sd] median &amp;nbsp; max&lt;br /&gt;
Connect: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5 &amp;nbsp; 13 &amp;nbsp; 6.5 &amp;nbsp; &amp;nbsp; 13 &amp;nbsp; &amp;nbsp; 141&lt;br /&gt;
Processing: &amp;nbsp; &amp;nbsp; 3 &amp;nbsp; 15 &amp;nbsp; 7.5 &amp;nbsp; &amp;nbsp; 14 &amp;nbsp; &amp;nbsp; 145&lt;br /&gt;
Waiting: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2 &amp;nbsp; 11 &amp;nbsp; 6.5 &amp;nbsp; &amp;nbsp; 10 &amp;nbsp; &amp;nbsp; 142&lt;br /&gt;
Total: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16 &amp;nbsp; 28 &amp;nbsp; 9.8 &amp;nbsp; &amp;nbsp; 26 &amp;nbsp; &amp;nbsp; 157&lt;br /&gt;
&lt;br /&gt;
Percentage of the requests served within a certain time (ms)&lt;br /&gt;
&amp;nbsp; 50% &amp;nbsp; &amp;nbsp; 26&lt;br /&gt;
&amp;nbsp; 66% &amp;nbsp; &amp;nbsp; 27&lt;br /&gt;
&amp;nbsp; 75% &amp;nbsp; &amp;nbsp; 28&lt;br /&gt;
&amp;nbsp; 80% &amp;nbsp; &amp;nbsp; 28&lt;br /&gt;
&amp;nbsp; 90% &amp;nbsp; &amp;nbsp; 30&lt;br /&gt;
&amp;nbsp; 95% &amp;nbsp; &amp;nbsp; 31&lt;br /&gt;
&amp;nbsp; 98% &amp;nbsp; &amp;nbsp; 56&lt;br /&gt;
&amp;nbsp; 99% &amp;nbsp; &amp;nbsp; 75&lt;br /&gt;
&amp;nbsp;100% &amp;nbsp; &amp;nbsp;157 (longest request)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
top - 05:18:20 up 12:14, &amp;nbsp;4 users, &amp;nbsp;load average: 1.96, 1.65, 1.38&lt;br /&gt;
Tasks: &amp;nbsp; 5 total, &amp;nbsp; 0 running, &amp;nbsp; 5 sleeping, &amp;nbsp; 0 stopped, &amp;nbsp; 0 zombie&lt;br /&gt;
Cpu(s): &amp;nbsp;2.0%us, 16.7%sy, &amp;nbsp;0.0%ni, &lt;b&gt;77.2%id&lt;/b&gt;, &amp;nbsp;0.3%wa, &amp;nbsp;0.0%hi, &amp;nbsp;3.9%si, &amp;nbsp;0.0%st&lt;br /&gt;
Mem: &amp;nbsp; 4056556k total, &amp;nbsp;3267276k used, &amp;nbsp; 789280k free, &amp;nbsp; 295200k buffers&lt;br /&gt;
Swap: &amp;nbsp; 916476k total, &amp;nbsp; &amp;nbsp; 2732k used, &amp;nbsp; 913744k free, &amp;nbsp;1360740k cached&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; PID USER &amp;nbsp; &amp;nbsp; &amp;nbsp;PR &amp;nbsp;NI &amp;nbsp;VIRT &amp;nbsp;RES &amp;nbsp;SHR S %CPU %MEM &amp;nbsp; &amp;nbsp;TIME+ &amp;nbsp;COMMAND &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
20974 www-data &amp;nbsp;20 &amp;nbsp; 0 71608 2212 &amp;nbsp;796 S &amp;nbsp; 46 &amp;nbsp;0.1 &amp;nbsp; 0:37.47 nginx &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
20971 www-data &amp;nbsp;20 &amp;nbsp; 0 71608 2212 &amp;nbsp;796 S &amp;nbsp; 17 &amp;nbsp;0.1 &amp;nbsp; 0:33.82 nginx &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
20973 www-data &amp;nbsp;20 &amp;nbsp; 0 71608 2212 &amp;nbsp;796 S &amp;nbsp; 14 &amp;nbsp;0.1 &amp;nbsp; 0:31.63 nginx &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
20972 www-data &amp;nbsp;20 &amp;nbsp; 0 71608 2212 &amp;nbsp;796 S &amp;nbsp; 13 &amp;nbsp;0.1 &amp;nbsp; 0:28.03 nginx &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
20970 root &amp;nbsp; &amp;nbsp; &amp;nbsp;20 &amp;nbsp; 0 71288 1240 &amp;nbsp;240 S &amp;nbsp; &amp;nbsp;0 &amp;nbsp;0.0 &amp;nbsp; 0:00.00 nginx&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
2. CppCMS (1.0.1)&lt;/h4&gt;
&lt;br /&gt;
$ ab -n 100000 -c 200 http://localhost:10000/hello&lt;br /&gt;
This is ApacheBench, Version 2.3 &amp;lt;$Revision: 655654 $&amp;gt;&lt;br /&gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/&lt;br /&gt;
Licensed to The Apache Software Foundation, http://www.apache.org/&lt;br /&gt;
&lt;br /&gt;
Benchmarking localhost (be patient)&lt;br /&gt;
Completed 10000 requests&lt;br /&gt;
Completed 20000 requests&lt;br /&gt;
Completed 30000 requests&lt;br /&gt;
Completed 40000 requests&lt;br /&gt;
Completed 50000 requests&lt;br /&gt;
Completed 60000 requests&lt;br /&gt;
Completed 70000 requests&lt;br /&gt;
Completed 80000 requests&lt;br /&gt;
Completed 90000 requests&lt;br /&gt;
Completed 100000 requests&lt;br /&gt;
Finished 100000 requests&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Server Software: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CppCMS-Embedded/1.0.1&lt;br /&gt;
Server Hostname: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;localhost&lt;br /&gt;
Server Port: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10000&lt;br /&gt;
&lt;br /&gt;
Document Path: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/hello&lt;br /&gt;
Document Length: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;147 bytes&lt;br /&gt;
&lt;br /&gt;
Concurrency Level: &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;br /&gt;
Time taken for tests: &amp;nbsp; 14.724 seconds&lt;br /&gt;
Complete requests: &amp;nbsp; &amp;nbsp; &amp;nbsp;100000&lt;br /&gt;
Failed requests: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;br /&gt;
Write errors: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;br /&gt;
Total transferred: &amp;nbsp; &amp;nbsp; &amp;nbsp;28400000 bytes&lt;br /&gt;
HTML transferred: &amp;nbsp; &amp;nbsp; &amp;nbsp; 14700000 bytes&lt;br /&gt;
Requests per second: &amp;nbsp; &amp;nbsp;6791.69 [#/sec] (mean)&lt;br /&gt;
Time per request: &amp;nbsp; &amp;nbsp; &amp;nbsp; 29.448 [ms] (mean)&lt;br /&gt;
Time per request: &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.147 [ms] (mean, across all concurrent requests)&lt;br /&gt;
Transfer rate: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1883.63 [Kbytes/sec] received&lt;br /&gt;
&lt;br /&gt;
Connection Times (ms)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; min &amp;nbsp;mean[+/-sd] median &amp;nbsp; max&lt;br /&gt;
Connect: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8 &amp;nbsp; 13 &amp;nbsp; 2.0 &amp;nbsp; &amp;nbsp; 13 &amp;nbsp; &amp;nbsp; &amp;nbsp;55&lt;br /&gt;
Processing: &amp;nbsp; &amp;nbsp; 5 &amp;nbsp; 16 &amp;nbsp; 2.5 &amp;nbsp; &amp;nbsp; 15 &amp;nbsp; &amp;nbsp; &amp;nbsp;57&lt;br /&gt;
Waiting: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3 &amp;nbsp; 12 &amp;nbsp; 2.4 &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; &amp;nbsp;51&lt;br /&gt;
Total: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 17 &amp;nbsp; 29 &amp;nbsp; 2.9 &amp;nbsp; &amp;nbsp; 29 &amp;nbsp; &amp;nbsp; 108&lt;br /&gt;
&lt;br /&gt;
Percentage of the requests served within a certain time (ms)&lt;br /&gt;
&amp;nbsp; 50% &amp;nbsp; &amp;nbsp; 29&lt;br /&gt;
&amp;nbsp; 66% &amp;nbsp; &amp;nbsp; 29&lt;br /&gt;
&amp;nbsp; 75% &amp;nbsp; &amp;nbsp; 30&lt;br /&gt;
&amp;nbsp; 80% &amp;nbsp; &amp;nbsp; 31&lt;br /&gt;
&amp;nbsp; 90% &amp;nbsp; &amp;nbsp; 32&lt;br /&gt;
&amp;nbsp; 95% &amp;nbsp; &amp;nbsp; 33&lt;br /&gt;
&amp;nbsp; 98% &amp;nbsp; &amp;nbsp; 34&lt;br /&gt;
&amp;nbsp; 99% &amp;nbsp; &amp;nbsp; 35&lt;br /&gt;
&amp;nbsp;100% &amp;nbsp; &amp;nbsp;108 (longest request)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
top - 05:14:50 up 12:11, &amp;nbsp;4 users, &amp;nbsp;load average: 1.84, 1.51, 1.28&lt;br /&gt;
Tasks: &amp;nbsp; 2 total, &amp;nbsp; 2 running, &amp;nbsp; 0 sleeping, &amp;nbsp; 0 stopped, &amp;nbsp; 0 zombie&lt;br /&gt;
Cpu(s): &amp;nbsp;4.5%us, 26.5%sy, &amp;nbsp;0.0%ni, 63.6%id, &amp;nbsp;0.6%wa, &amp;nbsp;0.0%hi, &amp;nbsp;4.8%si, &amp;nbsp;0.0%st&lt;br /&gt;
Mem: &amp;nbsp; 4056556k total, &amp;nbsp;3186752k used, &amp;nbsp; 869804k free, &amp;nbsp; 295088k buffers&lt;br /&gt;
Swap: &amp;nbsp; 916476k total, &amp;nbsp; &amp;nbsp; 2732k used, &amp;nbsp; 913744k free, &amp;nbsp;1284760k cached&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; PID USER &amp;nbsp; &amp;nbsp; &amp;nbsp;PR &amp;nbsp;NI &amp;nbsp;VIRT &amp;nbsp;RES &amp;nbsp;SHR S %CPU %MEM &amp;nbsp; &amp;nbsp;TIME+ &amp;nbsp;COMMAND &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
21182 rjoshi &amp;nbsp; &amp;nbsp;20 &amp;nbsp; 0 &amp;nbsp;701m &amp;nbsp;34m 4444 R &amp;nbsp;237 &amp;nbsp;0.9 &amp;nbsp;12:13.20 hello &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
3. RestExpress (0.7.1)&lt;/h4&gt;
&lt;div&gt;
Java settings:&lt;/div&gt;
&lt;div&gt;
/usr/lib/jvm/jdk1.7.0/jre/bin/java -classpath /Downloads/kickstart/build/classes/main:/Downloads/kickstart/lib/DateAdapterJ-1.0.0.jar:/Downloads/kickstart/lib/RestExpress-0.7.1-build-40.jar:/home/rjoshi/Downloads/kickstart/lib/gson-1.6.jar:/Downloads/kickstart/lib/junit-4.4.jar:/home/rjoshi/Downloads/kickstart/lib/netty-3.2.5.Final.jar:/Downloads/kickstart/lib/xpp3_min-1.1.4c.jar:/Downloads/kickstart/lib/xstream-1.3.1.jar com.kickstart.Main&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
ab -n 100000 -c 200 http://localhost:8081/hello&lt;br /&gt;
This is ApacheBench, Version 2.3 &amp;lt;$Revision: 655654 $&amp;gt;&lt;br /&gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/&lt;br /&gt;
Licensed to The Apache Software Foundation, http://www.apache.org/&lt;br /&gt;
&lt;br /&gt;
Benchmarking localhost (be patient)&lt;br /&gt;
Completed 10000 requests&lt;br /&gt;
Completed 20000 requests&lt;br /&gt;
Completed 30000 requests&lt;br /&gt;
Completed 40000 requests&lt;br /&gt;
Completed 50000 requests&lt;br /&gt;
Completed 60000 requests&lt;br /&gt;
Completed 70000 requests&lt;br /&gt;
Completed 80000 requests&lt;br /&gt;
Completed 90000 requests&lt;br /&gt;
Completed 100000 requests&lt;br /&gt;
Finished 100000 requests&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Server Software: &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
Server Hostname: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;localhost&lt;br /&gt;
Server Port: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8081&lt;br /&gt;
&lt;br /&gt;
Document Path: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/hello&lt;br /&gt;
Document Length: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;148 bytes&lt;br /&gt;
&lt;br /&gt;
Concurrency Level: &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;br /&gt;
Time taken for tests: &amp;nbsp; 19.653 seconds&lt;br /&gt;
Complete requests: &amp;nbsp; &amp;nbsp; &amp;nbsp;100000&lt;br /&gt;
Failed requests: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;br /&gt;
Write errors: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;br /&gt;
Total transferred: &amp;nbsp; &amp;nbsp; &amp;nbsp;23300000 bytes&lt;br /&gt;
HTML transferred: &amp;nbsp; &amp;nbsp; &amp;nbsp; 14800000 bytes&lt;br /&gt;
Requests per second: &amp;nbsp; &amp;nbsp;5088.19 [#/sec] (mean)&lt;br /&gt;
Time per request: &amp;nbsp; &amp;nbsp; &amp;nbsp; 39.307 [ms] (mean)&lt;br /&gt;
Time per request: &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.197 [ms] (mean, across all concurrent requests)&lt;br /&gt;
Transfer rate: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1157.76 [Kbytes/sec] received&lt;br /&gt;
&lt;br /&gt;
Connection Times (ms)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; min &amp;nbsp;mean[+/-sd] median &amp;nbsp; max&lt;br /&gt;
Connect: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 24 178.9 &amp;nbsp; &amp;nbsp; 15 &amp;nbsp; &amp;nbsp;3027&lt;br /&gt;
Processing: &amp;nbsp; &amp;nbsp; 1 &amp;nbsp; 15 &amp;nbsp; 9.4 &amp;nbsp; &amp;nbsp; 16 &amp;nbsp; &amp;nbsp; 390&lt;br /&gt;
Waiting: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; 12 &amp;nbsp; 9.2 &amp;nbsp; &amp;nbsp; 12 &amp;nbsp; &amp;nbsp; 389&lt;br /&gt;
Total: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; 39 180.5 &amp;nbsp; &amp;nbsp; 31 &amp;nbsp; &amp;nbsp;3326&lt;br /&gt;
&lt;br /&gt;
Percentage of the requests served within a certain time (ms)&lt;br /&gt;
&amp;nbsp; 50% &amp;nbsp; &amp;nbsp; 31&lt;br /&gt;
&amp;nbsp; 66% &amp;nbsp; &amp;nbsp; 33&lt;br /&gt;
&amp;nbsp; 75% &amp;nbsp; &amp;nbsp; 34&lt;br /&gt;
&amp;nbsp; 80% &amp;nbsp; &amp;nbsp; 35&lt;br /&gt;
&amp;nbsp; 90% &amp;nbsp; &amp;nbsp; 39&lt;br /&gt;
&amp;nbsp; 95% &amp;nbsp; &amp;nbsp; 43&lt;br /&gt;
&amp;nbsp; 98% &amp;nbsp; &amp;nbsp; 45&lt;br /&gt;
&amp;nbsp; 99% &amp;nbsp; &amp;nbsp; 48&lt;br /&gt;
&amp;nbsp;100% &amp;nbsp; 3326 (longest request)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
top - 05:31:32 up 12:27, &amp;nbsp;4 users, &amp;nbsp;load average: 1.92, 1.54, 1.39&lt;br /&gt;
Tasks: &amp;nbsp; 1 total, &amp;nbsp; 0 running, &amp;nbsp; 1 sleeping, &amp;nbsp; 0 stopped, &amp;nbsp; 0 zombie&lt;br /&gt;
Cpu(s): &amp;nbsp;5.5%us, 24.0%sy, &amp;nbsp;0.0%ni, 65.4%id, &amp;nbsp;0.2%wa, &amp;nbsp;0.0%hi, &amp;nbsp;5.0%si, &amp;nbsp;0.0%st&lt;br /&gt;
Mem: &amp;nbsp; 4056556k total, &amp;nbsp;3748332k used, &amp;nbsp; 308224k free, &amp;nbsp; 297168k buffers&lt;br /&gt;
Swap: &amp;nbsp; 916476k total, &amp;nbsp; &amp;nbsp; 2732k used, &amp;nbsp; 913744k free, &amp;nbsp;1395984k cached&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; PID USER &amp;nbsp; &amp;nbsp; &amp;nbsp;PR &amp;nbsp;NI &amp;nbsp;VIRT &amp;nbsp;RES &amp;nbsp;SHR S %CPU %MEM &amp;nbsp; &amp;nbsp;TIME+ &amp;nbsp;COMMAND &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
10207 rjoshi &amp;nbsp; &amp;nbsp;20 &amp;nbsp; 0 1355m 404m 9996 S &amp;nbsp;254 10.2 &amp;nbsp; 8:51.39 java&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
4. Playframework (2.0)&lt;/h4&gt;
Config:&lt;br /&gt;
%production.application.mode=prod&lt;br /&gt;
logger.root=ERROR&lt;br /&gt;
logger.play=ERROR&lt;br /&gt;
logger.application=ERROR&lt;br /&gt;
&lt;br /&gt;
Started using: play start&lt;br /&gt;
&lt;br /&gt;
Java settings:&lt;br /&gt;
&lt;br /&gt;
java -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -Dfile.encoding=UTF8 -Dplay.version=2.0 -Dsbt.ivy.home=/home/rjoshi/Downloads/play-2.0/framework/../repository -Dplay.home=/home/rjoshi/Downloads/play-2.0/framework -Dsbt.boot.properties=/home/rjoshi/Downloads/play-2.0/framework/sbt/sbt.boot.properties -jar /home/rjoshi/Downloads/play-2.0/framework/sbt/sbt-launch.jar start&lt;br /&gt;
rjoshi &amp;nbsp; &amp;nbsp;3051 &amp;nbsp;2983 99 13:35 pts/0 &amp;nbsp; &amp;nbsp;00:19:59 java -Dsbt.ivy.home=/home/rjoshi/Downloads/play-2.0/framework/../repository -Djava.runtime.name=Java(TM) SE Runtime Environment -Dsun.boot.library.path=/usr/lib/jvm/jdk1.7.0/jre/lib/amd64 -Djava.vm.version=21.0-b17 -Djava.vm.vendor=Oracle Corporation -Djava.vendor.url=http://java.oracle.com/ -Dpath.separator=: -Djava.vm.name=Java HotSpot(TM) 64-Bit Server VM -Dfile.encoding.pkg=sun.io -Duser.country=US -Dsun.java.launcher=SUN_STANDARD -Dsun.os.patch.level=unknown -Djava.vm.specification.name=Java Virtual Machine Specification -Duser.dir=/home/rjoshi/Downloads/play-2.0/samples/java/helloworld -Djava.runtime.version=1.7.0-b147 -Dsbt.boot.properties=/home/rjoshi/Downloads/play-2.0/framework/sbt/sbt.boot.properties -Djava.awt.graphicsenv=sun.awt.X11GraphicsEnvironment -Djava.endorsed.dirs=/usr/lib/jvm/jdk1.7.0/jre/lib/endorsed -Dos.arch=amd64 -Djava.io.tmpdir=/tmp -Dline.separator=? -Djava.vm.specification.vendor=Oracle Corporation -Dos.name=Linux -Dsun.jnu.encoding=UTF-8 -Djava.library.path=:/usr/local/lib:/usr/lib:/usr/share/lib:.:/lib://opt/arawat/lib:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib -Djava.specification.name=Java Platform API Specification -Djava.class.version=51.0 -Dplay.home=/home/rjoshi/Downloads/play-2.0/framework -Dsun.management.compiler=HotSpot 64-Bit Tiered Compilers -Dos.version=2.6.38-13-generic -Duser.home=/home/rjoshi -Duser.timezone=America/New_York -Djava.awt.printerjob=sun.print.PSPrinterJob -Dfile.encoding=UTF8 -Djava.specification.version=1.7 -Djava.class.path=/home/rjoshi/Downloads/play-2.0/framework/sbt/sbt-launch.jar -Duser.name=rjoshi -Dplay.version=2.0 -Djava.vm.specification.version=1.7 -Dsun.java.command=/home/rjoshi/Downloads/play-2.0/framework/sbt/sbt-launch.jar start -Djava.home=/usr/lib/jvm/jdk1.7.0/jre -Dsun.arch.data.model=64 -Duser.language=en -Djava.specification.vendor=Oracle Corporation -Dawt.toolkit=sun.awt.X11.XToolkit -Djava.vm.info=mixed mode -Djava.version=1.7.0 -Djava.ext.dirs=/usr/lib/jvm/jdk1.7.0/jre/lib/ext:/usr/java/packages/lib/ext -Dsun.boot.class.path=/usr/lib/jvm/jdk1.7.0/jre/lib/resources.jar:/usr/lib/jvm/jdk1.7.0/jre/lib/rt.jar:/usr/lib/jvm/jdk1.7.0/jre/lib/sunrsasign.jar:/usr/lib/jvm/jdk1.7.0/jre/lib/jsse.jar:/usr/lib/jvm/jdk1.7.0/jre/lib/jce.jar:/usr/lib/jvm/jdk1.7.0/jre/lib/charsets.jar:/usr/lib/jvm/jdk1.7.0/jre/classes -Djava.vendor=Oracle Corporation -Dfile.separator=/ -Djava.vendor.url.bug=http://bugreport.sun.com/bugreport/ -Dsun.io.unicode.encoding=UnicodeLittle -Dsun.cpu.endian=little -Dsun.desktop=gnome -Dsun.cpu.isalist= -Dhttp.port=9000 -cp /home/rjoshi/Downloads/play-2.0/samples/java/helloworld/target/scala-2.9.1/classes:/home/rjoshi/Downloads/play-2.0/framework/sbt/boot/scala-2.9.1/lib/scala-library.jar:/home/rjoshi/Downloads/play-2.0/repository/local/play/play_2.9.1/2.0/jars/play_2.9.1.jar:/home/rjoshi/Downloads/play-2.0/repository/local/play/templates_2.9.1/2.0/jars/templates_2.9.1.jar:/home/rjoshi/Downloads/play-2.0/repository/local/com.github.scala-incubator.io/scala-io-file_2.9.1/0.2.0/jars/scala-io-file_2.9.1.jar:/home/rjoshi/Downloads/play-2.0/repository/local/com.github.scala-incubator.io/scala-io-core_2.9.1/0.2.0/jars/scala-io-core_2.9.1.jar:/home/rjoshi/Downloads/play-2.0/repository/local/com.github.jsuereth.scala-arm/scala-arm_2.9.1/0.3/jars/scala-arm_2.9.1.jar:/home/rjoshi/Downloads/play-2.0/repository/local/play/anorm_2.9.1/2.0/jars/anorm_2.9.1.jar:/home/rjoshi/Downloads/play-2.0/repository/local/io.netty/netty/3.3.0.Final/bundles/netty.jar:/home/rjoshi/Downloads/play-2.0/repository/local/org.slf4j/slf4j-api/1.6.4/jars/slf4j-api.jar:/home/rjoshi/Downloads/play-2.0/repository/local/org.slf4j/jul-to-slf4j/1.6.4/jars/jul-to-slf4j.jar:/home/rjoshi/Downloads/play-2.0/repository/local/org.slf4j/jcl-over-slf4j/1.6.4/jars/jcl-over-slf4j.jar:/home/rjoshi/Downloads/play-2.0/repository/local/ch.qos.logback/logback-core/1.0.0/jars/logback-core.jar:/home/rjoshi/Downloads/play-2.0/repository/local/ch.qos.logback/logback-classic/1.0.0/jars/logback-classic.jar:/home/rjoshi/Downloads/play-2.0/repository/local/com.typesafe.akka/akka-ac&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rjoshi@ubuntu:~$ ab -n 100000 -c 200 http://localhost:9000/&lt;br /&gt;
This is ApacheBench, Version 2.3 &amp;lt;$Revision: 655654 $&amp;gt;&lt;br /&gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/&lt;br /&gt;
Licensed to The Apache Software Foundation, http://www.apache.org/&lt;br /&gt;
&lt;br /&gt;
Benchmarking localhost (be patient)&lt;br /&gt;
Completed 10000 requests&lt;br /&gt;
Completed 20000 requests&lt;br /&gt;
Completed 30000 requests&lt;br /&gt;
Completed 40000 requests&lt;br /&gt;
Completed 50000 requests&lt;br /&gt;
Completed 60000 requests&lt;br /&gt;
Completed 70000 requests&lt;br /&gt;
Completed 80000 requests&lt;br /&gt;
Completed 90000 requests&lt;br /&gt;
Completed 100000 requests&lt;br /&gt;
Finished 100000 requests&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Server Software: &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
Server Hostname: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;localhost&lt;br /&gt;
Server Port: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9000&lt;br /&gt;
&lt;br /&gt;
Document Path: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/&lt;br /&gt;
Document Length: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;147 bytes&lt;br /&gt;
&lt;br /&gt;
Concurrency Level: &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;br /&gt;
Time taken for tests: &amp;nbsp; 20.896 seconds&lt;br /&gt;
Complete requests: &amp;nbsp; &amp;nbsp; &amp;nbsp;100000&lt;br /&gt;
Failed requests: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;br /&gt;
Write errors: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;br /&gt;
Total transferred: &amp;nbsp; &amp;nbsp; &amp;nbsp;22800000 bytes&lt;br /&gt;
HTML transferred: &amp;nbsp; &amp;nbsp; &amp;nbsp; 14700000 bytes&lt;br /&gt;
Requests per second: &amp;nbsp; &amp;nbsp;4785.52 [#/sec] (mean)&lt;br /&gt;
Time per request: &amp;nbsp; &amp;nbsp; &amp;nbsp; 41.793 [ms] (mean)&lt;br /&gt;
Time per request: &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.209 [ms] (mean, across all concurrent requests)&lt;br /&gt;
Transfer rate: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1065.53 [Kbytes/sec] received&lt;br /&gt;
&lt;br /&gt;
Connection Times (ms)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; min &amp;nbsp;mean[+/-sd] median &amp;nbsp; max&lt;br /&gt;
Connect: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 25 197.9 &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp;3032&lt;br /&gt;
Processing: &amp;nbsp; &amp;nbsp; 3 &amp;nbsp; 16 &amp;nbsp; 5.5 &amp;nbsp; &amp;nbsp; 15 &amp;nbsp; &amp;nbsp; 267&lt;br /&gt;
Waiting: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2 &amp;nbsp; 12 &amp;nbsp; 4.8 &amp;nbsp; &amp;nbsp; 11 &amp;nbsp; &amp;nbsp; 263&lt;br /&gt;
Total: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3 &amp;nbsp; 40 198.2 &amp;nbsp; &amp;nbsp; 26 &amp;nbsp; &amp;nbsp;3060&lt;br /&gt;
&lt;br /&gt;
Percentage of the requests served within a certain time (ms)&lt;br /&gt;
&amp;nbsp; 50% &amp;nbsp; &amp;nbsp; 26&lt;br /&gt;
&amp;nbsp; 66% &amp;nbsp; &amp;nbsp; 30&lt;br /&gt;
&amp;nbsp; 75% &amp;nbsp; &amp;nbsp; 32&lt;br /&gt;
&amp;nbsp; 80% &amp;nbsp; &amp;nbsp; 33&lt;br /&gt;
&amp;nbsp; 90% &amp;nbsp; &amp;nbsp; 37&lt;br /&gt;
&amp;nbsp; 95% &amp;nbsp; &amp;nbsp; 39&lt;br /&gt;
&amp;nbsp; 98% &amp;nbsp; &amp;nbsp; 44&lt;br /&gt;
&amp;nbsp; 99% &amp;nbsp; &amp;nbsp; 46&lt;br /&gt;
&amp;nbsp;100% &amp;nbsp; 3060 (longest request)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
top - 13:44:18 up 22 min, &amp;nbsp;4 users, &amp;nbsp;load average: 0.41, 0.67, 0.51&lt;br /&gt;
Tasks: &amp;nbsp; 1 total, &amp;nbsp; 0 running, &amp;nbsp; 1 sleeping, &amp;nbsp; 0 stopped, &amp;nbsp; 0 zombie&lt;br /&gt;
Cpu(s): 20.0%us, 38.3%sy, &amp;nbsp;0.0%ni, 37.8%id, &amp;nbsp;0.2%wa, &amp;nbsp;0.0%hi, &amp;nbsp;3.7%si, &amp;nbsp;0.0%st&lt;br /&gt;
Mem: &amp;nbsp; 4056556k total, &amp;nbsp;2775780k used, &amp;nbsp;1280776k free, &amp;nbsp; 276848k buffers&lt;br /&gt;
Swap: &amp;nbsp; 916476k total, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0k used, &amp;nbsp; 916476k free, &amp;nbsp; 933780k cached&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; PID USER &amp;nbsp; &amp;nbsp; &amp;nbsp;PR &amp;nbsp;NI &amp;nbsp;VIRT &amp;nbsp;RES &amp;nbsp;SHR S %CPU %MEM &amp;nbsp; &amp;nbsp;TIME+ &amp;nbsp;COMMAND &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;3051 rjoshi &amp;nbsp; &amp;nbsp;20 &amp;nbsp; 0 1527m 408m &amp;nbsp;12m S &amp;nbsp;430 10.3 &amp;nbsp;22:16.51 java&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
5. CppCMS with Nginx frontend&lt;/h4&gt;
&lt;div&gt;
&lt;div&gt;
top - 05:52:23 up 12:48, &amp;nbsp;4 users, &amp;nbsp;load average: 1.60, 1.32, 1.36&lt;/div&gt;
&lt;div&gt;
Tasks: &amp;nbsp; 6 total, &amp;nbsp; 1 running, &amp;nbsp; 5 sleeping, &amp;nbsp; 0 stopped, &amp;nbsp; 0 zombie&lt;/div&gt;
&lt;div&gt;
Cpu(s): &amp;nbsp;5.0%us, 25.8%sy, &amp;nbsp;0.0%ni, 65.6%id, &amp;nbsp;0.1%wa, &amp;nbsp;0.0%hi, &amp;nbsp;3.5%si, &amp;nbsp;0.0%st&lt;/div&gt;
&lt;div&gt;
Mem: &amp;nbsp; 4056556k total, &amp;nbsp;3281736k used, &amp;nbsp; 774820k free, &amp;nbsp; 298500k buffers&lt;/div&gt;
&lt;div&gt;
Swap: &amp;nbsp; 916476k total, &amp;nbsp; &amp;nbsp; 2732k used, &amp;nbsp; 913744k free, &amp;nbsp;1429692k cached&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; PID USER &amp;nbsp; &amp;nbsp; &amp;nbsp;PR &amp;nbsp;NI &amp;nbsp;VIRT &amp;nbsp;RES &amp;nbsp;SHR S %CPU %MEM &amp;nbsp; &amp;nbsp;TIME+ &amp;nbsp;COMMAND &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
10425 rjoshi &amp;nbsp; &amp;nbsp;20 &amp;nbsp; 0 &amp;nbsp;568m 6700 4444 S &amp;nbsp;149 &amp;nbsp;0.2 &amp;nbsp; 1:16.31 hello &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
10366 www-data &amp;nbsp;20 &amp;nbsp; 0 71608 2308 &amp;nbsp;892 S &amp;nbsp; 37 &amp;nbsp;0.1 &amp;nbsp; 0:14.01 nginx &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
10367 www-data &amp;nbsp;20 &amp;nbsp; 0 71696 2380 &amp;nbsp;892 R &amp;nbsp; 31 &amp;nbsp;0.1 &amp;nbsp; 0:15.32 nginx &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
10368 www-data &amp;nbsp;20 &amp;nbsp; 0 71608 2308 &amp;nbsp;892 S &amp;nbsp; 29 &amp;nbsp;0.1 &amp;nbsp; 0:09.18 nginx &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
10365 www-data &amp;nbsp;20 &amp;nbsp; 0 71608 2312 &amp;nbsp;896 S &amp;nbsp; &amp;nbsp;1 &amp;nbsp;0.1 &amp;nbsp; 0:11.01 nginx &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
10364 root &amp;nbsp; &amp;nbsp; &amp;nbsp;20 &amp;nbsp; 0 71288 1244 &amp;nbsp;244 S &amp;nbsp; &amp;nbsp;0 &amp;nbsp;0.0 &amp;nbsp; 0:00.00 nginx&lt;/div&gt;
&lt;/div&gt;
$ ab -n 100000 -c 200 http://localhost:9999/hello&lt;br /&gt;
This is ApacheBench, Version 2.3 &amp;lt;$Revision: 655654 $&amp;gt;&lt;br /&gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/&lt;br /&gt;
Licensed to The Apache Software Foundation, http://www.apache.org/&lt;br /&gt;
&lt;br /&gt;
Benchmarking localhost (be patient)&lt;br /&gt;
Completed 10000 requests&lt;br /&gt;
Completed 20000 requests&lt;br /&gt;
Completed 30000 requests&lt;br /&gt;
Completed 40000 requests&lt;br /&gt;
Completed 50000 requests&lt;br /&gt;
Completed 60000 requests&lt;br /&gt;
Completed 70000 requests&lt;br /&gt;
Completed 80000 requests&lt;br /&gt;
Completed 90000 requests&lt;br /&gt;
Completed 100000 requests&lt;br /&gt;
Finished 100000 requests&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Server Software: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;nginx/0.8.54&lt;br /&gt;
Server Hostname: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;localhost&lt;br /&gt;
Server Port: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9999&lt;br /&gt;
&lt;br /&gt;
Document Path: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/hello&lt;br /&gt;
Document Length: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;147 bytes&lt;br /&gt;
&lt;br /&gt;
Concurrency Level: &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;br /&gt;
Time taken for tests: &amp;nbsp; 14.672 seconds&lt;br /&gt;
Complete requests: &amp;nbsp; &amp;nbsp; &amp;nbsp;100000&lt;br /&gt;
Failed requests: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;18&lt;br /&gt;
&amp;nbsp; &amp;nbsp;(Connect: 0, Receive: 0, Length: 18, Exceptions: 0)&lt;br /&gt;
Write errors: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;br /&gt;
Non-2xx responses: &amp;nbsp; &amp;nbsp; &amp;nbsp;18&lt;br /&gt;
Total transferred: &amp;nbsp; &amp;nbsp; &amp;nbsp;31200234 bytes&lt;br /&gt;
HTML transferred: &amp;nbsp; &amp;nbsp; &amp;nbsp; 14700468 bytes&lt;br /&gt;
Requests per second: &amp;nbsp; &amp;nbsp;6815.54 [#/sec] (mean)&lt;br /&gt;
Time per request: &amp;nbsp; &amp;nbsp; &amp;nbsp; 29.345 [ms] (mean)&lt;br /&gt;
Time per request: &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.147 [ms] (mean, across all concurrent requests)&lt;br /&gt;
Transfer rate: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2076.62 [Kbytes/sec] received&lt;br /&gt;
&lt;br /&gt;
Connection Times (ms)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; min &amp;nbsp;mean[+/-sd] median &amp;nbsp; max&lt;br /&gt;
Connect: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6 &amp;nbsp; 12 &amp;nbsp; 3.0 &amp;nbsp; &amp;nbsp; 12 &amp;nbsp; &amp;nbsp; 107&lt;br /&gt;
Processing: &amp;nbsp; &amp;nbsp; 3 &amp;nbsp; 17 &amp;nbsp; 2.8 &amp;nbsp; &amp;nbsp; 17 &amp;nbsp; &amp;nbsp; &amp;nbsp;55&lt;br /&gt;
Waiting: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3 &amp;nbsp; 13 &amp;nbsp; 2.7 &amp;nbsp; &amp;nbsp; 14 &amp;nbsp; &amp;nbsp; &amp;nbsp;54&lt;br /&gt;
Total: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 17 &amp;nbsp; 29 &amp;nbsp; 3.8 &amp;nbsp; &amp;nbsp; 29 &amp;nbsp; &amp;nbsp; 131&lt;br /&gt;
&lt;br /&gt;
Percentage of the requests served within a certain time (ms)&lt;br /&gt;
&amp;nbsp; 50% &amp;nbsp; &amp;nbsp; 29&lt;br /&gt;
&amp;nbsp; 66% &amp;nbsp; &amp;nbsp; 30&lt;br /&gt;
&amp;nbsp; 75% &amp;nbsp; &amp;nbsp; 31&lt;br /&gt;
&amp;nbsp; 80% &amp;nbsp; &amp;nbsp; 31&lt;br /&gt;
&amp;nbsp; 90% &amp;nbsp; &amp;nbsp; 32&lt;br /&gt;
&amp;nbsp; 95% &amp;nbsp; &amp;nbsp; 33&lt;br /&gt;
&amp;nbsp; 98% &amp;nbsp; &amp;nbsp; 34&lt;br /&gt;
&amp;nbsp; 99% &amp;nbsp; &amp;nbsp; 35&lt;br /&gt;
&amp;nbsp;100% &amp;nbsp; &amp;nbsp;131 (longest request)&lt;br /&gt;
&lt;h4&gt;
6. Playframework with Nginx frontend&lt;/h4&gt;
Configuration:&lt;br /&gt;
%production.application.mode=prod&lt;br /&gt;
logger.root=ERROR&lt;br /&gt;
logger.play=ERROR&lt;br /&gt;
logger.application=ERROR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
rjoshi@ubuntu:~$ ab -n 100000 -c 200 http://localhost:9999/&lt;br /&gt;
This is ApacheBench, Version 2.3 &amp;lt;$Revision: 655654 $&amp;gt;&lt;br /&gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/&lt;br /&gt;
Licensed to The Apache Software Foundation, http://www.apache.org/&lt;br /&gt;
&lt;br /&gt;
Benchmarking localhost (be patient)&lt;br /&gt;
Completed 10000 requests&lt;br /&gt;
Completed 20000 requests&lt;br /&gt;
Completed 30000 requests&lt;br /&gt;
Completed 40000 requests&lt;br /&gt;
Completed 50000 requests&lt;br /&gt;
Completed 60000 requests&lt;br /&gt;
Completed 70000 requests&lt;br /&gt;
Completed 80000 requests&lt;br /&gt;
Completed 90000 requests&lt;br /&gt;
Completed 100000 requests&lt;br /&gt;
Finished 100000 requests&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Server Software: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;nginx/0.8.54&lt;br /&gt;
Server Hostname: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;localhost&lt;br /&gt;
Server Port: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9999&lt;br /&gt;
&lt;br /&gt;
Document Path: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/&lt;br /&gt;
Document Length: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;147 bytes&lt;br /&gt;
&lt;br /&gt;
Concurrency Level: &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;br /&gt;
Time taken for tests: &amp;nbsp; 26.810 seconds&lt;br /&gt;
Complete requests: &amp;nbsp; &amp;nbsp; &amp;nbsp;100000&lt;br /&gt;
Failed requests: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;br /&gt;
Write errors: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;br /&gt;
Total transferred: &amp;nbsp; &amp;nbsp; &amp;nbsp;30600000 bytes&lt;br /&gt;
HTML transferred: &amp;nbsp; &amp;nbsp; &amp;nbsp; 14700000 bytes&lt;br /&gt;
Requests per second: &amp;nbsp; &amp;nbsp;3729.90 [#/sec] (mean)&lt;br /&gt;
Time per request: &amp;nbsp; &amp;nbsp; &amp;nbsp; 53.621 [ms] (mean)&lt;br /&gt;
Time per request: &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.268 [ms] (mean, across all concurrent requests)&lt;br /&gt;
Transfer rate: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1114.60 [Kbytes/sec] received&lt;br /&gt;
&lt;br /&gt;
Connection Times (ms)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; min &amp;nbsp;mean[+/-sd] median &amp;nbsp; max&lt;br /&gt;
Connect: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;5 &amp;nbsp;53.1 &amp;nbsp; &amp;nbsp; &amp;nbsp;4 &amp;nbsp; &amp;nbsp;3025&lt;br /&gt;
Processing: &amp;nbsp; &amp;nbsp; 3 &amp;nbsp; 44 297.0 &amp;nbsp; &amp;nbsp; 14 &amp;nbsp; &amp;nbsp;3369&lt;br /&gt;
Waiting: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3 &amp;nbsp; 43 297.0 &amp;nbsp; &amp;nbsp; 12 &amp;nbsp; &amp;nbsp;3368&lt;br /&gt;
Total: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3 &amp;nbsp; 50 301.6 &amp;nbsp; &amp;nbsp; 18 &amp;nbsp; &amp;nbsp;3379&lt;br /&gt;
&lt;br /&gt;
Percentage of the requests served within a certain time (ms)&lt;br /&gt;
&amp;nbsp; 50% &amp;nbsp; &amp;nbsp; 18&lt;br /&gt;
&amp;nbsp; 66% &amp;nbsp; &amp;nbsp; 22&lt;br /&gt;
&amp;nbsp; 75% &amp;nbsp; &amp;nbsp; 24&lt;br /&gt;
&amp;nbsp; 80% &amp;nbsp; &amp;nbsp; 25&lt;br /&gt;
&amp;nbsp; 90% &amp;nbsp; &amp;nbsp; 29&lt;br /&gt;
&amp;nbsp; 95% &amp;nbsp; &amp;nbsp; 32&lt;br /&gt;
&amp;nbsp; 98% &amp;nbsp; &amp;nbsp; 38&lt;br /&gt;
&amp;nbsp; 99% &amp;nbsp; &amp;nbsp;284&lt;br /&gt;
&amp;nbsp;100% &amp;nbsp; 3379 (longest request)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
top - 13:50:05 up 28 min, &amp;nbsp;5 users, &amp;nbsp;load average: 0.32, 0.32, 0.39&lt;br /&gt;
Tasks: &amp;nbsp; 6 total, &amp;nbsp; 2 running, &amp;nbsp; 4 sleeping, &amp;nbsp; 0 stopped, &amp;nbsp; 0 zombie&lt;br /&gt;
Cpu(s): 18.7%us, 46.5%sy, &amp;nbsp;0.0%ni, 27.9%id, &amp;nbsp;0.0%wa, &amp;nbsp;0.0%hi, &amp;nbsp;6.9%si, &amp;nbsp;0.0%st&lt;br /&gt;
Mem: &amp;nbsp; 4056556k total, &amp;nbsp;2817740k used, &amp;nbsp;1238816k free, &amp;nbsp; 277404k buffers&lt;br /&gt;
Swap: &amp;nbsp; 916476k total, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0k used, &amp;nbsp; 916476k free, &amp;nbsp; 944256k cached&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; PID USER &amp;nbsp; &amp;nbsp; &amp;nbsp;PR &amp;nbsp;NI &amp;nbsp;VIRT &amp;nbsp;RES &amp;nbsp;SHR S %CPU %MEM &amp;nbsp; &amp;nbsp;TIME+ &amp;nbsp;COMMAND &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;3051 rjoshi &amp;nbsp; &amp;nbsp;20 &amp;nbsp; 0 1527m 422m &amp;nbsp;12m S &amp;nbsp;381 10.7 &amp;nbsp;24:22.37 java &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;5561 www-data &amp;nbsp;20 &amp;nbsp; 0 72152 2760 &amp;nbsp;796 R &amp;nbsp; 45 &amp;nbsp;0.1 &amp;nbsp; 0:06.70 nginx &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;5559 www-data &amp;nbsp;20 &amp;nbsp; 0 72664 3004 &amp;nbsp;796 S &amp;nbsp; 39 &amp;nbsp;0.1 &amp;nbsp; 0:04.60 nginx &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;5560 www-data &amp;nbsp;20 &amp;nbsp; 0 72636 3244 &amp;nbsp;796 S &amp;nbsp; 28 &amp;nbsp;0.1 &amp;nbsp; 0:09.14 nginx &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;5558 www-data &amp;nbsp;20 &amp;nbsp; 0 71608 2284 &amp;nbsp;864 R &amp;nbsp; 26 &amp;nbsp;0.1 &amp;nbsp; 0:07.15 nginx &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;5557 root &amp;nbsp; &amp;nbsp; &amp;nbsp;20 &amp;nbsp; 0 71288 1248 &amp;nbsp;244 S &amp;nbsp; &amp;nbsp;0 &amp;nbsp;0.0 &amp;nbsp; 0:00.00 nginx&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;b&gt;7. RestExpress with Nginx frontend:&lt;/b&gt;&lt;/h4&gt;
$ ab -n 100000 -c 200 http://localhost:9999/hello&lt;br /&gt;
This is ApacheBench, Version 2.3 &amp;lt;$Revision: 655654 $&amp;gt;&lt;br /&gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/&lt;br /&gt;
Licensed to The Apache Software Foundation, http://www.apache.org/&lt;br /&gt;
&lt;br /&gt;
Benchmarking localhost (be patient)&lt;br /&gt;
Completed 10000 requests&lt;br /&gt;
Completed 20000 requests&lt;br /&gt;
Completed 30000 requests&lt;br /&gt;
Completed 40000 requests&lt;br /&gt;
Completed 50000 requests&lt;br /&gt;
Completed 60000 requests&lt;br /&gt;
Completed 70000 requests&lt;br /&gt;
Completed 80000 requests&lt;br /&gt;
Completed 90000 requests&lt;br /&gt;
Completed 100000 requests&lt;br /&gt;
Finished 100000 requests&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Server Software: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;nginx/0.8.54&lt;br /&gt;
Server Hostname: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;localhost&lt;br /&gt;
Server Port: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9999&lt;br /&gt;
&lt;br /&gt;
Document Path: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/hello&lt;br /&gt;
Document Length: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;148 bytes&lt;br /&gt;
&lt;br /&gt;
Concurrency Level: &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;br /&gt;
Time taken for tests: &amp;nbsp; 23.640 seconds&lt;br /&gt;
Complete requests: &amp;nbsp; &amp;nbsp; &amp;nbsp;100000&lt;br /&gt;
Failed requests: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&lt;br /&gt;
Write errors: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;br /&gt;
Total transferred: &amp;nbsp; &amp;nbsp; &amp;nbsp;29200000 bytes&lt;br /&gt;
HTML transferred: &amp;nbsp; &amp;nbsp; &amp;nbsp; 14800000 bytes&lt;br /&gt;
Requests per second: &amp;nbsp; &amp;nbsp;4230.05 [#/sec] (mean)&lt;br /&gt;
Time per request: &amp;nbsp; &amp;nbsp; &amp;nbsp; 47.281 [ms] (mean)&lt;br /&gt;
Time per request: &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.236 [ms] (mean, across all concurrent requests)&lt;br /&gt;
Transfer rate: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1206.23 [Kbytes/sec] received&lt;br /&gt;
&lt;br /&gt;
Connection Times (ms)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; min &amp;nbsp;mean[+/-sd] median &amp;nbsp; max&lt;br /&gt;
Connect: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; &amp;nbsp;6 103.7 &amp;nbsp; &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp;3014&lt;br /&gt;
Processing: &amp;nbsp; &amp;nbsp; 3 &amp;nbsp; 36 310.7 &amp;nbsp; &amp;nbsp; 13 &amp;nbsp; &amp;nbsp;9320&lt;br /&gt;
Waiting: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2 &amp;nbsp; 35 310.7 &amp;nbsp; &amp;nbsp; 13 &amp;nbsp; &amp;nbsp;9320&lt;br /&gt;
Total: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3 &amp;nbsp; 42 328.2 &amp;nbsp; &amp;nbsp; 16 &amp;nbsp; &amp;nbsp;9320&lt;br /&gt;
&lt;br /&gt;
Percentage of the requests served within a certain time (ms)&lt;br /&gt;
&amp;nbsp; 50% &amp;nbsp; &amp;nbsp; 16&lt;br /&gt;
&amp;nbsp; 66% &amp;nbsp; &amp;nbsp; 20&lt;br /&gt;
&amp;nbsp; 75% &amp;nbsp; &amp;nbsp; 22&lt;br /&gt;
&amp;nbsp; 80% &amp;nbsp; &amp;nbsp; 24&lt;br /&gt;
&amp;nbsp; 90% &amp;nbsp; &amp;nbsp; 28&lt;br /&gt;
&amp;nbsp; 95% &amp;nbsp; &amp;nbsp; 29&lt;br /&gt;
&amp;nbsp; 98% &amp;nbsp; &amp;nbsp; 31&lt;br /&gt;
&amp;nbsp; 99% &amp;nbsp; &amp;nbsp; 40&lt;br /&gt;
&amp;nbsp;100% &amp;nbsp; 9320 (longest request)&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
8. GWAN (3.3.28 64-bit (Mar 28 2012 11:24:16))&lt;/h4&gt;
$ ab -n 100000 -c 200 http://localhost:9090/?hello&lt;br /&gt;
This is ApacheBench, Version 2.3 &amp;lt;$Revision: 655654 $&amp;gt;&lt;br /&gt;
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/&lt;br /&gt;
Licensed to The Apache Software Foundation, http://www.apache.org/&lt;br /&gt;
&lt;br /&gt;
Benchmarking localhost (be patient)&lt;br /&gt;
Completed 10000 requests&lt;br /&gt;
Completed 20000 requests&lt;br /&gt;
Completed 30000 requests&lt;br /&gt;
Completed 40000 requests&lt;br /&gt;
Completed 50000 requests&lt;br /&gt;
Completed 60000 requests&lt;br /&gt;
Completed 70000 requests&lt;br /&gt;
Completed 80000 requests&lt;br /&gt;
Completed 90000 requests&lt;br /&gt;
Completed 100000 requests&lt;br /&gt;
Finished 100000 requests&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Server Software: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;G-WAN&lt;br /&gt;
Server Hostname: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;localhost&lt;br /&gt;
Server Port: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;9090&lt;br /&gt;
&lt;br /&gt;
Document Path: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/?hello&lt;br /&gt;
Document Length: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;146 bytes&lt;br /&gt;
&lt;br /&gt;
Concurrency Level: &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;br /&gt;
Time taken for tests: &amp;nbsp; 25.348 seconds&lt;br /&gt;
Complete requests: &amp;nbsp; &amp;nbsp; &amp;nbsp;100000&lt;br /&gt;
Failed requests: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2843&lt;br /&gt;
&amp;nbsp; &amp;nbsp;(Connect: 0, Receive: 0, Length: 1423, Exceptions: 1420)&lt;br /&gt;
Write errors: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;br /&gt;
Total transferred: &amp;nbsp; &amp;nbsp; &amp;nbsp;41205186 bytes&lt;br /&gt;
HTML transferred: &amp;nbsp; &amp;nbsp; &amp;nbsp; 14392242 bytes&lt;br /&gt;
Requests per second: &amp;nbsp; &amp;nbsp;3945.03 [#/sec] (mean)&lt;br /&gt;
Time per request: &amp;nbsp; &amp;nbsp; &amp;nbsp; 50.697 [ms] (mean)&lt;br /&gt;
Time per request: &amp;nbsp; &amp;nbsp; &amp;nbsp; 0.253 [ms] (mean, across all concurrent requests)&lt;br /&gt;
Transfer rate: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1587.46 [Kbytes/sec] received&lt;br /&gt;
&lt;br /&gt;
Connection Times (ms)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; min &amp;nbsp;mean[+/-sd] median &amp;nbsp; max&lt;br /&gt;
Connect: &amp;nbsp; &amp;nbsp; &amp;nbsp; 10 &amp;nbsp; 25 &amp;nbsp; 4.5 &amp;nbsp; &amp;nbsp; 25 &amp;nbsp; &amp;nbsp; &amp;nbsp;69&lt;br /&gt;
Processing: &amp;nbsp; &amp;nbsp; 6 &amp;nbsp; 26 &amp;nbsp; 4.8 &amp;nbsp; &amp;nbsp; 26 &amp;nbsp; &amp;nbsp; &amp;nbsp;71&lt;br /&gt;
Waiting: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0 &amp;nbsp; 18 &amp;nbsp; 4.6 &amp;nbsp; &amp;nbsp; 18 &amp;nbsp; &amp;nbsp; &amp;nbsp;71&lt;br /&gt;
Total: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 25 &amp;nbsp; 50 &amp;nbsp; 3.7 &amp;nbsp; &amp;nbsp; 50 &amp;nbsp; &amp;nbsp; &amp;nbsp;96&lt;br /&gt;
&lt;br /&gt;
Percentage of the requests served within a certain time (ms)&lt;br /&gt;
&amp;nbsp; 50% &amp;nbsp; &amp;nbsp; 50&lt;br /&gt;
&amp;nbsp; 66% &amp;nbsp; &amp;nbsp; 52&lt;br /&gt;
&amp;nbsp; 75% &amp;nbsp; &amp;nbsp; 52&lt;br /&gt;
&amp;nbsp; 80% &amp;nbsp; &amp;nbsp; 53&lt;br /&gt;
&amp;nbsp; 90% &amp;nbsp; &amp;nbsp; 54&lt;br /&gt;
&amp;nbsp; 95% &amp;nbsp; &amp;nbsp; 56&lt;br /&gt;
&amp;nbsp; 98% &amp;nbsp; &amp;nbsp; 58&lt;br /&gt;
&amp;nbsp; 99% &amp;nbsp; &amp;nbsp; 61&lt;br /&gt;
&amp;nbsp;100% &amp;nbsp; &amp;nbsp; 96 (longest request)&lt;br /&gt;
&lt;br /&gt;
top - 10:52:11 up 17:48, &amp;nbsp;4 users, &amp;nbsp;load average: 2.17, 1.53, 1.30&lt;br /&gt;
Tasks: &amp;nbsp; 2 total, &amp;nbsp; 0 running, &amp;nbsp; 2 sleeping, &amp;nbsp; 0 stopped, &amp;nbsp; 0 zombie&lt;br /&gt;
Cpu(s): &amp;nbsp;3.0%us, 24.5%sy, &amp;nbsp;0.0%ni, 64.9%id, &amp;nbsp;0.2%wa, &amp;nbsp;0.0%hi, &amp;nbsp;7.4%si, &amp;nbsp;0.0%st&lt;br /&gt;
Mem: &amp;nbsp; 4056556k total, &amp;nbsp;3577880k used, &amp;nbsp; 478676k free, &amp;nbsp; 405480k buffers&lt;br /&gt;
Swap: &amp;nbsp; 916476k total, &amp;nbsp; &amp;nbsp; 2640k used, &amp;nbsp; 913836k free, &amp;nbsp;1642436k cached&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; PID USER &amp;nbsp; &amp;nbsp; &amp;nbsp;PR &amp;nbsp;NI &amp;nbsp;VIRT &amp;nbsp;RES &amp;nbsp;SHR S %CPU %MEM &amp;nbsp; &amp;nbsp;TIME+ &amp;nbsp;COMMAND &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;8161 root &amp;nbsp; &amp;nbsp; &amp;nbsp;RT &amp;nbsp; 0 1662m &amp;nbsp;&lt;b&gt;30m &lt;/b&gt;7704 S &amp;nbsp;&lt;b&gt;360&lt;/b&gt; &amp;nbsp;0.8 &amp;nbsp; 2:06.54 gwan</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">17</thr:total></item><item><title>Installing Android 2.2 on HTC Aria</title><link>http://joshitech.blogspot.com/2010/10/installing-android-22-on-htc-aria.html</link><category>androird 2.2</category><category>HTC Aria</category><category>jailbreak</category><category>root</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Fri, 8 Oct 2010 14:10:00 -0400</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-1562075531625076743</guid><description>Hi Guys,&lt;br /&gt;
&amp;nbsp; I was able to successfully root/jailbreak my HTC Aria phone and install Android 2.2.&amp;nbsp; Here are the steps. &lt;span style="font-size: x-small;"&gt;(Please try it at your own risk).&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Install &lt;a href="http://unrevoked.com/rootwiki/doku.php/public/unrevoked3"&gt;unrevoked3&lt;/a&gt; to root the phone. &amp;nbsp;&lt;/li&gt;
&lt;li&gt;Download&amp;nbsp; &lt;a href="http://wiki.cyanogenmod.com/index.php?title=Latest_Version"&gt;CyanogenMod&lt;/a&gt; for your version of the handset.&lt;/li&gt;
&lt;li&gt;Copy it into your phones SDcard and rename to update.zip&lt;/li&gt;
&lt;li&gt;Power off your phone and keep pressing power button (on top) and volume button (on side)&lt;/li&gt;
&lt;li&gt;It will reboot with recovery options with multiple menu options.&lt;/li&gt;
&lt;li&gt;Select option 6: nandroid to take backup &lt;/li&gt;
&lt;li&gt;Select option to 3: "wipe data/factory reset"&lt;/li&gt;
&lt;li&gt;Select option 4: "wipe cache partition"&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Select option 8: "Advance" and&amp;nbsp; select option "wipe delvik cache".&lt;/li&gt;
&lt;li&gt;Selection option "reboot recovery" &lt;/li&gt;
&lt;li&gt;Now select option to install update.zip from sdcard.&lt;/li&gt;
&lt;li&gt;Reboot the phone and you will have andorid 2.2 install.&lt;/li&gt;
&lt;/ol&gt;Once I installed, everything worked fine except android market place.&lt;br /&gt;
&amp;nbsp; 13.&amp;nbsp; Enable your wifi internet connection&lt;br /&gt;
&amp;nbsp; 14.&amp;nbsp; Goto&amp;nbsp; ROM Manager and upgrade FlashClockworkMode version&lt;br /&gt;
&amp;nbsp; 15. Download market fix to your sd card.&amp;nbsp; &lt;a href="http://www.megaupload.com/?d=XJTMQZY2"&gt;Market_fix_bgill55.zip&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&amp;nbsp; 16. Again follow 5,7,8,9 and 10&lt;br /&gt;
&amp;nbsp; 17.&amp;nbsp; Go back to ROM manager and select option install from SD card.&lt;br /&gt;
&amp;nbsp; 18. Select Market_fix_bgill55.zip&lt;br /&gt;
&amp;nbsp; 19. once installation is done, reboot.&lt;br /&gt;
&lt;ol&gt;&lt;/ol&gt;I have no issues so far.&amp;nbsp; Let me know if you find any issue or need help installing it.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total></item><item><title>boost object pool destroy performance</title><link>http://joshitech.blogspot.com/2010/05/boost-object-pool-destroy-performance.html</link><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Mon, 17 May 2010 15:41:00 -0400</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-4065231134737998932</guid><description>In one of my application, we wanted to achieve 8000 TPS (Transactions per second) where every second, 8000 session objects will be created and destroyed. &lt;br /&gt;
To achieve this performance number, I wanted to optimize memory allocation and deallocation so&amp;nbsp; started looking for existing memory pool class particularly in boost libraries (assuming it would be faster) and I am already using few classes from boost.&lt;br /&gt;
&lt;br /&gt;
I found boost::object_pool.&amp;nbsp; It is a header only file so no need to include link library and I included into my application. At the same time, I used boost::multi_index_container to store session object with multiple indexes.&amp;nbsp; The performance was degrading as number of object increases in the container.&amp;nbsp; I thought that is due to boost multi-index-container.&lt;br /&gt;
&lt;br /&gt;
So I created two separate test applications to measure performance of boost object pool and boost multi-index-container and found that boost object_pool was the bottleneck.&lt;br /&gt;
&lt;br /&gt;
Here is the performance number of destroying 10K, 20K and 30K object from object_pool and using standard c++ delete.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;./object_pool_test 10000&lt;/b&gt;&lt;br /&gt;
Total time to destroy 10000 using delete: &lt;span style="color: blue;"&gt;0.3158860&lt;/span&gt;&lt;br /&gt;
Total time to destroy 10000 from object_pool: &lt;span style="color: red;"&gt;1.447002736 sec&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;./object_pool_test 20000&lt;/b&gt;&lt;br /&gt;
Total time to destroy 20000 using delete: &lt;span style="color: blue;"&gt;0.6340170&lt;/span&gt;&lt;br /&gt;
Total time to destroy 20000 from object_pool: &lt;span style="color: red;"&gt;9.624879974 sec &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;./object_pool_test 30000&lt;/b&gt;&lt;br /&gt;
Total time to destroy 30000 using delete: &lt;span style="color: blue;"&gt;0.10413087&lt;/span&gt;&lt;br /&gt;
Total time to destroy 30000 from object_pool: &lt;span style="color: red;"&gt;32.150515048 sec&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
// File: test_object_pool.cpp&lt;br /&gt;
// Description: Test performance of deleting object from boost::object_pool versus standard delete operator.&lt;br /&gt;
// Author: Rohit Joshi&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;#include &amp;lt;iostream&amp;gt;&lt;br /&gt;
#include &amp;lt;vector&amp;gt;&lt;br /&gt;
#include &amp;lt;time.h&amp;gt;&lt;br /&gt;
#include &amp;lt;boost/pool/object_pool.hpp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class Test&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; char buffer[1024];&lt;br /&gt;
&amp;nbsp; unsigned long id;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char** argv) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; if(argc &amp;lt; 2) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; std::cout &amp;lt;&amp;lt; "Usage: "&amp;lt;&amp;lt; argv[0] &amp;lt;&amp;lt; " NumObjects\n";&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return&amp;nbsp; 0;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; int num_objs = atoi(argv[1]);&lt;br /&gt;
/////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//test1: using standard delete to delete objects&lt;br /&gt;
////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&amp;nbsp; std::vector&amp;lt;Test*&amp;gt; vDelTest;&lt;br /&gt;
&amp;nbsp; vDelTest.reserve(num_objs);&lt;br /&gt;
&amp;nbsp; for(int i = 0; i &amp;lt; num_objs; ++i) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Test *pTest = new Test();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; vDelTest.push_back(pTest);&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; timespec tv;&lt;br /&gt;
&amp;nbsp; tv.tv_sec = 0;&lt;br /&gt;
&amp;nbsp; tv.tv_nsec = 0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; clock_settime(CLOCK_PROCESS_CPUTIME_ID, &amp;amp;tv);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; for(int i = 0; i &amp;lt; num_objs; ++i) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; delete vDelTest[i];&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &amp;amp;tv);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; std::cout &amp;lt;&amp;lt; "Total time to destroy "&amp;lt;&amp;lt; num_objs &amp;lt;&amp;lt; " using delete: " &amp;lt;&amp;lt; tv.tv_sec &amp;lt;&amp;lt; "." &amp;lt;&amp;lt; tv.tv&lt;br /&gt;
_nsec &amp;lt;&amp;lt; "\n";&lt;br /&gt;
&lt;br /&gt;
//////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//delete using object_pool&lt;br /&gt;
/////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
&amp;nbsp; boost::object_pool&amp;lt;Test&amp;gt; m_oPool;&lt;br /&gt;
&amp;nbsp; std::vector&amp;lt;Test*&amp;gt; vTest;&lt;br /&gt;
&amp;nbsp; vTest.reserve(num_objs);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; for(int i = 0; i &amp;lt; num_objs; ++i) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Test *pTest = m_oPool.construct();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; vTest.push_back(pTest);&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &amp;amp;tv);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; std::cout &amp;lt;&amp;lt; "Total time to destroy "&amp;lt;&amp;lt; num_objs &amp;lt;&amp;lt; " from object_pool: " &amp;lt;&amp;lt; tv.tv_sec &amp;lt;&amp;lt; "." &amp;lt;&amp;lt; tv.tv_nsec &amp;lt;&amp;lt; "\n";&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; return 0;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
To compile, copy this source into test_object_pool.cpp&lt;br /&gt;
&amp;nbsp;g++ -c test_object_pool.cpp &lt;br /&gt;
g++ -o test_object_pool test_object_pool.o -lrt</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total></item><item><title>Expose stop working after connecting to external monitor</title><link>http://joshitech.blogspot.com/2010/01/expose-stop-working-after-connecting-to.html</link><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Fri, 29 Jan 2010 13:30:00 -0500</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-7194401558251415020</guid><description>When ever I unplug my MacBook from an external monitor, Expose stops working. The solution to this problem is to kill "Dock" application.&amp;nbsp; To make it easier, I have created a script which allows you to do the same.&lt;br /&gt;
&lt;br /&gt;
set app_name to "/System/Library/CoreServices/Dock.app/Contents/MacOS/Dock"&lt;br /&gt;
set the_pid to (do shell script "ps ax | grep " &amp;amp; (quoted form of app_name) &amp;amp; " | grep -v grep | awk '{print $1}'")&lt;br /&gt;
display dialog "Killingn the application Dock with PID:" &amp;amp; the_pid&lt;br /&gt;
if the_pid is not "" then do shell script ("kill -9 " &amp;amp; the_pid)&lt;br /&gt;
&lt;br /&gt;
Copy following lines of code into text editor and copy under  $HOME/Library/Scripts/killdock.scpt.&amp;nbsp; Now you can see the script listed under  scripts as an shortcut. You can see "kill dock" listed at the end.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO0Nl1-LSfD8k1eMdRo8izzccUzt9blTKasNuhSAQ5ijFbssD0hGq83X49Xzlsj-16MnynZU65QpPya3WNW1-HFCsIsXmKLbwSe8fBuTqeDUXy-1niVn-_s7RgMhamlK7uzioZtmKxbBY/s1600-h/Picture+3.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO0Nl1-LSfD8k1eMdRo8izzccUzt9blTKasNuhSAQ5ijFbssD0hGq83X49Xzlsj-16MnynZU65QpPya3WNW1-HFCsIsXmKLbwSe8fBuTqeDUXy-1niVn-_s7RgMhamlK7uzioZtmKxbBY/s400/Picture+3.png" width="228" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO0Nl1-LSfD8k1eMdRo8izzccUzt9blTKasNuhSAQ5ijFbssD0hGq83X49Xzlsj-16MnynZU65QpPya3WNW1-HFCsIsXmKLbwSe8fBuTqeDUXy-1niVn-_s7RgMhamlK7uzioZtmKxbBY/s72-c/Picture+3.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Does Internet Speed check varies based on the browser</title><link>http://joshitech.blogspot.com/2010/01/does-internet-speed-check-varies-based.html</link><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Sun, 10 Jan 2010 12:01:00 -0500</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-2603648092835515100</guid><description>I wanted to see whether browser makes different while checking the speed of the internet.&amp;nbsp; I did&amp;nbsp; speed check test using speedtest.net&amp;nbsp; and four different browser and surprisingly all of them gave different results.&lt;br /&gt;
&lt;br /&gt;
1: Safari&amp;nbsp; Version 4.0.3 (5531.9)&lt;br /&gt;
Download Speed: 17.16 Mb/s&lt;br /&gt;
Upload speed: 4.08 Mb/s&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-FZ7BYlnzCOAuhL6s-v5UcwLN4e4mOORsWZJ97E7l14HpkUBRA_WiF6oeHAAA0ICS60EVP784fzGhcd-VQntEnyYXrkrocTsKOPYco-qL-k0xOZ1VprMA34RrF8vIedMmvEzgrRAEyh8/s1600-h/Safari.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-FZ7BYlnzCOAuhL6s-v5UcwLN4e4mOORsWZJ97E7l14HpkUBRA_WiF6oeHAAA0ICS60EVP784fzGhcd-VQntEnyYXrkrocTsKOPYco-qL-k0xOZ1VprMA34RrF8vIedMmvEzgrRAEyh8/s640/Safari.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
2. Firefox Version 3.6 (rv:1.9.2 Gecko 20100105)&lt;br /&gt;
Download Speed:15.84 Mb/s&lt;br /&gt;
Upload Speed:4.25 Mb/s&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpHB_qw5LGyz8c5TSoToTiwkrUP0o_PwSjL3OX1rh5Mk0LA3BDdpPcPMNFmXVg17SAk1bZGuyYiajHuGTHB8UD3fQHps_2Ldu9xyeHf4lsAF8eh_N7lhzH7RpL1ZV6T7Wc-tqH-dVWIrs/s1600-h/FireFox.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpHB_qw5LGyz8c5TSoToTiwkrUP0o_PwSjL3OX1rh5Mk0LA3BDdpPcPMNFmXVg17SAk1bZGuyYiajHuGTHB8UD3fQHps_2Ldu9xyeHf4lsAF8eh_N7lhzH7RpL1ZV6T7Wc-tqH-dVWIrs/s640/FireFox.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
3. Chrome Version 4.0.246.0 (31780)&lt;br /&gt;
Download Speed:15.47 Mb/s&lt;br /&gt;
Upload Speed:2.17 Mb/s&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8I7uSWxH62lXw_eWISvUXPWv9HqkXI8DvUeNz0y9GrF7aj8qYwO-DDCbIeCygqx8U1MJixGCGDz88lcbI1PEzUY-NKVpjFoSYJxI5tgq9cca75bHA6HuH5hiqxoJle1Tidi1tRHBS-JM/s1600-h/Google+Chrome.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8I7uSWxH62lXw_eWISvUXPWv9HqkXI8DvUeNz0y9GrF7aj8qYwO-DDCbIeCygqx8U1MJixGCGDz88lcbI1PEzUY-NKVpjFoSYJxI5tgq9cca75bHA6HuH5hiqxoJle1Tidi1tRHBS-JM/s640/Google+Chrome.png" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Chrome Version&amp;nbsp;4.0.249.43:&lt;br /&gt;
Download speed: 17.65 Mb/s&lt;br /&gt;
Upload speed: 3.98 Mb/s&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixOxh6wN_95wZ8CoXxJnxcq8zuNJlHVpsa0uidnO1MFOpLGVOgWL9bayIKkUyK__7y1YICimn_o-GA_e5_2HQsMIdGMD6ubzG9DIC6AhVMqSukbYjbyKDJfGAYTY3ZkvYU7p31ufrQYkQ/s1600-h/Picture+2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixOxh6wN_95wZ8CoXxJnxcq8zuNJlHVpsa0uidnO1MFOpLGVOgWL9bayIKkUyK__7y1YICimn_o-GA_e5_2HQsMIdGMD6ubzG9DIC6AhVMqSukbYjbyKDJfGAYTY3ZkvYU7p31ufrQYkQ/s640/Picture+2.png" /&gt;&lt;/a&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixOxh6wN_95wZ8CoXxJnxcq8zuNJlHVpsa0uidnO1MFOpLGVOgWL9bayIKkUyK__7y1YICimn_o-GA_e5_2HQsMIdGMD6ubzG9DIC6AhVMqSukbYjbyKDJfGAYTY3ZkvYU7p31ufrQYkQ/s1600-h/Picture+2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;"&gt;&lt;br /&gt;
&lt;/a&gt;&lt;span style="color: black;"&gt;Looking at the results, it seems speeds varies based on the browser. You can see latest version of the Google Chrome has improves and you can see both the upload and download speed has increased.&lt;/span&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixOxh6wN_95wZ8CoXxJnxcq8zuNJlHVpsa0uidnO1MFOpLGVOgWL9bayIKkUyK__7y1YICimn_o-GA_e5_2HQsMIdGMD6ubzG9DIC6AhVMqSukbYjbyKDJfGAYTY3ZkvYU7p31ufrQYkQ/s1600-h/Picture+2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;"&gt;&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-FZ7BYlnzCOAuhL6s-v5UcwLN4e4mOORsWZJ97E7l14HpkUBRA_WiF6oeHAAA0ICS60EVP784fzGhcd-VQntEnyYXrkrocTsKOPYco-qL-k0xOZ1VprMA34RrF8vIedMmvEzgrRAEyh8/s72-c/Safari.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Why  google search engine is better than bing for technical information?</title><link>http://joshitech.blogspot.com/2009/10/why-google-search-engine-is-better-than.html</link><category>bing</category><category>dbxml</category><category>google</category><category>search</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Fri, 2 Oct 2009 23:09:00 -0400</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-8178929827164257822</guid><description>When Microsoft launched&amp;nbsp; &lt;a href="http://www.bing.com/"&gt;bing&lt;/a&gt; search engine, I started using it. I really liked the picture on main page and&amp;nbsp; results are good when I am searching non-technical information.&amp;nbsp; So I changed my default search engine to Bing and set home page as http://www.bing.com.&lt;br /&gt;
&lt;br /&gt;
But when it comes to technical information, bing couldn't provide me information I wanted. It seems it doesn't display the latest information.&lt;br /&gt;
E.g&amp;nbsp; I was working on dbxml (Berkeley DB XML) and posted a question to the "dbxml forum".&amp;nbsp; When I searched "dbxml forum" (without quotes), bing fetches following first five search results.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;cite&gt;sourceforge.net/projects/&lt;b&gt;dbxml&lt;/b&gt;-core&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;cite&gt;rubyforge.org/&lt;b&gt;forum&lt;/b&gt;/?group_id=1643&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;cite&gt;sourceforge.net/projects/&lt;b&gt;dbxml&lt;/b&gt;&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;cite&gt;&lt;b&gt;dbxml&lt;/b&gt;-core.wiki.sourceforge.net/space/​stats&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;cite&gt;eiffel-&lt;b&gt;dbxml&lt;/b&gt;.wiki.sourceforge.net&lt;/cite&gt;&lt;/li&gt;
&lt;/ul&gt;When I search "dbxml forum" (without quotes), it fetches following results.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;cite&gt;&lt;b&gt;forums&lt;/b&gt;.oracle.com/&lt;b&gt;forums&lt;/b&gt;/&lt;b&gt;forum&lt;/b&gt;.jspa?&lt;b&gt;forum&lt;/b&gt;ID=274&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;cite&gt;www.nabble.com/Berkeley-&lt;b&gt;DB-Xml&lt;/b&gt;-f730.html&amp;nbsp;&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;cite&gt;www.nabble.com/Berkeley-&lt;b&gt;DB-XML&lt;/b&gt;-mailing-list-transition-td5475353.html&amp;nbsp;&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;cite&gt;www.mombu.com/.../t-getting-started-with-berkeley-&lt;b&gt;db-xml&lt;/b&gt;-806334.html&amp;nbsp;&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;cite&gt;www.eosdirectory.com/project/196/Berkeley+DB+XML.html&lt;/cite&gt;&lt;cite&gt;&amp;nbsp;&lt;/cite&gt;&lt;cite&gt;&amp;nbsp;&lt;/cite&gt;&lt;cite&gt;&amp;nbsp;&lt;/cite&gt;&lt;cite&gt;&amp;nbsp;&lt;/cite&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;cite&gt;&amp;nbsp;&lt;/cite&gt;You can see the difference. The first link is for berkeley db xml forum even though you don't see the dbxml word in the link.&amp;nbsp; Google search engine has latest information about Berkeley DB XML including information that it is bought by Oracle and forums.oracle.com is the latest page for Berkeley DB XML.&amp;nbsp;&amp;nbsp; So every time&amp;nbsp; I search in bing, I had to search it again in google to get the dbxml forum page which was waste of my time. Eventually, I decided had to switch back to google search engine.&lt;br /&gt;
&lt;cite&gt;&lt;br /&gt;
&lt;/cite&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>Glassfish Application Server Performance tunings</title><link>http://joshitech.blogspot.com/2009/09/glassfish-application-server.html</link><category>garbage collection</category><category>glassfish</category><category>jvm options</category><category>performance</category><category>tunings</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Tue, 29 Sep 2009 20:46:00 -0400</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-46250687384549554</guid><description>If you want to improve performance of your application running on Glassfish application server, you can try out following JVM options. We got significant performance improvement by using them.&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;jvm-options&amp;gt;-server&amp;lt;/jvm-options&amp;gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;jvm-options&amp;gt;-Xms3000m&amp;lt;/jvm-options&amp;gt;&lt;br /&gt;
&amp;lt;jvm-options&amp;gt;-Xmx3000m&amp;lt;/jvm-options&amp;gt;&lt;br /&gt;
&amp;lt;jvm-options&amp;gt;-XX:MaxPermSize=192m&amp;lt;/jvm-options&amp;gt; &lt;br /&gt;
&amp;lt;jvm-options&amp;gt;-XX:NewRation=2&amp;lt;/jvm-options&amp;gt; &lt;br /&gt;
&amp;lt;jvm-options&amp;gt;-XX:+AggressiveHeap&amp;lt;/jvm-options&amp;gt;&lt;br /&gt;
&amp;lt;jvm-options&amp;gt;-XX:+AggressiveOpts&amp;lt;/jvm-options&amp;gt;&lt;br /&gt;
&amp;lt;jvm-options&amp;gt;-XX:+UseParallelGC&amp;lt;/jvm-options&amp;gt;&lt;br /&gt;
&amp;lt;jvm-options&amp;gt;-XX:+UseParallelOldGC&amp;lt;/jvm-options&amp;gt;&lt;br /&gt;
&amp;lt;jvm-options&amp;gt;-XX:ParallelGCThreads=5&amp;lt;/jvm-options&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By using these performance tunings, we are able to get almost 30% more TPS (Transactions per Seconds).If I can be helpful, please do let me know. I have spent enough time on Glassfish and OpenESB performance tunings.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total></item><item><title>Absolute Singleton.  Not Really...</title><link>http://joshitech.blogspot.com/2009/09/absolute-singleton.html</link><category>absolute singleton</category><category>singleton</category><category>true singleton</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Sun, 27 Sep 2009 10:23:00 -0400</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-217129540120256088</guid><description>Singleton are not true singleton and there are many reasons: One of them is multiple class loaders can have their own copy of singleton. See &lt;a href="http://weblogs.java.net/blog/2005/08/24/how-single-can-your-singleton-instance-be"&gt;How single can your singleton instance be?&lt;/a&gt;. I started googling for true singleton and came across &lt;a href="http://surguy.net/articles/communication-across-classloaders.xml"&gt;Absolute Singleton&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
When I use this approach in my product, it didn't work instead it was throwing exception java.lang.ClassNotFoundException on the Singleton class.&lt;br /&gt;
&lt;br /&gt;
java.lang.ClassNotFoundException: com.example.common.utils.JCSCache at com.sun.enterprise.util.ConnectorClassLoader.loadClass(ConnectorClassLoader.java:222)&lt;br /&gt;
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)&lt;br /&gt;
at com.example.common.utils.JCSCache.getInstance(JCSCache.java:131)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After looking at the exception and class initialization, I found that what happens if the first instance is initiated by custom class loader and not the default one?&lt;br /&gt;
&lt;br /&gt;
It will not find an existing instance because while creating the instance, due to custom class loader, it will go into "if (! myClassLoader.toString().startsWith("sun.")) {" (see the &lt;a href="http://surguy.net/articles/communication-across-classloaders.xml"&gt;Absolute Singleton&lt;/a&gt;) condition and try to find existing instance instead of creating new which doesn't exits yet so it throws the java.lang.ClassNotFoundException.&lt;br /&gt;
&lt;br /&gt;
The work around I found is to catch the exception and create the instance of AbsoluteSingleton class.&lt;br /&gt;
&lt;br /&gt;
But next time, custom class loader try to get the instance, again it's not going to find it and create it's own instance.&lt;br /&gt;
See the below log.  &lt;br /&gt;
&lt;br /&gt;
First instance of JCSCache ( &lt;b&gt;com.example.common.utils.JCSCache@124adaf&lt;/b&gt;) created by class loader: &lt;b&gt;org.glassfish.openesb.pojose.jbi.su.SUClassLoader@1b78d60&lt;/b&gt;&lt;br /&gt;
and &lt;br /&gt;
&lt;br /&gt;
2nd instance (&lt;b&gt;com.example.common.utils.JCSCache@1a859dc&lt;/b&gt;) is created by &lt;b&gt;EJBClassLoader&lt;/b&gt;. &lt;br /&gt;
&lt;br /&gt;
So Absolute singleton is not really absolute singleton.&lt;br /&gt;
&lt;br /&gt;
[2009-09-27 21:56:04,713 | Thread-79 | common.utils.JCSCache | ENTRY] --&gt;getInstance()&lt;br /&gt;
[2009-09-27 21:56:04,713 | Thread-79 | common.utils.JCSCache | DEBUG] Class Loader:org.glassfish.openesb.pojose.jbi.su.SUClassLoader@1b78d60&lt;br /&gt;
[2009-09-27 21:56:04,713 | Thread-79 | common.utils.JCSCache | ERROR] Exception:com.example.common.utils.JCSCache&lt;br /&gt;
[2009-09-27 21:56:04,713 | Thread-79 | common.utils.JCSCache | ENTRY] --&gt;JCSCache()&lt;br /&gt;
[2009-09-27 21:56:04,713 | Thread-79 | common.utils.JCSCache | DEBUG] JCSCache constructor called.&lt;br /&gt;
[2009-09-27 21:56:04,713 | Thread-79 | common.utils.JCSCache | EXIT] &lt;--JCSCache()
[2009-09-27 21:56:04,713 | Thread-79 | common.utils.JCSCache | ENTRY] --&gt;init()&lt;br /&gt;
[2009-09-27 21:56:04,713 | Thread-79 | common.utils.JCSCache | DEBUG] Setting the cache configuratio name:/cache.ccf&lt;br /&gt;
[2009-09-27 21:56:04,721 | Thread-79 | common.utils.JCSCache | DEBUG] Initializing region base cache objects.&lt;br /&gt;
[2009-09-27 21:56:04,786 | Thread-79 | common.utils.JCSCache | EXIT] &lt;--init() true
[2009-09-27 21:56:04,786 | Thread-79 | common.utils.JCSCache | EXIT] &lt;--getInstance() &lt;b&gt;com.example.common.utils.JCSCache@124adaf&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
2nd instance:&lt;br /&gt;
&lt;br /&gt;
2009-09-27 21:56:06,812 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | ENTRY] --&gt;getInstance()&lt;br /&gt;
[2009-09-27 21:56:06,813 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | DEBUG] Class Loader:EJBClassLoader : &lt;br /&gt;
[2009-09-27 21:56:06,813 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | ERROR] Exception:com.example.common.utils.JCSCache&lt;br /&gt;
[2009-09-27 21:56:06,813 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | ENTRY] --&gt;JCSCache()&lt;br /&gt;
[2009-09-27 21:56:06,813 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | DEBUG] JCSCache constructor called.&lt;br /&gt;
[2009-09-27 21:56:06,813 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | EXIT] &lt;--JCSCache()
[2009-09-27 21:56:06,813 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | ENTRY] --&gt;init()&lt;br /&gt;
[2009-09-27 21:56:06,813 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | DEBUG] Setting the cache configuratio name:/cache.ccf&lt;br /&gt;
[2009-09-27 21:56:06,818 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | DEBUG] Initializing region base cache objects.&lt;br /&gt;
[2009-09-27 21:56:06,926 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | EXIT] &lt;--init() true
[2009-09-27 21:56:06,926 | httpSSLWorkerThread-8080-0 | common.utils.JCSCache | EXIT] &lt;--getInstance() &lt;b&gt;com.example.common.utils.JCSCache@1a859dc&lt;/b&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>How to Enabled logging in OpenLdap</title><link>http://joshitech.blogspot.com/2009/09/how-to-enabled-logging-in-openldap.html</link><category>enabled logging</category><category>ldap</category><category>olcLogLevel</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Sat, 26 Sep 2009 22:10:00 -0400</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-1022597141236764550</guid><description>I am working on performance improvement task for our new product where I wanted avoid duplicate Ldap seaches. To view the ldap searches in sldap log file, we have to enable the logging.  This is how you do it.&lt;br /&gt;
&lt;br /&gt;
To enabled logging:&lt;br /&gt;
&lt;br /&gt;
ldapmodify -x -H ldap://ldaphost -D cn=directory\ manager,cn=config -w password&lt;br /&gt;
dn: cn=Config&lt;br /&gt;
replace: olcLogLevel&lt;br /&gt;
olcLogLevel: Stats Stats2 None&lt;br /&gt;
Ctrl+d&lt;br /&gt;
&lt;br /&gt;
Now you can view the log file at /var/log/slapd.log. You will need a root/sudo access to view this log file.&lt;br /&gt;
&lt;br /&gt;
To disabled logging:&lt;br /&gt;
ldapmodify -x -H ldap://ldaphost -D cn=directory\ manager,cn=config -w password&lt;br /&gt;
dn: cn=Config&lt;br /&gt;
replace: olcLogLevel&lt;br /&gt;
olcLogLevel: None&lt;br /&gt;
Ctrl+d&lt;br /&gt;
&lt;br /&gt;
NOTE: Here is None is used for reporting errors so don't forget to specify None when you enable or disable logging.&lt;br /&gt;
&lt;br /&gt;
If you want to modify existing subscriber data in ldap, you can use this command&lt;br /&gt;
ldapmodify -x -H ldap://host -D cn=directory\ manager,o=example.com -w password123 -f modifieddata.ldif&lt;br /&gt;
&lt;br /&gt;
where modifieddata.ldif would contain&lt;br /&gt;
dn: uniqueIdentifier=0209091514-1015999999,ou=subscribers,ou=OU,o=example.com&lt;br /&gt;
changetype: modify&lt;br /&gt;
replace: &lt;attrname&gt;&lt;br /&gt;
&lt;attrname&gt;: &lt;attrvalue&gt;&lt;/attrvalue&gt;&lt;/attrname&gt;&lt;/attrname&gt;&lt;br /&gt;
&lt;br /&gt;
dn: uniqueIdentifier=0209091514-1016000000,ou=subscribers,ou=OU,o=example.com&lt;br /&gt;
changetype: modify&lt;br /&gt;
replace: &lt;attrname&gt;&lt;br /&gt;
&lt;attrname&gt;: &lt;attrvalue&gt;&lt;/attrvalue&gt;&lt;/attrname&gt;&lt;/attrname&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Berkeley DBXML and thread deadlock</title><link>http://joshitech.blogspot.com/2009/09/berkeley-dbxml-and-thread-deadlock.html</link><category>dbxml</category><category>deadlock</category><category>thread</category><category>xcap</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Wed, 23 Sep 2009 22:46:00 -0400</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-5457839090622331236</guid><description>For my &lt;a href="http://sourceforge.net/projects/xcapserver/"&gt;XCAPServer&lt;/a&gt; project, I use Berkeley DB XML for XML document repository. I am kind of stuck due to all threads goes into deadlock while adding and removing documents.&lt;br /&gt;
&lt;br /&gt;
See more information on dbxml forum at: &lt;a href="http://forums.oracle.com/forums/thread.jspa?messageID=3782878"&gt;DBXML 2.4.16: Accessing containers from multiple threads and deadlock&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Solution: To avoid the deadlock, call set_lk_detect(DB_LOCK_MINWRITE) on DbEnv variable. Also make sure when exceptions are thrown, transactions must be either aborted or committed.&lt;br /&gt;
&lt;br /&gt;
Here is a link to the source code: &lt;a href="http://xcapserver.svn.sourceforge.net/viewvc/xcapserver/trunk/XCAPServer%2B%2B/src/db/dbxml_db.cpp?view=markup&amp;pathrev=32"&gt;dbxml_db.cpp&lt;/a&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>XPATH Library performance</title><link>http://joshitech.blogspot.com/2009/09/xpath-library-performance.html</link><category>jaxen</category><category>performance</category><category>xpath</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Tue, 22 Sep 2009 22:20:00 -0400</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-2037025476539263986</guid><description>I am working on a project which requires invoking multiple JBI endpoints based on routing requirements and type of input message. It is developed using heavy xpath expressions to choose the right path in the routing logic. &lt;br /&gt;
&lt;br /&gt;
I started with default XPath library which is part of the JDK 1.6. To avoid the performance problem, I pre-compiled all the xpath expressions at startup time.  &lt;br /&gt;
&lt;br /&gt;
When I ran performance test on this router application, I was getting around 670 TPS (transactions per second) with 20% CPU idle (it's a 8 core machine) which is much slower than what I expected.&lt;br /&gt;
&lt;br /&gt;
So I started looking for alternate XPATH libraries and I found &lt;a href="http://vtd-xml.sourceforge.net/benchmark1.html"&gt;VDT-XML benchmark&lt;/a&gt; where you can see VDT-XML outperforms &lt;a href="http://jaxen.codehaus.org/"&gt;jaxen&lt;/a&gt; and default jkd xpath implementation.&lt;br /&gt;
&lt;br /&gt;
VDT-XML seem to be much faster (based on benchmark results :) )but due to it's license, I decided not to use for my project so I only option left was to try jaxen xpath library.&lt;br /&gt;
&lt;br /&gt;
When I replaced default xpath library with jaxen, performance numbers changes drastically. Now I get 800 TPS with 70% CPU idle. In-fact I couldn't drive more CPU usage with my jmeter running on one machine.&lt;br /&gt;
&lt;br /&gt;
So I would recommend jaxen library to anyone who is looking high performance, open source/free xpath library.</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><title>Boost Logging Library</title><link>http://joshitech.blogspot.com/2009/09/boost-logging-library.html</link><category>boost</category><category>log</category><category>logging</category><category>xcap</category><category>xcapserver</category><author>noreply@blogger.com (Rohit Joshi)</author><pubDate>Tue, 22 Sep 2009 22:06:00 -0400</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-3012806236910902414.post-8833826899155205861</guid><description>I was evaluating boost log library for my upcoming project &lt;a href="http://xcapserver.sourceforge.net/"&gt;XCAPServer&lt;/a&gt;.  When I googled for boost and logging, I found two boost based logging library.&lt;br /&gt;
&lt;br /&gt;
1. http://torjo.com/log2/doc/html/index.html&lt;br /&gt;
2. https://sourceforge.net/projects/boost-log/.&lt;br /&gt;
&lt;br /&gt;
I started with torjo's log library documentation but it looked more complex so I gave up on that.  &lt;br /&gt;
&lt;br /&gt;
boost-log library documentation is really good and getting started was much easier so I downloaded the boost-log source and compiled along with my other boost libraries. You can find how to compile boost libraries &lt;a href="http://joshitech.blogspot.com/2009/09/compiling-boost-libraries-on-maclinux.html"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
After spending some time on this library what I realized is that it doesn't support basic logging requirements for my multi-threading application so I had to use C++ macros to achieve what I wanted.&lt;br /&gt;
&lt;br /&gt;
Here is my logger files:&lt;br /&gt;
&lt;a href="http://xcapserver.svn.sourceforge.net/viewvc/xcapserver/trunk/C%2B%2B/XCAPServer%2B%2B/include/logger/xcap_logger.hpp?revision=35&amp;amp;view=markup"&gt;xcap_logger.hpp&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://xcapserver.svn.sourceforge.net/viewvc/xcapserver/trunk/C%2B%2B/XCAPServer%2B%2B/src/logger/xcap_logger.cpp?revision=35&amp;amp;view=markup"&gt;xcap_logger.cpp&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I just don't understand why logging libraries have to be so complex and still doesn't provide basic logging features e.g file-name, line-number, thread-id etc..we need to learn from java community.&lt;br /&gt;
&lt;br /&gt;
Sometime I feel that boost community should define the interface and let people implement rather than people contributing the implementations and boost community keep on rejecting :)&lt;br /&gt;
&lt;br /&gt;
Here is what I am looking in boost logging library.&lt;br /&gt;
&lt;br /&gt;
My basic requirements for logging libraries are below.&lt;br /&gt;
&lt;br /&gt;
1. Date and Time&lt;br /&gt;
2. File Name. Similar to __FILE__ macro&lt;br /&gt;
3. Line Number. Similar to __LINE__ macro &lt;br /&gt;
4. Current thread id. (pthread_self)&lt;br /&gt;
5. Parent thread id. (getpid())&lt;br /&gt;
6. Log level (from trace, debug, info, warn, error, critical)&lt;br /&gt;
7. Module name&lt;br /&gt;
8. Data&lt;br /&gt;
e.g&lt;br /&gt;
|2009-Sep-22 22:04:47.340047|file.cpp:212|0xb0103000:0xb01020000|INFO|XCAP|test-data</description></item></channel></rss>