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

Out of memory problem.

From: Marcin Giedz <marcin(dot)giedz(at)eulerhermes(dot)pl>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Out of memory problem.
Date: 2005-04-15 12:52:35
Message-ID: 425FB913.4020901@eulerhermes.pl (view raw or flat)
Thread:
Lists: pgsql-admin
Hello...

Postgres 8.0.1 is running on Debian with 2.6.10 kernel with 12GB of RAM, 
where 2GB is for shared memory:

echo 2147483648 > /proc/sys/kernel/shmall
echo 2147483648 > /proc/sys/kernel/shmmax

Also overcommit_memory is changed to not "overcommit":

pgsql1:/mnt/var# cat /proc/sys/vm/overcommit_memory
2
pgsql1:/mnt/var#

but still "out of memory" occures. "shared_buffers" parameter is set to 
100000 (according to someone settings can be from 15% to 30% of total 
RAM memory) - as you can see I have even below 15% of RAM. Earlier 
"shared_buufers" was set to 50000 and I havn't had this problem. Why I 
still have "out of memory" despite of changing not overcommit_memory?

Thx,
Marcin

Here is a problem's log

Apr 15 14:17:35 pgsql1 kernel: oom-killer: gfp_mask=0x4d0
Apr 15 14:17:35 pgsql1 kernel: DMA per-cpu:
Apr 15 14:17:35 pgsql1 kernel: cpu 0 hot: low 2, high 6, batch 1
Apr 15 14:17:35 pgsql1 kernel: cpu 0 cold: low 0, high 2, batch 1
Apr 15 14:17:35 pgsql1 kernel: cpu 1 hot: low 2, high 6, batch 1
Apr 15 14:17:35 pgsql1 kernel: cpu 1 cold: low 0, high 2, batch 1
Apr 15 14:17:35 pgsql1 kernel: cpu 2 hot: low 2, high 6, batch 1
Apr 15 14:17:35 pgsql1 kernel: cpu 2 cold: low 0, high 2, batch 1
Apr 15 14:17:35 pgsql1 kernel: cpu 3 hot: low 2, high 6, batch 1
Apr 15 14:17:35 pgsql1 kernel: cpu 3 cold: low 0, high 2, batch 1
Apr 15 14:17:35 pgsql1 kernel: Normal per-cpu:
Apr 15 14:17:35 pgsql1 kernel: cpu 0 hot: low 32, high 96, batch 16
Apr 15 14:17:36 pgsql1 kernel: cpu 0 cold: low 0, high 32, batch 16
Apr 15 14:17:36 pgsql1 kernel: cpu 1 hot: low 32, high 96, batch 16
Apr 15 14:17:36 pgsql1 kernel: cpu 1 cold: low 0, high 32, batch 16
Apr 15 14:17:36 pgsql1 kernel: cpu 2 hot: low 32, high 96, batch 16
Apr 15 14:17:36 pgsql1 kernel: cpu 2 cold: low 0, high 32, batch 16
Apr 15 14:17:36 pgsql1 kernel: cpu 3 hot: low 32, high 96, batch 16
Apr 15 14:17:36 pgsql1 kernel: cpu 3 cold: low 0, high 32, batch 16
Apr 15 14:17:36 pgsql1 kernel: HighMem per-cpu:
Apr 15 14:17:36 pgsql1 kernel: cpu 0 hot: low 32, high 96, batch 16
Apr 15 14:17:36 pgsql1 kernel: cpu 0 cold: low 0, high 32, batch 16
Apr 15 14:17:36 pgsql1 kernel: cpu 1 hot: low 32, high 96, batch 16
Apr 15 14:17:36 pgsql1 kernel: cpu 1 cold: low 0, high 32, batch 16
Apr 15 14:17:36 pgsql1 kernel: cpu 2 hot: low 32, high 96, batch 16
Apr 15 14:17:36 pgsql1 kernel: cpu 2 cold: low 0, high 32, batch 16
Apr 15 14:17:36 pgsql1 kernel: cpu 3 hot: low 32, high 96, batch 16
Apr 15 14:17:36 pgsql1 kernel: cpu 3 cold: low 0, high 32, batch 16
Apr 15 14:17:36 pgsql1 kernel:
Apr 15 14:17:36 pgsql1 kernel: Free pages:        4564kB (768kB HighMem)
Apr 15 14:17:36 pgsql1 kernel: Active:2430748 inactive:487388 dirty:114 
writeback:0 unstable:0 free:1141 slab:35390 mapped:636143 pagetables:160905
Apr 15 14:17:36 pgsql1 kernel: DMA free:68kB min:68kB low:84kB 
high:100kB active:24kB inactive:0kB present:16384kB pages_scanned:323 
all_unreclaimable? yes
Apr 15 14:17:36 pgsql1 kernel: protections[]: 0 0 0
Apr 15 14:17:36 pgsql1 kernel: Normal free:3728kB min:3756kB low:4692kB 
high:5632kB active:496kB inactive:13072kB present:901120kB 
pages_scanned:19471 all_unreclaimable? yes
Apr 15 14:17:36 pgsql1 kernel: protections[]: 0 0 0
Apr 15 14:17:36 pgsql1 kernel: HighMem free:840kB min:512kB low:640kB 
high:768kB active:9722344kB inactive:1936480kB present:12189696kB 
pages_scanned:0 all_unreclaimable? no
Apr 15 14:17:36 pgsql1 kernel: protections[]: 0 0 0
Apr 15 14:17:36 pgsql1 kernel: DMA: 1*4kB 0*8kB 0*16kB 0*32kB 1*64kB 
0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 68kB
Apr 15 14:17:36 pgsql1 kernel: Normal: 0*4kB 0*8kB 1*16kB 0*32kB 2*64kB 
0*128kB 4*256kB 1*512kB 0*1024kB 1*2048kB 0*4096kB = 3728kB
Apr 15 14:17:36 pgsql1 kernel: HighMem: 30*4kB 1*8kB 12*16kB 0*32kB 
0*64kB 0*128kB 0*256kB 1*512kB 0*1024kB 0*2048kB 0*4096kB = 832kB
Apr 15 14:17:36 pgsql1 kernel: Swap cache: add 5948181, delete 5879764, 
find 2114291/2758769, race 1+19
Apr 15 14:17:36 pgsql1 kernel: Out of Memory: Killed process 20553 
(postmaster).
Apr 15 14:46:20 pgsql1 -- MARK --
pgsql1:/mnt/var#


Responses

pgsql-admin by date

Next:From: Tom LaneDate: 2005-04-15 13:38:19
Subject: Re: Referential constraints in version 8
Previous:From: Alvaro HerreraDate: 2005-04-15 12:45:07
Subject: Re: Referential constraints in version 8

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