My ram is draining, dont know why.
Hello guys, I'm very noobish in linux. I've used it for three days and learned alot of commands.
I purched a vps server for my teamspeak 3 server. The server is using debian 7.0 The only thing I want it to do is to run my teamspeak 3 server with java installed because I got a bot on my server which does alot of great task. The issue I have, is that the vps server is losing mb per hour. So out of 2012mb, I only have 994mb and it's steady droping. Can't figure out what's eating the ram. I've installed oracle java for linux and also screen. I wrote free -m to see my ram and it slowly drains. So then I wrote top command and I see the VIRT ram and its still the same for java + teamspeak3server. Java is at 811m and teamspeak 3 is at 209m on VIRT. So can someone give me suggestions on how to solve why it's draining all the time? Do you think I've installed wrong java and what java do you guys recommend for me to use on debian linux? |
Quote:
Also, does your mystery bot use ram for storing whatever it does? If so, that will represent an ever increasing chunk of RAM as well. BTW - Welcome to LQ! |
Quote:
Java is a well-known resource pig. It is not unusual for a Java program to eat everything in sight, and still go looking for more. You don't have to know much about what you're doing to write in Java. Which is why there are so many ill-behaved Java programs out there. |
Thanks for reply. I'm super noob in linux. The only thing I know what's running becide the "original package" when starting up debian linux, is the teamspeak 3 server and java.
So is there any command to investigate why the ram is slowly draining by something. It should say right? in the top command? and what linux package for java should you I use? |
'top' will tell you what process is using the memory. It won't tell you why. Typically if a process is grabbing more and more memory over time, and never releasing it, the reason is "poorly written program". Not much you can do about that other than find an alternate program or write a better one yourself.
|
Quote:
If another program needs ram it will ask the kernel. The kernel will determine how much of that "in use" ram can safely be freed for use by another program and re-allocate it accordingly. This is a central function of the kernel. But the ram is not draining away from the system or becoming inaccessible - it is being used, which is why it is there. So, unless you are experiencing some problem resulting from the ram being in use, there is no problem. So I ask my original question again, are you experiencing a problem from the ram usage? And as to the java package, probably the latest available from the distro's package repos is the one you should be using. |
...additionally Java doesn't regard memory like well-behaved native Linux applications would. For example trying to limit max mem with say "-Xmx1G" doesn't really mean 1 GB is all the system memory Java will use. Unfortunately until you found an alternative or know how to tune Java more RAM is the only thing that'll work.
|
I write top command and it shows the following:
PID USER PR NI VIRT RES SHR S CPU MEM TIME+ COMMAND 6592 ts3serve 20 0 209m 29m 6132 S 6.7 1.5 119:30.83 ts3server_linux 8345 root 20 0 811m 44m 9.8m S 1.0 2.2 13:30.91 java 209+811=1020 When writing free -m I get 989mb free memory. But when doing this command 3 hours ago I had 993mb free memory and then the value for ts3 and java was exaclly the same. Thanks for all your answers and explanations. |
Quote:
|
Quote:
Quote:
|
I wrote dpkg -- list and found the java installer and removed it + config. then i killed the java process with the bot for teamspeak 3. Now I got 1355mb ram out of 2000mb.
But in top command I only see 209mb usage? So how do I figure out where the rest ram is going to? |
Post all of
Code:
free -hlmt; swapon -s; top -b -n1 |
Are we sure this isn't a case of Linux ate my RAM?
|
All times are GMT -5. The time now is 03:55 AM. |