Note that there are some explanatory texts on larger screens.

plurals
  1. POthe program performance when using epoll with EPOLLONESHOT in multithread server
    primarykey
    data
    text
    <p>the code is so easy, because i use EPOLLONESHOT to create a leader-follower multithread server program.</p> <p>i run a test for it, and the server just do echo directly. when the qps reaches 150000, the 12 worker thread falls into D status, but the server has no memory alloc and the disk isn't busy at all. </p> <p>the server's qps won't raise if i continue to add more test client for it, it just stays at 150000 qps.</p> <p>this is all my server does, the test client and the server is on the same machine talking through lo(not phyics network card), the cpu idle per cpu is 60, but the performance just don't increase any more, what's the Bottleneck here ?</p> <pre><code>epoll_wait(4, {{EPOLLIN, {u32=28, u64=28}}}, 1, 1000) = 1 &lt;0.000051&gt; read(28, "hello world\n", 4096) = 12 &lt;0.000005&gt; write(28, "hello world\n", 12) = 12 &lt;0.000015&gt; epoll_ctl(4, EPOLL_CTL_MOD, 28, {EPOLLIN|EPOLLONESHOT, {u32=28, u64=4656724694760685596}}) = 0 &lt;0.000033&gt; epoll_wait(4, {{EPOLLIN, {u32=14, u64=14}}}, 1, 1000) = 1 &lt;0.000038&gt; read(14, "hello world\n", 4096) = 12 &lt;0.000005&gt; write(14, "hello world\n", 12) = 12 &lt;0.000013&gt; epoll_ctl(4, EPOLL_CTL_MOD, 14, {EPOLLIN|EPOLLONESHOT, {u32=14, u64=4656724694760685582}}) = 0 &lt;0.000040&gt; epoll_wait(4, {{EPOLLIN, {u32=15, u64=15}}}, 1, 1000) = 1 &lt;0.000056&gt; read(15, "hello world\n", 4096) = 12 &lt;0.000005&gt; write(15, "hello world\n", 12) = 12 &lt;0.000008&gt; epoll_ctl(4, EPOLL_CTL_MOD, 15, {EPOLLIN|EPOLLONESHOT, {u32=15, u64=4656724694760685583}}) = 0 &lt;0.000047&gt; epoll_wait(4, {{EPOLLIN, {u32=33, u64=33}}}, 1, 1000) = 1 &lt;0.000039&gt; read(33, "hello world\n", 4096) = 12 &lt;0.000004&gt; write(33, "hello world\n", 12) = 12 &lt;0.000019&gt; epoll_ctl(4, EPOLL_CTL_MOD, 33, {EPOLLIN|EPOLLONESHOT, {u32=33, u64=4656724694760685601}}) = 0 &lt;0.000039&gt; epoll_wait(4, {{EPOLLIN, {u32=35, u64=35}}}, 1, 1000) = 1 &lt;0.000042&gt; read(35, "hello world\n", 4096) = 12 &lt;0.000005&gt; write(35, "hello world\n", 12) = 12 &lt;0.000010&gt; epoll_ctl(4, EPOLL_CTL_MOD, 35, {EPOLLIN|EPOLLONESHOT, {u32=35, u64=4656724694760685603}}) = 0 &lt;0.000042&gt; epoll_wait(4, {{EPOLLIN, {u32=8, u64=8}}}, 1, 1000) = 1 &lt;0.000039&gt; read(8, "hello world\n", 4096) = 12 &lt;0.000006&gt; write(8, "hello world\n", 12) = 12 &lt;0.000007&gt; epoll_ctl(4, EPOLL_CTL_MOD, 8, {EPOLLIN|EPOLLONESHOT, {u32=8, u64=4656724694760685576}}) = 0 &lt;0.000054&gt; epoll_wait(4, {{EPOLLIN, {u32=21, u64=21}}}, 1, 1000) = 1 &lt;0.000034&gt; 13283 work 15 0 636m 256m 308 R 19 0.4 4:33.09 server 13288 work 15 0 636m 256m 308 D 19 0.4 4:33.27 server 13286 work 15 0 636m 256m 308 D 17 0.4 4:32.60 server 13287 work 15 0 636m 256m 308 D 17 0.4 4:34.72 server 13280 work 15 0 636m 256m 308 D 15 0.4 4:33.20 server 13281 work 15 0 636m 256m 308 D 15 0.4 7:50.35 server 13282 work 15 0 636m 256m 308 R 15 0.4 4:33.14 server 13290 work 15 0 636m 256m 308 R 15 0.4 4:31.80 server 13279 work 15 0 636m 256m 308 D 13 0.4 4:24.11 server 13285 work 15 0 636m 256m 308 D 13 0.4 4:32.91 server 13289 work 15 0 636m 256m 308 D 13 0.4 4:32.34 server 13284 work 15 0 636m 256m 308 D 12 0.4 4:31.70 server 14042 work 16 0 2380 344 280 S 10 0.0 1:46.98 test_long_conn 6403 work 16 0 3692 580 416 S 10 0.0 0:00.12 grep 13915 work 16 0 2380 344 280 S 8 0.0 1:47.42 test_long_conn 13930 work 16 0 2380 344 280 R 8 0.0 1:49.59 test_long_conn 13945 work 16 0 2380 344 280 S 8 0.0 1:48.38 test_long_conn 13841 work 16 0 2380 344 280 S 6 0.0 1:36.61 test_long_conn 13847 work 16 0 2380 344 280 S 6 0.0 1:49.55 test_long_conn 13848 work 16 0 2380 344 280 S 6 0.0 1:48.75 test_long_conn 13849 work 16 0 2380 344 280 S 6 0.0 1:48.45 test_long_conn 13850 work 16 0 2380 344 280 S 6 0.0 1:48.74 test_long_conn 13913 work 16 0 2380 344 280 R 6 0.0 1:47.50 test_long_conn </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload