0

Take a look at this screenshot that I took after doing free -m: http://gyazo.com/aa54d264956e56acb99024e2374de0c0.png?1340387738

I notice that I have a ton of swap memory not being used, could I convert that to something that CAN be used? I'm sort of a noob with this, sorry if it's a stupid question.

Also, when doing top as outlined in Who is using the swap memory and why? I see that java is only using 47.8% of my systems memory. My java process is being used to run a game, and the players are always lagging out. Is there a way to increase this so it has to use more so my players don't lag?

Thanks for any answers!

DannyF247
  • 103
  • 1
  • More system information would be nice. 32 bit or 64 bit? How much memory(Yes, we can read its a gig with 2 gigs of swap from the screenshot - which you could have just pasted as a inline block of text)? What architecture? I notice its only got a gig of memory - is this a VM of some sort? What game are you running a server for? – Journeyman Geek Jun 23 '12 at 03:49

1 Answers1

0

In general you should not interfere with the kernel's decisions regarding what memory to use and what for. Even tuning /proc/sys/vm/swapiness is not recommended unless you really know what you're doing. Smart people have worked on the kernel's memory management, and your usage really isn't that special that you need to customise the kernel.

Not using lots of swap is a good thing, not bad. Swap is horribly slow and to be treated as a last resort. If your application is using less memory than you expect then it's because the application is only requesting that much, not because the kernel said "NO!" when it asked. Since you're using Java you probably want to adjust the -Xmx parameter. If the application still doesn't use more memory then it simply isn't able to. In any case, I doubt that increasing memory usage is going to solve players lagging out.

mgorven
  • 30,036
  • 7
  • 76
  • 121