Skip to content

Instantly share code, notes, and snippets.

@kellabyte
Last active November 24, 2016 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kellabyte/4e8fa3d6e913f866de0c78b53599cc6e to your computer and use it in GitHub Desktop.
Save kellabyte/4e8fa3d6e913f866de0c78b53599cc6e to your computer and use it in GitHub Desktop.

3 million requests/second

./build/hello_world --threads 20 --balancer reuseport
perf top

   9.76%  hello_world              [.] http_parser_execute
   7.85%  libc-2.21.so             [.] malloc
   4.50%  libc-2.21.so             [.] free
   3.43%  libc-2.21.so             [.] __libc_calloc
   3.23%  libc-2.21.so             [.] 0x00000000001452a0
   3.21%  hello_world              [.] http_request_buffer_pin
   2.91%  hello_world              [.] http_request_buffer_reassign_pin
   2.64%  hello_world              [.] http_request_buffer_locate
   1.97%  libc-2.21.so             [.] 0x000000000014d6b0
   1.93%  [kernel]                 [k] native_queued_spin_lock_slowpath
   1.47%  [kernel]                 [k] tcp_sendmsg
   1.39%  libc-2.21.so             [.] realloc
   1.37%  libc-2.21.so             [.] 0x000000000014d86c
   1.36%  libc-2.21.so             [.] 0x00000000000806dd

5 million requests/second

for i in `seq 20`; do ./build/hello_world --balancer reuseport & done
perf top

   5.98%  hello_world              [.] http_parser_execute
   5.51%  hello_world              [.] http_request_buffer_pin
   5.43%  hello_world              [.] http_request_buffer_reassign_pin
   3.68%  hello_world              [.] http_request_buffer_locate
   3.08%  libc-2.21.so             [.] malloc
   2.34%  libc-2.21.so             [.] free
   2.28%  [kernel]                 [k] native_queued_spin_lock_slowpath
   2.22%  libc-2.21.so             [.] __libc_calloc
   2.01%  [kernel]                 [k] tcp_sendmsg
   1.94%  libc-2.21.so             [.] 0x000000000007f05d
   1.37%  hello_world              [.] set_header
   1.25%  [kernel]                 [k] _raw_spin_lock_bh
   1.17%  hello_world              [.] create_response_buffer
   1.08%  hello_world              [.] http_request_on_message_complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment