Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So, if you read the title, you are, probably, guessing, what is my concern about.
How do I make my highest priority process to utilize more memory, than it does.
I am having 16GB of MEM.
This is, what process is showing.
8PR -12NI 9.9gVIRT 7.7gRES S 178%CPU 49.1%MEM java
It is always on 49.1%MEM.
Process is starting with a command:
nice -n -12 java -Xincgc -Xmx9G -jar -server hacktheplanet.jar nogui
It's not going to use more memory than it needs. If you see a spike in i/o wait then you know the app is trying to allocate memory that your server doesn't have available.
Seriously, Linux is awesome at memory management and it will give the resources to a process if they are available. Just because it is sitting at 49% does not mean there is a problem. If you look at top do you see any i/o wait or load on the server at all?
Does it look like a load for you? I just tried to perform a memory intense task in my process and memory usage level didn't even move.
That is very strange. I guess, even very demanding tasks on my server don't need more memory, than allocated, or something like that.
But this 49,1. Why such a random number? How did it calculated it to be on 49,1%MEM?
I want to understand from mathematical perspective, why exactly this amount of mem is used.
You can start looking deep into the proc files for the process if you really want to. It's very possible that a big part of that 49.1% is cached dirty memory. So your process may only be using 5-10% but the Linux kernel has not cleaned the rest of that memory and released it as no other apps have requested any memory.
Your top output looks well within optimal ranges, almost perfect.
My advice is don't fix whats not broke, but if you really want to figure it out start hacking into the /proc/ directory and looking at the proc files for that process(not fun at all).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.