From: | Nicola Contu <nicola(dot)contu(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Centos 6.9 and centos 7 |
Date: | 2017-12-04 13:19:32 |
Message-ID: | CAMTZZh0qVJ6fe7CV_Pxw8Yg4BhWycv-1EvWLuHQTNG47T9Rotw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
we recently upgrade OS from centos 6.9 to a new server with centos 7.
The centos 6.9 server has became the preproduction server now.
We are running postgres 9.6.6 on both servers.
They are both on SSD disk, these are the only differences :
- DB partition on centos 7 is on a RAID 10
- file system is xfs on centos 7 (ext4 in centos 6.9)
- more memory on the centos 7 (so params on the postgres.conf are higher)
max_connections = 220
shared_buffers = 10GB
effective_cache_size = 120GB
work_mem = 349525kB
maintenance_work_mem = 2GB
min_wal_size = 1GB
max_wal_size = 2GB
checkpoint_completion_target = 0.7
wal_buffers = 16MB
default_statistics_target = 100
- we have two replicas on the centos 7. One is async one is sync
synchronous_standby_names = '1 ( "****" )'
synchronous_commit = on
The have the same db inside, with same data.
Running the same script on the two servers will give different results.
Even a select query is faster on the centos 6.9 server. Half time on the
preprod server
centos 7 :
dbname=# \timing Timing is on. cmdv3=# SELECT id FROM
client_billing_account WHERE name = 'name'; id ------- ***** (1 row) Time:
3.884 ms
centos 6.9
dbname=# SELECT id FROM client_billing_account WHERE name = 'name'; id
------- ***** (1 row) Time: 1.620 ms
This table has 32148 records.
Do you think we can modify anything to achieve same performances?
I read about few kernel params :
kernel.sched_migration_cost_ns = 5000000
kernel.sched_autogroup_enabled = 0
vm.dirty_background_bytes = 67108864
vm.dirty_bytes = 1073741824
vm.zone_reclaim_mode = 0
vm.swappiness = 1.1
Is there anything you can advice to solve or identify the problem?
Thanks a lot,
Nicola
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Wilson | 2017-12-04 13:24:08 | Re: Adding identity column to a non-empty table |
Previous Message | Martin Moore | 2017-12-04 13:00:16 | Re: Replication causing publisher node to use excessive cpu over time |