36 ms·
i see no mention of "concurrency" in that article. i see that the go programs make heavy use of goroutines so why were they run in "single threaded" mode? just
by f2f 13y ago
i see no mention of "concurrency" in that article. i see that the go programs make heavy use of goroutines so why were they run in "single threaded" mode? just testing their mqttsrv with various levels of GOMAXPROCS rewards with immediate benefits. here are some numbers for pingtest and loadtest in Go for varying levels of GOMAXPROCS for them and the server:
(pingtest/mqtt gomaxprocs) vs pingtest, reporting "elapsed time":
1x1 5.8s
2x1 6.0s
4x1 6.0s
8x1 6.1s
16x1 6.1s
1x2 5.5s
2x2 3.5s
4x2 3.4s
8x2 3.5s
16x2 3.5s
1x4 5.4s
2x4 3.6s
4x4 3.3s
8x4 3.4s
16x4 3.7s
same thing but for loadtest, reported value is "messages/sec":
1x1 75521
2x1 76523
4x1 77477
8x1 74613
16x1 73678
1x2 71439
2x2 100571
4x2 93426
8x2 108938
16x2 97593
1x4 71390
2x4 87426
4x4 98746
8x4 99320
16x4 119692
1x8 64413
2x8 87445
4x8 102953
8x8 120720
16x8 106842
(note that the loadtest doesn't look like it takes long enough to be meaningful in its default)
as always with benchmarks, caveat emptor, but in my opinion go does just fine.
- yelnatz 13y agoAre your numbers in line with the blog's table? So you get those instead of these? Loadtest: Go: 90.9 +/- 11 100.1 +/- 0.1 99.3 +/- 0.2 98.8 +/- 0.3 If not can you make it relevant to the table so people can compare and contrast?
- f2f 13y agoloadtest for 100 500 750 1000, X*Y below means X = loadtest GOMAXPROCS and Y = mqttsrv GOMAXPROCS: 1x1 80735 67696 67068 66585 2x1 64380 76531 31346 43268 4x1 77613 73794 72759 43263 8x1 77813 64197 32899 46960 1x2 71641 72521 72715 72695 2x2 103711 102944 104210 39619 4x2 73171 23803 90537 46204 8x2 96624 49698 33714 45729 1x4 69418 74088 34364 38935 2x4 88805 102847 113740 108829 4x4 102406 108110 34672 120161 8x4 109022 124726 121642 46765 1x8 62336 68238 71297 68754 2x8 104833 115276 118170 44617 4x8 122292 126075 126101 121306 8x8 108826 125098 124765 47713 edit: s/pingtest/loadtest/ in the explanation above.
- yelnatz 13y agoStill not following. For Loadtest: D: -- [121.7 +/- 1.5] -- [166.9 +/- 1.5] -- [171.1 +/- 3.3] -- [167.9 +/- 1.3] C: -- [106.1 +/- 0.8] -- [122.4 +/- 0.4] -- [95.2 +/- 1.3] -- [74.7 +/- 0.4] E: -- [104.1 +/- 2.2] -- [124.2 +/- 5.9] -- [117.6 +/- 4.6 -- [117.7 +/- 3.2] G: ---- [90.9 +/- 11] -- [100.1 +/- 0.1] -- [99.3 +/- 0.2] -- [98.8 +/- 0.3] G(2): ? ? ? ? ? G(4): ? ? ? ? ? G(8): ? ? ? ? ?
- atilaneves 13y agoI mentioned concurrency when I said that using more than one system thread didn't help. I tried varying GOMAXPROCS. It either had no effect or made everything slower. And yes, the defaults for loadtest are useless, they need to run for at least a few seconds. Your results aren't the same ones I got. Maybe it's different with Go 1.2. I have to go and check.
- f2f 13y agothe server (mqttsrv) needs GOMAXPROCS>1 for any appreciable changes in the results, otherwise we're just measuring contention in the client. i ran on a 2-core intel desktop running linux.