high shared buffer and swap

Поиск
Список
Период
Сортировка
От Laurent Laborde
Тема high shared buffer and swap
Дата
Msg-id 8a1bfe660905040110s46d3f2b6mabd3f8ad4352ba57@mail.gmail.com
обсуждение исходный текст
Ответы Re: high shared buffer and swap  (Greg Stark <greg.stark@enterprisedb.com>)
Re: [PERFORM] high shared buffer and swap  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-hackers
Friendly greetings !
I found something "odd" (something that i can't explain) this weekend.

An octocore server with 32GB of ram, running postgresql 8.3.6
Running only postgresql, slony-I and pgbouncer.

Just for testing purpose, i tried a setting with 26GB of shared_buffer.

I quickly noticed that the performances wasn't very good and the
server started to swap slowly but surely.
 (but still up to 2000query/second as reported by pgfouine)

It used all the 2GB of swap.
I removed the server from production, added 10GB of swap and left it
for the weekend with only slony and postgresql up to keep it in sync
with the master database.

This morning i found that the whole 12GB of swap were used :
Mem:  32892008k total, 32714728k used,   177280k free,    70872k buffers
Swap: 12582896k total, 12531812k used,    51084k free, 27047696k cached

# cat /proc/meminfo
MemTotal:     32892008 kB
MemFree:        171140 kB
Buffers:         70852 kB
Cached:       27065208 kB
SwapCached:    4752492 kB
Active:       24362168 kB
Inactive:      7806884 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:     32892008 kB
LowFree:        171140 kB
SwapTotal:    12582896 kB
SwapFree:        53064 kB
Dirty:          122636 kB
Writeback:           0 kB
AnonPages:      280336 kB
Mapped:       14118588 kB
Slab:           224632 kB
PageTables:     235120 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:  29028900 kB
Committed_AS: 28730620 kB
VmallocTotal: 34359738367 kB
VmallocUsed:     12916 kB
VmallocChunk: 34359725307 kB

While i understand that a very high shared_buffer wasn't a good idea,
i don't understand this behaviour.
Any tought ?

I tried this setup because having 2 level of data caching doesn't make
sense to me. (1 in OS filesystem cache and 1 in shm (shared_buffer)).

I'd love to understand what's happening here ! Thank  you :)

--
F4FQM
Kerunix Flan
Laurent Laborde

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: windows shared memory error
Следующее
От: Zdenek Kotala
Дата:
Сообщение: Re: libpq is not thread safe