THIS WILL HELP EVERYONE

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

THIS WILL HELP EVERYONE

Postby rajiv_kuin » Fri Nov 28, 2008 9:08 pm

Now i was about to sleep but feel guilty asking so many questions and giving nothing back to community... here is my contribution

My server used to consume like 3 GB of RAM in one hours calling and i was surprised, what possibly can be wrong as the number of agent and calls remain the same... but its caching that used most of the stuff... so i used this as a cron job to run every 20 minutes... i never use more than 7000 MB of RAM even with 30 Agents now.... I did not find any adverse effect of the same on my system... i face problems but none is new one... they are same i faced before i started to use this scripts... so i am sure this will benefit all...

#### Flush cache after every 20 minutes
29,59 * * * 1,2,3,4,5,6,7 sync; echo 3 > /proc/sys/vm/drop_caches

Works on CentOS 5 if does not work on other distros get soemthing similar.. idea is to flush the cache on a fixed time period....
rajiv_kuin
 
Posts: 28
Joined: Mon Apr 21, 2008 3:09 am

Postby mflorell » Sat Nov 29, 2008 8:18 am

Thanks for posting this, although I've never had an issue with using all RAM because all of the apps usually can handle that with no problem, although I have heard it can sometimes be an issue with CentOS(which I recomment NOT using).
mflorell
Site Admin
 
Posts: 18339
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby williamconley » Sat Nov 29, 2008 1:49 pm

also, if you ever get into sql, believe it or not it tries to eat memory. it marks it as usable but will cache it so it can easily re-access it to save time in case it needs to access that particular part of a record set again. over time it will consume most of the memory available, but will release it upon request. so what looks like memory hog is actually sql optimization. i'm not sure if mysql does this as well, but i was very surprised to find out that a poorly operating MSSQL install was SUPPOSED to eat memory, and the ultimate reason it was operating poorly was a dying mirror drive entirely unrelated to lack of memory available. after replacing the drive (well, actually i just turned off mirroring to test the theory) the system was acting quite normal, and ate its memory over a period of a couple days with no adverse effect. it always released enough cache to allow the system to operate, but kept pieces of the database in cache to speed up database operations. forcing it to release the cache early probably won't have much of an effect except to de-optimize database operations with repeated calls to the same data set.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: THIS WILL HELP EVERYONE

Postby gardo » Mon Dec 01, 2008 1:59 am

What's the output of "free -m" before you run the flush cache command? Unless you have a "rogue" application hogging the memory, it's Linux's efficient memory management you're seeing working. Linux cache's unused memory so that it can easily be retrieved. You can check this link for more information:

http://www.linuxhowtos.org/System/Linux ... gement.htm

rajiv_kuin wrote:Now i was about to sleep but feel guilty asking so many questions and giving nothing back to community... here is my contribution

My server used to consume like 3 GB of RAM in one hours calling and i was surprised, what possibly can be wrong as the number of agent and calls remain the same... but its caching that used most of the stuff... so i used this as a cron job to run every 20 minutes... i never use more than 7000 MB of RAM even with 30 Agents now.... I did not find any adverse effect of the same on my system... i face problems but none is new one... they are same i faced before i started to use this scripts... so i am sure this will benefit all...

#### Flush cache after every 20 minutes
29,59 * * * 1,2,3,4,5,6,7 sync; echo 3 > /proc/sys/vm/drop_caches

Works on CentOS 5 if does not work on other distros get soemthing similar.. idea is to flush the cache on a fixed time period....
http://goautodial.com
Empowering the next generation contact centers
gardo
 
Posts: 1926
Joined: Fri Sep 15, 2006 10:24 am
Location: Manila, 1004


Return to Support

Who is online

Users browsing this forum: No registered users and 257 guests

cron