On 12/8/05, Kathy Lo <kathy.lo.ky@xxxxxxxxx> wrote: [snip] > When the user complains the system becomes very slow, I use top to > view the memory statistics. > In top, I cannot find any processes that use so many memory. I just > found that all the memory was used up and the Swap memory nearly used > up. Not to add fuel to the fire, but I'm seeing something similar to this on my 4xOpteron with 32GB of RAM running Pg 8.1RC1 on Linux (kernel 2.6.12). I don't see this happening on a similar box with 16GB of RAM running Pg 8.0.3. This is a lightly used box (until it goes into production), so it's not "out of memory", but the memory usage is climbing without any obvious culprit. To cut to the chase, here are some numbers for everyone to digest: total gnu ps resident size # ps ax -o rss|perl -e '$x += $_ for (<>);print "$x\n";' 5810492 total gnu ps virual size # ps ax -o vsz|perl -e '$x += $_ for (<>);print "$x\n";' 10585400 total gnu ps "if all pages were dirtied and swapped" size # ps ax -o size|perl -e '$x += $_ for (<>);print "$x\n";' 1970952 ipcs -m # ipcs -m ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x0052e2c1 1802240 postgres 600 176054272 26 (that's the entire ipcs -m output) and the odd man out, free # free total used free shared buffers cached Mem: 32752268 22498448 10253820 0 329776 8289360 -/+ buffers/cache: 13879312 18872956 Swap: 31248712 136 31248576 I guess dstat is getting it's info from the same source as free, because: # dstat -m 1 ------memory-usage----- _used _buff _cach _free 13G 322M 8095M 9.8G Now, I'm not blaming Pg for the apparent discrepancy in calculated vs. reported-by-free memory usage, but I only noticed this after upgrading to 8.1. I'll collect any more info that anyone would like to see, just let me know. If anyone has any ideas on what is actually happening here I'd love to hear them! -- Mike Rylander mrylander@xxxxxxxxx GPLS -- PINES Development Database Developer http://open-ils.org