Search Postgresql Archives

Centos 6.9 and centos 7

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

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux