We just got a new box in and I did some benchmarks on it just to see how it 
worked.  It's an Intel i5 (dual core, hyperthreading enabled, so it appears to 
have four cores to the OS) running 64-bit Ubuntu 9.10.  Each core reports 
something like this from /proc/cpuinfo:

   processor    : 3
   vendor_id    : GenuineIntel
   cpu family   : 6
   model                : 30
   model name   : Intel(R) Core(TM) i5 CPU         750  @ 2.67GHz
   stepping     : 5
   cpu MHz              : 1197.000
   cache size   : 8192 KB
   physical id  : 0
   siblings     : 4
   core id              : 3
   cpu cores    : 4
   apicid               : 6
   initial apicid       : 6
   fpu          : yes
   fpu_exception        : yes
   cpuid level  : 11
   wp           : yes
   flags                : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge 
mca cmov   pat 
pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
constant_tsc arch_perfmon pebs bts rep_good xtopology tsc_reliable nonstop_tsc 
pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 
popcnt lahf_lm ida tpr_shadow vnmi flexpriority ept vpid
   bogomips     : 5333.41
   clflush size : 64
   cache_alignment      : 64
   address sizes        : 36 bits physical, 48 bits virtual

For the static file rendered at / we get this from ab -n1001 -c15:

   Server Software:        Apache/2.2.12
   Server Hostname:        127.0.0.1
   Server Port:            80

   Document Path:          /
   Document Length:        177 bytes

   Concurrency Level:      15
   Time taken for tests:   0.088 seconds
   Complete requests:      1001
   Failed requests:        0
   Write errors:           0
   Total transferred:      452904 bytes
   HTML transferred:       177354 bytes
   Requests per second:    11339.31 [#/sec] (mean)
   Time per request:       1.323 [ms] (mean)
   Time per request:       0.088 [ms] (mean, across all concurrent requests)
   Transfer rate:          5010.24 [Kbytes/sec] received

That would be somewhere around 11K requests per second or so.

For the followng "bare" WSGI app:

   def application(environ, start_response):
      start_response('200 OK', [('Content-Type', 'text/plain'),
                                ('Content-Length', '5')])
      return ['hello']

ab -n1001 -c15 returns:

   Server Software:        Apache/2.2.12
   Server Hostname:        127.0.0.1
   Server Port:            80

   Document Path:          /bareapp
   Document Length:        5 bytes

   Concurrency Level:      15
   Time taken for tests:   0.090 seconds
   Complete requests:      1001
   Failed requests:        0
   Write errors:           0
   Total transferred:      180720 bytes
   HTML transferred:       5020 bytes
   Requests per second:    11129.89 [#/sec] (mean)
   Time per request:       1.348 [ms] (mean)
   Time per request:       0.090 [ms] (mean, across all concurrent requests)
   Transfer rate:          1962.29 [Kbytes/sec] received

That's about 11K requests per second too.

For the "helloworld" program at http://svn.repoze.org/whatsitdoing/bfg using 
mod_wsgi 1.2a2 under Python 2.6 configured using mod_wsgi 2.5 in daemon mode 
with 4 processes and 15 threads, we get the following from ab -n1001 -c15:

   Server Software:        Apache/2.2.12
   Server Hostname:        127.0.0.1
   Server Port:            80

   Document Path:          /helloworld
   Document Length:        5 bytes

   Concurrency Level:      15
   Time taken for tests:   0.111 seconds
   Complete requests:      1001
   Failed requests:        0
   Write errors:           0
   Total transferred:      179537 bytes
   HTML transferred:       5015 bytes
   Requests per second:    9021.27 [#/sec] (mean)
   Time per request:       1.663 [ms] (mean)
   Time per request:       0.111 [ms] (mean, across all concurrent requests)
   Transfer rate:          1580.11 [Kbytes/sec] received

Using "siege" (http://freshmeat.net/projects/siege/) for the BFG app we get 
similar results (1000 reps, 20 concurrent users in benchmark mode):

   ** SIEGE 2.68
   ** Preparing 20 concurrent users for battle.
   The server is now under siege..      done.
   Transactions:                       20000 hits
   Availability:                      100.00 %
   Elapsed time:                        2.48 secs
   Data transferred:            0.48 MB
   Response time:                       0.00 secs
   Transaction rate:         8064.52 trans/sec
   Throughput:                  0.19 MB/sec
   Concurrency:                19.61
   Successful transactions:       20000
   Failed transactions:            0
   Longest transaction:         0.02
   Shortest transaction:                0.00

That would be somewhere around 8K - 9K requests per second, depending on whom 
you believe.

That's pretty snappy hardware for not much money.  I don't think we have much 
excuse for slow web apps anymore.

- C
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to