From: | Mike Bresnahan <mike(dot)bresnahan(at)bestbuy(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Amazon EC2 CPU Utilization |
Date: | 2010-01-29 18:35:33 |
Message-ID: | loom.20100129T191859-7@post.gmane.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-general |
In an attempt to determine whether top(1) is lying about the CPU utilization, I
did an experiment. I fired up a EC2 c1.xlarge instance and ran pgbench and a
tight loop in parallel.
-bash-4.0$ uname -a
Linux domu-12-31-39-00-8d-71.compute-1.internal 2.6.31-302-ec2 #7-Ubuntu SMP Tue
Oct 13 19:55:22 UTC 2009 x86_64 x86_64 x86_64 GNU/Linux
-bash-4.0$ pgbench -S -T 30 -c 16 -h localhost
Password:
starting vacuum...end.
transaction type: SELECT only
scaling factor: 64
query mode: simple
number of clients: 16
duration: 30 s
number of transactions actually processed: 804719
tps = 26787.949376 (including connections establishing)
tps = 26842.193411 (excluding connections establishing)
While pgbench was running I ran a tight loop at the bash prompt.
-bash-4.0# time for i in {1..10000000}; do true; done
real 0m36.660s
user 0m33.100s
sys 0m2.040s
Then I ran each alone.
-bash-4.0$ pgbench -S -T 30 -c 16 -h localhost
Password:
starting vacuum...end.
transaction type: SELECT only
scaling factor: 64
query mode: simple
number of clients: 16
duration: 30 s
number of transactions actually processed: 964639
tps = 32143.595223 (including connections establishing)
tps = 32208.347194 (excluding connections establishing)
-bash-4.0# time for i in {1..10000000}; do true; done
real 0m32.811s
user 0m31.330s
sys 0m1.470s
Running the loop caused pgbench to lose about 12.5% (1/8), which is exactly what
I would expect on a 8 core machine. So it seems that top(1) is lying.
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2010-01-29 18:48:37 | Re: unable to fail over to warm standby server |
Previous Message | Mason Hale | 2010-01-29 16:27:26 | Re: unable to fail over to warm standby server |
From | Date | Subject | |
---|---|---|---|
Next Message | Gauthier, Dave | 2010-01-29 19:34:07 | Learning more about attaches |
Previous Message | Greg Sabino Mullane | 2010-01-29 17:34:25 | Re: Versions RSS page is missing version(s) |