Hi
This is the output of meminfo when the system is under some stress.
Thanks
cif@ip-10-194-167-240:/tmp$ cat /proc/meminfo
MemTotal: 7629508 kB
MemFree: 37820 kB
Buffers: 2108 kB
Cached: 5500200 kB
SwapCached: 332 kB
Active: 4172020 kB
Inactive: 3166244 kB
Active(anon): 1864040 kB
Inactive(anon): 1568760 kB
Active(file): 2307980 kB
Inactive(file): 1597484 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 524284 kB
SwapFree: 0 kB
Dirty: 23336 kB
Writeback: 0 kB
AnonPages: 1835716 kB
Mapped: 1610460 kB
Shmem: 1596916 kB
Slab: 136168 kB
SReclaimable: 123820 kB
SUnreclaim: 12348 kB
KernelStack: 1176 kB
PageTables: 23148 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 4339036 kB
Committed_AS: 4517524 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 26152 kB
VmallocChunk: 34359710052 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 7872512 kB
DirectMap2M: 0 kB
On Mon, Oct 15, 2012 at 2:45 AM, Shiran Kleiderman <shirank1@xxxxxxxxx> wrote:
HiI've returned the memory configs to the default, erased data from my db and am testing the system again.This is the output of cat /proc/meminfoThanksroot@ip-10-194-167-240:~# cat /proc/meminfoMemTotal: 7629508 kBMemFree: 170368 kBBuffers: 10272 kBCached: 6220848 kBSwapCached: 0 kBActive: 3249748 kBInactive: 3936960 kBActive(anon): 971336 kBInactive(anon): 2103844 kBActive(file): 2278412 kBInactive(file): 1833116 kBUnevictable: 0 kBMlocked: 0 kBSwapTotal: 524284 kBSwapFree: 522716 kBDirty: 83068 kBWriteback: 3080 kBAnonPages: 955856 kBMapped: 2132564 kBShmem: 2119424 kBSlab: 157200 kBSReclaimable: 144488 kBSUnreclaim: 12712 kBKernelStack: 1184 kBPageTables: 21092 kBNFS_Unstable: 0 kBBounce: 0 kBWritebackTmp: 0 kBCommitLimit: 4339036 kBCommitted_AS: 3637424 kBVmallocTotal: 34359738367 kBVmallocUsed: 26152 kBVmallocChunk: 34359710052 kBHardwareCorrupted: 0 kBAnonHugePages: 0 kBHugePages_Total: 0HugePages_Free: 0HugePages_Rsvd: 0HugePages_Surp: 0Hugepagesize: 2048 kBDirectMap4k: 7872512 kBDirectMap2M: 0 kBOn Thu, Sep 27, 2012 at 8:59 AM, Andres Freund <andres@xxxxxxxxxxxxxxx> wrote:
On Monday, September 24, 2012 08:45:06 AM Shiran Kleiderman wrote:> *Ubuntu 12, High-Memory Extra Large Instance
> Hi,
> I'm using and Amazon ec2 instance with the following spec and the
> application that I'm running uses a postgres DB 9.1.
> The app has 3 main cron jobs.
>
> 17.1 GB of memory> 64-bit platform*
> 6.5 EC2 Compute Units (2 virtual cores with 3.25 EC2 Compute Units each)
> 420 GB of instance storage
>
> I've changed the main default values under file *postgresql.conf* to:
> shared_buffers = 4GB> total used *free* shared buffers cached
> work_mem = 16MB
> wal_buffers = 16MB
> checkpoint_segments = 32
> effective_cache_size = 8GB
>
> When I run the app, after an hour or two, free -m looks like below ans the
> crons can't run due to memory loss or similar (i'm new to postgres and db
> admin).
> Thanks!
>
> free -m, errors:
>
> total used free shared buffers cached
> Mem: 17079 13742 3337 0 64 11882
> -/+ buffers/cache: 1796 15283
> Swap: 511 0 511
>
> Mem: 17079 16833 *245 *0 42 14583
> -/+ buffers/cache: 2207 14871> *DBI connect('database=---;host=localhost','postgres',...) failed: could
> Swap: 511 0 511
>
> **free above stays low even when nothing is running.
>
> **errors:
> not fork new process for connection: Cannot allocate memory*
> could not fork new process for connection: Cannot allocate memorycould you show cat /proc/meminfo?
>
> and
> execute failed: ERROR: out of memory
> DETAIL: Failed on request of size 968. [for Statement "
> SELECT DISTINCT....
Greetings,
Andres
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Best,
Shiran Kleiderman
+972 - 542380838
Skype - shirank1