I recently purchased a remote server plan for a few additional services that I need to run, that my previous hosting plan just couldn't support. (JIRA, another separate Tomcat instance, etc.)

I would rate my Unix/Linux knowledge as "fair", but I'm having troubles determining why my server is so strapped for memory.

Attached is a screenshot of top running as root. The memory usage (adding the %MEM columns) is about 16%, but the total amount of memory used as displayed at the top is well over 60%.

I've been trying to configure JIRA for the past day or so, but it is bailing out with memory issues about halfway through the process.

Note: I have submitted a ticket for tech support, and the admins from who I purchased the server are extremely knowledgeable, but it would be great to fix the issue in the meantime and learn a bit as well

enter image description here

link|improve this question

80% accept rate
feedback

2 Answers

up vote 1 down vote accepted

While in top, you can press Shift+M to sort the process list by memory usage.

In your screenshot the memory usage does look quite good: in Linux you calculate the actual free RAM with Total - (free + cached + buffers), so in your case there's more than 400 MB free out of ~780 MB.

However, your server does not seem to have any swap configured. Is that on purpose? Lack of swap can cause all kind of fancy side effects. I bet if you give your server 1-2 GB swap space, Jira installation completes without errors, and it most likely won't even use much of that swap.

Is that a clean Jira install you're trying to install or are you upgrading a previous installation?

link|improve this answer
The screenshot is already sorted by memory usage. How then is the 'used' memory calculated? It's a clean JIRA install. I will ask the administrators about the swap. Thanks for the answer. :) – craig Jul 19 '11 at 11:55
Used = actual memory used by processes + cached + buffers (+ some kernel stuff, try out slabtop) – Janne Pikkarainen Jul 19 '11 at 11:57
Oh, one more thing: if during Jira install your server actually was tight on RAM and kernel triggered its OOM (Out-of-Memory Killer), command dmesg probably shows you traces of it. – Janne Pikkarainen Jul 19 '11 at 12:00
Top(unix) and Task Manager(windows) both do a super-cruddy job of explaining os-level caching to users. This has got to be a top-10 gotcha for new admins. – Mark Jul 19 '11 at 14:22
feedback

And REM is The non-swapped physical memory a task has used. which I always find useful.
I also was recently introduced to htop which I think is pretty cool sudo apt-get install htop if you're on Debian/Ubuntu ;)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.