PDA

View Full Version : File system cache becomming way to large and hanging the system...please help



morph166955
16th December 2005, 06:44 PM
ive been noticing lately that some times when i try to access my server via samba all my computers hang and xp locks up for no reason. i realized that since it occurs simultaniously (the lock ups) on more then one computer that it has to be something with the server. low and behold when i run top on my server i see that of the 2gig ram i have almost 1.9 gig is being used up. thinking it was a program that had a memory hole or something i proceded to shut EVERYTHING off. when that didnt work i got curious and unmounted my raid5 array (approx 2TB in size if that matters). almost instantly it droped from 1.9gig to ~300meg used. upon remounting and restarting samba everything works like a charm. since then i have been monitoring this and it seems that over time somethings filling up the ram to the point that the system is having problems operating. the system was ext3 but i have downgraded it to ext2 in an attempt to see if that was the cause (it started as an ext2 file system that i upgraded to ext3 at some point a while back). i have been told that the system loves to create a cache as big as it can on the system while its working to speed up the transactions but having a buffer thats larger then 1.5gig i find crazy! i have yet to find the option to set a max buffer size so if anyone can help me out with this problem i would be very appreciative. thanks very much.

morph166955
16th December 2005, 09:52 PM
ok some updates. ive been running some tests on the system to see what the deal is. first i unmounted the raid array and it cleared the system out.

the moment i mounted the array i ran free and got:
total used free shared buffers cached
Mem: 2074792 381396 1693396 0 32440 202080
-/+ buffers/cache: 146876 1927916
Swap: 2031608 0 2031608


after 8 minutes 30 seconds of hitting the drive ALOT (i opened about 40 video streams simultaniously through samba...lots of data):
total used free shared buffers cached
Mem: 2074792 1372404 702388 0 34196 1188844
-/+ buffers/cache: 149364 1925428
Swap: 2031608 0 2031608

and now finally at about 15 mins of stress
total used free shared buffers cached
Mem: 2074792 2023828 50964 0 17196 1856364
-/+ buffers/cache: 150268 1924524
Swap: 2031608 0 2031608


as you can see my ram is virtually full (51 meg left) and of the 2 gig used 1.8 of that is cached. i hope this helps who ever knows more then me to figure out a solution to this problem

morph166955
16th December 2005, 10:45 PM
and a final output...

total used free shared buffers cached
Mem: 2074792 1993288 81504 0 9644 1838380
-/+ buffers/cache: 145264 1929528
Swap: 2031608 56 2031552

then i unmounted the array

total used free shared buffers cached
Mem: 2074792 229808 1844984 0 6496 79508
-/+ buffers/cache: 143804 1930988
Swap: 2031608 56 2031552

its definitely the file system caching