Hi,
we're evaluating Proxmox (OpenVZ containers) and found a strange issue.
I've run several tests with postgresql's benchmarking tool pgbench. Below are my findings. Maybe it's similiar issue to the issue mentioned in other threads.
1) When I run pgbench on the host itself it's always very slow, it's running at 10-20% of expected performance.
2) When I run pgbench in OpenVZ container, it's usually slow (cca 20% of expected performance) but sometimes I get the expected performance for the hardware it's running on.
We're running several servers with postgresql and never seen anything similar. We have server with nearly same hardware which is running ok (with pure debian).
Can anyone else reproduce this?
I'll try non-proxmox kernel next week - any other suggestions how to investigate further?
How to reproduce(?):
Server - 4 cores, 4GB RAM - I guess that 2 cores and say 1GB also demostrate the issue (but haven't tried)
Install postgresql 8.3 from debian package (postgresql-8.3, postgresql-contrib-8.3).
Edit
/etc/postgresql/8.3/main/postgresql.conf
shared_buffers = 512MB
fsync = off # uncomment this line
Run as root:
sysctl kernel.shmmax=600000000
/etc/init.d/postgresql-8.3 restart
su postgres
cd /usr/lib/postgresql/8.3/bin
./createdb pgbench
./pgbench -i -s100 pgbench
And now repeat this test several times:
./pgbench -c50 -t200 pgbench
From time to time restart postgresql
/etc/init.d/postgresql-8.3 restart
Sometimes the first run after the restart is ok performance wise. But only in container, never in host.
Expected result for modern multicore server is 1000-2000tps. But most of the time I was getting 200-400tps.
pgbench is known for irreproducible results so anything higher than 1000tps is good and below 500tps is serious problem (on modern hardware with ram and fsync off).
Looking at vmstat I think that the issue is IO connected.
I've tried both cfq and deadline IO schedulers but the result is the same.
bonnie++ performance on host is ok, in container is lower (why? simfs overhead?).
For the test, I've used one sata disk - but it shouldn't matter because fsync=off should have made everyhing to go through kernel buffers/cache...
we're evaluating Proxmox (OpenVZ containers) and found a strange issue.
I've run several tests with postgresql's benchmarking tool pgbench. Below are my findings. Maybe it's similiar issue to the issue mentioned in other threads.
1) When I run pgbench on the host itself it's always very slow, it's running at 10-20% of expected performance.
2) When I run pgbench in OpenVZ container, it's usually slow (cca 20% of expected performance) but sometimes I get the expected performance for the hardware it's running on.
We're running several servers with postgresql and never seen anything similar. We have server with nearly same hardware which is running ok (with pure debian).
Can anyone else reproduce this?
I'll try non-proxmox kernel next week - any other suggestions how to investigate further?
How to reproduce(?):
Server - 4 cores, 4GB RAM - I guess that 2 cores and say 1GB also demostrate the issue (but haven't tried)
Install postgresql 8.3 from debian package (postgresql-8.3, postgresql-contrib-8.3).
Edit
/etc/postgresql/8.3/main/postgresql.conf
shared_buffers = 512MB
fsync = off # uncomment this line
Run as root:
sysctl kernel.shmmax=600000000
/etc/init.d/postgresql-8.3 restart
su postgres
cd /usr/lib/postgresql/8.3/bin
./createdb pgbench
./pgbench -i -s100 pgbench
And now repeat this test several times:
./pgbench -c50 -t200 pgbench
From time to time restart postgresql
/etc/init.d/postgresql-8.3 restart
Sometimes the first run after the restart is ok performance wise. But only in container, never in host.
Expected result for modern multicore server is 1000-2000tps. But most of the time I was getting 200-400tps.
pgbench is known for irreproducible results so anything higher than 1000tps is good and below 500tps is serious problem (on modern hardware with ram and fsync off).
Looking at vmstat I think that the issue is IO connected.
I've tried both cfq and deadline IO schedulers but the result is the same.
bonnie++ performance on host is ok, in container is lower (why? simfs overhead?).
For the test, I've used one sata disk - but it shouldn't matter because fsync=off should have made everyhing to go through kernel buffers/cache...
Last edited: