pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedSwapping
4+ messages / 3 participants
[nested] [flat]
* Swapping
@ 2005-08-31 18:25 Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-31 18:49 ` Re: Swapping Tom Lane <tgl@sss.pgh.pa.us>
2005-08-31 19:22 ` Re: Swapping Tobias Brox <tobias@nordicbet.com>
0 siblings, 2 replies; 4+ messages in thread
From: Carlos Henrique Reimer @ 2005-08-31 18:25 UTC (permalink / raw)
To: pgsql-performance
Hi,
I´m trying to tune a linux box with a 12 GB database and 4 GB RAM. First of all I would like to stop the swapping, so the shared_buffers and sort_mem were decreased but even so it started swapping two hours after DBMS started up.
I would like to know some suggestions how to discover why is it swapping?
I´ve collected the following data from the environment and saved at http://paginas.terra.com.br/educacao/rei/dados.htm
1. select version()
2. uname -a
3. cat /proc/cpuinfo
4. cat /proc/meminfo
5. vmstat 5
6. pg_stat_activity
7. postgresql.conf
Thanks in advance!
Reimer
__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger
http://br.download.yahoo.com/messenger/
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Swapping
2005-08-31 18:25 Swapping Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
@ 2005-08-31 18:49 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 4+ messages in thread
From: Tom Lane @ 2005-08-31 18:49 UTC (permalink / raw)
To: Carlos Henrique Reimer <carlosreimer@yahoo.com.br>; +Cc: pgsql-performance
Carlos Henrique Reimer <carlosreimer@yahoo.com.br> writes:
> I would like to know some suggestions how to discover why is it swapping?
Zero swap-in rate and swap-out rates in the single digits do not
constitute a swapping problem. It's reasonably likely that that
traffic isn't even coming from Postgres, but something else.
I'd say ignore it.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Swapping
2005-08-31 18:25 Swapping Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
@ 2005-08-31 19:22 ` Tobias Brox <tobias@nordicbet.com>
2005-08-31 19:33 ` Re: Swapping Tobias Brox <tobias@nordicbet.com>
1 sibling, 1 reply; 4+ messages in thread
From: Tobias Brox @ 2005-08-31 19:22 UTC (permalink / raw)
To: Carlos Henrique Reimer <carlosreimer@yahoo.com.br>; +Cc: pgsql-performance
[Carlos Henrique Reimer - Wed at 03:25:15PM -0300]
> I´m trying to tune a linux box with a 12 GB database and 4 GB RAM. First
> of all I would like to stop the swapping, so the shared_buffers and sort_mem
> were decreased but even so it started swapping two hours after DBMS started
> up.
>
> I would like to know some suggestions how to discover why is it swapping?
I agree with Tom Lane, nothing to worry about. Swapping is not a problem
per se, aggressive swapping is a problem. If you are absolutely sure you
want to ban all swapping, use "swapoff"?
I'd trust linux to handle swap/cache sensibly. Eventually, become involved
with kernel hacking ;-)
--
Notice of Confidentiality: This email is sent unencrypted over the network,
and may be stored on several email servers; it can be read by third parties
as easy as a postcard. Do not rely on email for confidential information.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Swapping
2005-08-31 18:25 Swapping Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-31 19:22 ` Re: Swapping Tobias Brox <tobias@nordicbet.com>
@ 2005-08-31 19:33 ` Tobias Brox <tobias@nordicbet.com>
0 siblings, 0 replies; 4+ messages in thread
From: Tobias Brox @ 2005-08-31 19:33 UTC (permalink / raw)
To: Tobias Brox <tobias@nordicbet.com>; +Cc: Carlos Henrique Reimer <carlosreimer@yahoo.com.br>; pgsql-performance
[Tobias Brox - Wed at 09:22:17PM +0200]
> I'd trust linux to handle swap/cache sensibly. Eventually, become involved
> with kernel hacking ;-)
Of course, there are also some files in /proc/sys/vm that you may want to
peek into, for tuning the swapping. Particularly, at later 2.6-kernels (I'm
running 2.6.12) you have the file /proc/sys/vm/swappiness, where the number
should be some percentage. I'm not completely sure how it works, but I
suppose that the higher you set it, the more likely it is to swap out
memory not beeing used. I think the default setting is probably sane, but
you may want to google a bit about it.
--
Notice of Confidentiality: This email is sent unencrypted over the network,
and may be stored on several email servers; it can be read by third parties
as easy as a postcard. Do not rely on email for confidential information.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-08-31 19:33 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-08-31 18:25 Swapping Carlos Henrique Reimer <carlosreimer@yahoo.com.br>
2005-08-31 18:49 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-08-31 19:22 ` Tobias Brox <tobias@nordicbet.com>
2005-08-31 19:33 ` Tobias Brox <tobias@nordicbet.com>
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