Skip to content

Instantly share code, notes, and snippets.

@yuuki
Last active June 22, 2016 14:22
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 yuuki/c222c5e09d7937a3478ef14fd133f796 to your computer and use it in GitHub Desktop.
Save yuuki/c222c5e09d7937a3478ef14fd133f796 to your computer and use it in GitHub Desktop.
each-fork vs prefork
yuukit@syscall01:~/perl$ ab -n 100000 -c 5 http://10.240.0.7:10020/
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 10.240.0.7 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requests
Server Software:
Server Hostname: 10.240.0.7
Server Port: 10020
Document Path: /
Document Length: 0 bytes
Concurrency Level: 5
Time taken for tests: 43.208 seconds
Complete requests: 100000
Failed requests: 0
Total transferred: 1600000 bytes
HTML transferred: 0 bytes
Requests per second: 2314.41 [#/sec] (mean)
Time per request: 2.160 [ms] (mean)
Time per request: 0.432 [ms] (mean, across all concurrent requests)
Transfer rate: 36.16 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 4
Processing: 0 2 0.2 2 6
Waiting: 0 2 0.2 2 6
Total: 1 2 0.2 2 7
Percentage of the requests served within a certain time (ms)
50% 2
66% 2
75% 2
80% 2
90% 2
95% 3
98% 3
99% 3
100% 7 (longest request)
7.52% [kernel] [k] copy_page
5.15% [kernel] [k] __do_page_fault
4.66% [kernel] [k] copy_pte_range
4.40% [unknown] [.] 0x00007f9a7c6551c0
3.96% [kernel] [k] _raw_spin_unlock_irqrestore
3.36% [kernel] [k] unmap_single_vma
3.07% [unknown] [.] 0x00007f9a7c64bbdd
2.90% [kernel] [k] page_remove_rmap
2.59% [kernel] [k] get_page_from_freelist
2.30% [kernel] [k] do_wp_page
2.10% [kernel] [k] filemap_map_pages
1.93% [kernel] [k] flush_tlb_page
1.81% [kernel] [k] _raw_spin_lock
1.39% [unknown] [.] 0x00007f9a7c64bbb4
1.04% [kernel] [k] release_pages
1.02% [unknown] [.] 0x00007f9a7c64bbd0
0.97% [kernel] [k] free_hot_cold_page
0.95% [kernel] [k] handle_mm_fault
0.92% [kernel] [k] __wake_up_bit
0.91% [kernel] [k] finish_task_switch
0.89% [unknown] [.] 0x00007f9a7c64bbe3
0.82% [unknown] [.] 0x00007f9a7c6553c4
0.81% [kernel] [k] page_add_new_anon_rmap
0.80% [kernel] [k] run_timer_softirq
0.76% [kernel] [k] page_waitqueue
0.75% [unknown] [.] 0x00007f9a7c64bbd9
0.73% [kernel] [k] anon_vma_interval_tree_insert
0.72% [unknown] [.] 0x00007f9a7c6552f8
0.67% [kernel] [k] clear_page
0.65% [kernel] [k] copy_process.part.25
0.64% [kernel] [k] unlock_page
0.60% [kernel] [k] mutex_unlock
0.59% [unknown] [.] 0x00007f9a7c6551b9
0.58% [kernel] [k] find_vma
0.54% [kernel] [k] iowrite16
0.54% [kernel] [k] __mod_zone_page_state
0.49% [kernel] [k] cpumask_any_but
yuukit@syscall01:~/wrk2$ ab -n 100000 -c 5 http://10.240.0.7:10020/
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 10.240.0.7 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Completed 100000 requests
Finished 100000 requests
Server Software:
Server Hostname: 10.240.0.7
Server Port: 10020
Document Path: /
Document Length: 0 bytes
Concurrency Level: 5
Time taken for tests: 6.607 seconds
Complete requests: 100000
Failed requests: 0
Total transferred: 1600000 bytes
HTML transferred: 0 bytes
Requests per second: 15135.60 [#/sec] (mean)
Time per request: 0.330 [ms] (mean)
Time per request: 0.066 [ms] (mean, across all concurrent requests)
Transfer rate: 236.49 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 3
Processing: 0 0 0.0 0 3
Waiting: 0 0 0.0 0 3
Total: 0 0 0.1 0 4
Percentage of the requests served within a certain time (ms)
50% 0
66% 0
75% 0
80% 0
90% 0
95% 0
98% 0
99% 0
100% 4 (longest request)
6.59% [kernel] [k] iowrite16 5.06% [kernel] [k] __do_softirq 4.36% [kernel] [k] finish_task_switch 3.31% [kernel] [k] _raw_spin_unlock_irqrestore
2.61% [kernel] [k] _raw_spin_lock
2.56% [kernel] [k] _raw_spin_lock_bh
1.30% [kernel] [k] pvclock_clocksource_read
0.82% [kernel] [k] kmem_cache_alloc
0.78% [kernel] [k] virtqueue_get_buf
0.78% [kernel] [k] tick_nohz_idle_enter
0.73% [kernel] [k] __sk_run_filter
0.64% [unknown] [.] 0x00007f8499d3a5f0
0.59% [kernel] [k] __copy_skb_header
0.55% [kernel] [k] virtnet_poll
0.54% [kernel] [k] tcp_ack
0.53% [kernel] [k] virtqueue_kick_prepare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment