Page 1 of 1

Linux Guru's, step inside! -- Memory Management

Posted: Sat Mar 12, 2005 1:32 am
by NAiLs
I'm getting frustrated with Linux. The darned OS just LOVES to cache any and all memory it can. It needs to stop. I have 2GB of memory in my CS:S box and there is currently only 50MB free!!! :shock: :x

Linux is putting all of that memory to cache. What in the world does it need ot cache all that memory to run a game server for? I have't a clue. Yes there is Apache on there, plus Psychostats, but that's it. I think it's caching all the Psychostats garbage, and I don't like that. I don't like that because it hurts the performance of the server, BIG TIME! When it reaches 32 players, it stutters, because it can't randomly access stuff. Instead, it has a whopping 50MB Of RAM to play with. Linux is supposed to free up some of the old cache, but it only does it ONE time per day, at 6:30am. 6:30am is a time when my server isn't full anymore.

How can I limit the amount of memory that Linux caches? Again, I have 2GB of memory and this is ridiculous! I'd like to keep it at say, 800MB free for sure. My friend turned off the swap file competely, which seemed to help the server a little. I've read so much documentation on Linux memory magement, and nothing tells me how to reduce the amount it caches. I've read another guy who had 1GB of memory on his file server. Within 4 hours, he had 100MB free and stuttering all over the place when requesting files.

Thanks in advance!

-Brian

Posted: Sat Mar 12, 2005 6:28 pm
by infinitevalence
What distro are you running? really you should just let it take what it needs you will find that windows does not use all the memory availble where as linux does and uses it to the max it can. Belive it or not whe its using all that memory it should be more efficent then windows.

Posted: Sat Mar 12, 2005 7:02 pm
by NAiLs
Nah... it's raping my server because it's a game server. As I said, I think it's caching all the Psychostats, which is useless to the game server itself. The game server doesn't need Psychostats to run, but players want Psychostats to continue to play on my server. I just want to reduce the amount of RAM it's using.

Last I knew, we were running the 2.4 kernel on Debian. The distro of Debian is purely command line as there is no need for a GUI. I think my buddy may have gotten the latest kernel on the system a few days ago because he was telling me he figured out his problem in the compilation of 2.6.

Again, CS:S has memory issues as it is. There is plenty of lost memory becauase VU Games sucks at programming. The caching is not helping the game server to be up to par. I know when we first started the server and had 32 players on it, the server ran smooth as a baby's butt. Now it chokes here and there because there is little memory free to play with.

As of typing this message, there is currently 91MB free.

Posted: Mon Mar 14, 2005 2:58 pm
by NAiLs
*bump*

need to figure this out! ugh...

Posted: Mon Mar 14, 2005 5:56 pm
by infinitevalence
I dont know dude, i talked to some friends and they said they dont have a problem like this, so your guess is as good as mine.

Posted: Mon Mar 14, 2005 6:29 pm
by NAiLs
No one needs to really know the problem, forsay. I just want to know the command to reduce the amount of memory it uses for cache. I know there is one, but I'm having a very hard time finding it.

Ugh... this sucks.

Posted: Sat Apr 02, 2005 4:14 am
by NAiLs
Still searchin' for an answer on this! :?

Posted: Sat Apr 02, 2005 5:51 am
by LVCapo
Nailz.....sorry man, I have no experience with Linux....although I need to learn so I can mod my Tivos.
I found a few sites explaining Linux and memoryy usage, this was an interesting one. I'll ask around and see what else I can find for you....saying as this affects me and me playing CS 20hrs a day on your server.

The Linux kernel: Memory
http://www.win.tue.nl/~aeb/linux/lk/lk-9.html

UNIX Memory Management
http://dataexpedition.com/~sbnoble/Tips/memory.html

Posted: Sat Apr 02, 2005 11:07 am
by Apoptosis
Well i believe Linux has a few memory Caches....

Buffer Cache
Page Cache
Swap Cache
Hardware Caches

I'm not sure which you need to/can adjust though

Posted: Sun Apr 03, 2005 4:29 am
by NAiLs
Capper, I'll look at that further tomorrow.

Apop, I think it's either Swap or Buffer. Not positive what the difference is between them all. I have a slight idea, but not 100% sure. All I can say it is caches all the memory for no reason... :lol:

Posted: Sun Apr 03, 2005 10:54 pm
by NAiLs
I'm 95% sure it's buffer cache now.

Posted: Fri Apr 08, 2005 1:45 am
by InFuZiOn
Someone help this guy out so he can get me a 12 person scrim server set up! I've never even touched Linux :(