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

Operating Systems
Windows, Linux, Solaris, Red Hat, etc.....32 bit or 64 bit.
If its an OS, its here.
Post Reply
NAiLs
Legit Extremist
Legit Extremist
Posts: 870
Joined: Tue Apr 20, 2004 12:46 am
Location: WI

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

Post 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
"Bow down before the one you serve! You're going to get what you deserve!" - |\| | |/|
User avatar
infinitevalence
Legit Extremist
Legit Extremist
Posts: 2841
Joined: Sat Apr 24, 2004 12:40 pm
Location: Nashville, TN
Contact:

Post 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.
"Don't open that! It's an alien planet! Is there air? You don't know!"
NAiLs
Legit Extremist
Legit Extremist
Posts: 870
Joined: Tue Apr 20, 2004 12:46 am
Location: WI

Post 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.
"Bow down before the one you serve! You're going to get what you deserve!" - |\| | |/|
NAiLs
Legit Extremist
Legit Extremist
Posts: 870
Joined: Tue Apr 20, 2004 12:46 am
Location: WI

Post by NAiLs »

*bump*

need to figure this out! ugh...
"Bow down before the one you serve! You're going to get what you deserve!" - |\| | |/|
User avatar
infinitevalence
Legit Extremist
Legit Extremist
Posts: 2841
Joined: Sat Apr 24, 2004 12:40 pm
Location: Nashville, TN
Contact:

Post 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.
"Don't open that! It's an alien planet! Is there air? You don't know!"
NAiLs
Legit Extremist
Legit Extremist
Posts: 870
Joined: Tue Apr 20, 2004 12:46 am
Location: WI

Post 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.
"Bow down before the one you serve! You're going to get what you deserve!" - |\| | |/|
NAiLs
Legit Extremist
Legit Extremist
Posts: 870
Joined: Tue Apr 20, 2004 12:46 am
Location: WI

Post by NAiLs »

Still searchin' for an answer on this! :?
"Bow down before the one you serve! You're going to get what you deserve!" - |\| | |/|
LVCapo
Legit Extremist
Legit Extremist
Posts: 1741
Joined: Tue May 04, 2004 11:25 pm
Location: Las Vegas
Contact:

Post 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
Last edited by LVCapo on Sun Apr 03, 2005 5:28 am, edited 1 time in total.
User avatar
Apoptosis
Site Admin
Site Admin
Posts: 33941
Joined: Sun Oct 05, 2003 8:45 pm
Location: St. Louis, Missouri
Contact:

Post 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
NAiLs
Legit Extremist
Legit Extremist
Posts: 870
Joined: Tue Apr 20, 2004 12:46 am
Location: WI

Post 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:
"Bow down before the one you serve! You're going to get what you deserve!" - |\| | |/|
NAiLs
Legit Extremist
Legit Extremist
Posts: 870
Joined: Tue Apr 20, 2004 12:46 am
Location: WI

Post by NAiLs »

I'm 95% sure it's buffer cache now.
"Bow down before the one you serve! You're going to get what you deserve!" - |\| | |/|
InFuZiOn
Legit Extremist
Legit Extremist
Posts: 279
Joined: Fri Apr 08, 2005 1:33 am

Post 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 :(
Post Reply