Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

We have some Postgres + PostGIS applications that run well on CentOS 6 32-bit machines.

We've recently been testing them on CentOS 6 64-bit machines, with similar configuration (all our machines are managed by Puppet), and the applications run significantly slower.

Even loading the database schemas take several times as long. (On the 32-bit machines, this takes 7 seconds to load PostGIS, the schema, and fixtures; on the 64-bit machines, this takes 50-110 seconds.)

We initially had the problems with virtual servers, so ran tests on a physical machine and found the same problems. Note that the physical 64-bit machine is slower than virtual 32-bit machines.

The databases are not large at all.

We've experimented with various parameters on postgresql.conf and not gotten any improvement.

Is this a known issue with Postgres or PostGIS on 64-bit CentOS?

If not, how do we diagnose this?

share|improve this question
    
I won't know... but what postgres version are you using? and are you using the centos RPM's or the official postgres one's from the postgres repo's. –  xenoterracide Jun 25 '13 at 16:56
    
I'm using the CentOS ones, for 8.4. I wasn't aware that there were official Postgres ones on a repo. –  Rob Jun 25 '13 at 18:17

1 Answer 1

Start by using a current PostgreSQL version, preferably a PGDG build. See http://yum.postgresql.org.

Then compare with the same hardware.

There is no known significant performance difference with 64-bit vs 32-bit PostgreSQL on non-Windows platforms.

Personally, I suspect that the 64-bit CentOS might have transparent huge pages enabled, which does cause severe performance regressions with PostgreSQL. See http://dba.stackexchange.com/a/34169/7788, this mailing list post, and Google.

You might also be having issues with the zone reclaim mode for NUMA; Linux's default works very poorly for databases that use shared memory. Set vm.zone_reclaim_mode = 0 in sysctl.conf and apply the changes.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.