Skip site navigation (1) Skip section navigation (2)

Optimisation

From: dforums <dforums(at)vieonet(dot)com>
To: pgsql-fr-generale(at)postgresql(dot)org
Subject: Optimisation
Date: 2008-03-04 22:06:19
Message-ID: 47CDC7DB.3020907@vieonet.com (view raw or flat)
Thread:
Lists: pgsql-fr-generale
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000099">
Bonjour,<br>
<br>
J'ai un serveur Quad Xeon, avec 8 Go de ram, <br>
<br>
Une base de donn&eacute;e postgresql qui fait 10 Go.<br>
<br>
J'ai des requetes sur des tables qui sont beaucoup updat&eacute; et qui prenne
beaucoup de temps (0.3300 ms).<br>
<br>
Je pense que j'ai un souci sur l'optimisation des param&eacute;tres de la base
de donn&eacute;e <br>
<br>
voici mes params :<br>
<br>
<br>
max_connections = 256<br>
shared_buffers = 1500&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # min 16 or max_connections*2,
8KB each<br>
temp_buffers = 500&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # min 100, 8KB each<br>
max_prepared_transactions = 100 <br>
<br>
work_mem = 22000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # min 64, size in KB<br>
maintenance_work_mem = 500000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # min 1024, size in KB<br>
max_stack_depth = 8192 <br>
<br>
<br>
max_fsm_pages = 100000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # min max_fsm_relations*16, 6
bytes each<br>
max_fsm_relations = 5000&nbsp; <br>
<br>
<br>
vacuum_cost_delay = 50&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 0-1000 milliseconds<br>
vacuum_cost_page_hit = 1000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 0-10000 credits<br>
vacuum_cost_page_miss = 1000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 0-10000 credits<br>
vacuum_cost_page_dirty = 120&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 0-10000 credits<br>
vacuum_cost_limit = 2000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 0-10000 credits<br>
<br>
# - Background writer -<br>
<br>
bgwriter_delay = 50&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 10-10000 milliseconds between
rounds<br>
bgwriter_lru_percent = 1.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 0-100% of LRU buffers
scanned/round<br>
bgwriter_lru_maxpages = 25&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 0-1000 buffers max
written/round<br>
bgwriter_all_percent = 0.333&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 0-100% of all buffers
scanned/round<br>
bgwriter_all_maxpages = 50&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 0-1000 buffers max
written/round<br>
<br>
wal_buffers = 16&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # min 4, 8KB each<br>
commit_delay = 500&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # range 0-100000, in
microseconds<br>
commit_siblings = 50&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # range 1-1000<br>
<br>
# - Checkpoints -<br>
<br>
checkpoint_segments = 50&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # in logfile segments, min 1,
16MB each<br>
checkpoint_timeout = 1800&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # range 30-3600, in seconds<br>
checkpoint_warning = 180&nbsp;&nbsp;&nbsp; <br>
<br>
effective_cache_size = 2048&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # typically 8KB each<br>
random_page_cost = 3&nbsp;&nbsp; <br>
<br>
<br>
m&eacute;moire partag&eacute;<br>
echo /proc/sys/kernel/shmmax = 256000000<br>
<br>
POurriez vous me donner des conseils pour l'optimisation car la je rame.<br>
<br>
Merci<br>
<br>
David<br>
<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>


Attachment: unknown_filename
Description: text/html (4.1 KB)

Responses

pgsql-fr-generale by date

Next:From: Sébastien LardièreDate: 2008-03-04 22:22:10
Subject: Re: Optimisation
Previous:From: Sébastien LardièreDate: 2008-03-04 21:14:08
Subject: Re: Optimisation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group