Slow Postgresql server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,

My website has been having issues with our new Linux/PostgreSQL server being somewhat slow. I have done tests using Apache Benchmark and for pages that do not connect to Postgres, the speeds are much faster (334 requests/second v. 1-2 requests/second), so it seems that Postgres is what's causing the problem and not Apache. I did some reserach, and it seems that the bottleneck is in fact the hard drives! Here's an excerpt from vmstat:

procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------ r b swpd free buff cache si so bi bo in cs us sy id wa st 1 1 140 24780 166636 575144 0 0 0 3900 1462 3299 1 4 49 48 0 0 1 140 24780 166636 575144 0 0 0 3828 1455 3391 0 4 48 48 0 1 1 140 24780 166636 575144 0 0 0 2440 960 2033 0 3 48 48 0 0 1 140 24780 166636 575144 0 0 0 2552 1001 2131 0 2 50 49 0 0 1 140 24780 166636 575144 0 0 0 3188 1233 2755 0 3 49 48 0 0 1 140 24780 166636 575144 0 0 0 2048 868 1812 0 2 49 49 0 0 1 140 24780 166636 575144 0 0 0 2720 1094 2386 0 3 49 49 0

As you can see, almost 50% of the CPU is waiting on I/O. This doesn't seem like it should be happening, however, since we are using a RAID 1 setup (160+160). We have 1GB ram, and have upped shared_buffers to 13000 and work_mem to 8096. What would cause the computer to only use such a small percentage of the CPU, with more than half of it waiting on I/O requests?

Thanks a lot
Jason



[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux