Description:
We build a new database server Enterprisedb v9.3 (PostgreSQL commercial), so we use JMX to benchmark it with 1000 users. Here is our detailed information:
Operating System: Centos 6 x64
RAM: 8 GB
CPU: 2 CPU, Intel(R) Xeon (R) CPU @ 2.50 GHz
User quantity: 1000
Query to benchmark:
select count(distinct(a.id))
from table_a a
join table_b on a.id = b.fk_id (*)
Running (*) before benchmark : 100 ms -> 200 ms
Running (*) during benchmark : 3000 ms -> 180000 ms (increase 30 -> 900 times)
CPU is used by benchmark: ~ 95 %
RAM is used by benchmark: ~ 3.5 GB
postgresql.conf file:
max_connections = 2000
shared_buffers = 5000MB
temp_buffers = 32MB
work_mem = 5MB
maintenance_work_mem = 1MB
effective_cache_size = 1000MB
checkpoint_segments = 128
edb_enable_icache = on
enable_indexscan = on
enable_mergejoin = on
enable_nestloop = on
edb_dynatune = 90
edb_dynatune_profile = oltp
Questions:
If resources do not change, how we can improve our configuration? (can we edit parameters in
postgresql.conf?)Can we use pgbench to benchmark with query (*) above?