pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedShared_buffers and kernel parameters, tuning
3+ messages / 3 participants
[nested] [flat]
* Shared_buffers and kernel parameters, tuning
@ 2003-06-05 08:10 Lending, Rune <rune.lending@inpoc.com>
2003-06-06 15:15 ` Re: Shared_buffers and kernel parameters, tuning Tom Lane <tgl@sss.pgh.pa.us>
2003-06-06 21:36 ` Re: Shared_buffers and kernel parameters, tuning Jonathan Gardner <jgardner@jonathangardner.net>
0 siblings, 2 replies; 3+ messages in thread
From: Lending, Rune @ 2003-06-05 08:10 UTC (permalink / raw)
To: pgsql-admin
After days of searching and testing I have come up with this way of
configuring our postgresql 7.2 db.
I have not yet increased my shared_buffer as high as suggested below on our
prod machine (24-7 high traffic), but after testing on our dev machines
this allows at least the databse to start up. It is very difficult to test
the actual performance since there is a hugh difference in traffic on dev
and prod.
Here is what we have:
We have a high traffic system with a database described as followed:
4 pentium 3 633 cpu's
3753456 kB RAM (3.5 Gb)
Red Hat Linux 7.2
postgresql 7.2
What I like to do is:
/proc/sys/kernel/sem=250 32000 100 500 (after advise from forum/docs)
/proc/sys/kernel/shmmax=1921769472 (RAM / 2 * 1024 - this
piece of math I got from some of oracle's support pages (ooopps) actually )
/proc/sys/kernel/shmall=1921769472 (RAM / 2 * 1024)
in postgresql.conf:
shared_buffers = 117248 (shmmax / 2 / 1024 / 8 ) This I got from this forum.
Does this sound right or am I totally out of bounds here? I have, as said
before done this on our dev macine ( a lot smaller machine ), but it would
be nice with some feedback ..
Thanx in advance for response.
/rune
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Shared_buffers and kernel parameters, tuning
2003-06-05 08:10 Shared_buffers and kernel parameters, tuning Lending, Rune <rune.lending@inpoc.com>
@ 2003-06-06 15:15 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2003-06-06 15:15 UTC (permalink / raw)
To: Lending, Rune <rune.lending@inpoc.com>; +Cc: pgsql-admin
"Lending, Rune" <rune.lending@inpoc.com> writes:
> in postgresql.conf:
> shared_buffers = 117248 (shmmax / 2 / 1024 / 8 ) This I got from this forum.
This is a factor of 10, maybe a factor of 100, more than you need.
It's usually better to let the kernel manage memory. See the
pgsql-performance archives (whenever they're back up :-().
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Shared_buffers and kernel parameters, tuning
2003-06-05 08:10 Shared_buffers and kernel parameters, tuning Lending, Rune <rune.lending@inpoc.com>
@ 2003-06-06 21:36 ` Jonathan Gardner <jgardner@jonathangardner.net>
1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Gardner @ 2003-06-06 21:36 UTC (permalink / raw)
To: Lending, Rune <rune.lending@inpoc.com>; pgsql-admin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thursday 05 June 2003 01:10, Lending, Rune wrote:
> It is very difficult to test
> the actual performance since there is a hugh difference in traffic on dev
> and prod.
I would resolve this problem as well. How can you know any of your changes
won't cause severe problems?
Using your favorite scripting language, and your knowledge of what statements
are being executed, you should devise some test processes that mimic the
statements being run on production. Then, have a computer (or several, if
need be) launch a whole bunch of processes that run these statements against
the dev server. It isn't too hard to generate appropriate traffic on the dev
server. And you will be very pleased with the ability to experiment with more
load and various settings. Plus, you can measure how long each statement
takes to run, and track how indexes and variations on statements will affect
performance.
I think this is fundamental to any performance tweaks. If you have no way to
control the traffic to the server, and you have no way of measuring the
performance, how can you tell if what you did helped or hurt?
- --
Jonathan Gardner <jgardner@jonathangardner.net>
(was jgardn@alumni.washington.edu)
Live Free, Use Linux!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+4QlSWgwF3QvpWNwRApJxAKC1XU/h2ypAcCf0ewJU+xuD14powQCgqMOT
LKUWPrHPEugf5r7C+kP3eSM=
=XkNs
-----END PGP SIGNATURE-----
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2003-06-06 21:36 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-06-05 08:10 Shared_buffers and kernel parameters, tuning Lending, Rune <rune.lending@inpoc.com>
2003-06-06 15:15 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-06-06 21:36 ` Jonathan Gardner <jgardner@jonathangardner.net>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox