0

so i'm new to ram expensive applications, and I don't really know how swap is working...

I've only 10GiB of ram (it's a VM), and 500GB/1TB of available HDD space

the java app need roughly 150/200GiB of memory to run, but I can reduce it to 64GiB. I think that not everything is loaded at the same time, but Java still need to allocate heap space

How much swap space should I allocate? How it will be working? How the os will respond? (I know that it's used when ram is full/reduce ram usage, but saddly I didn't find much more useful information)

  • What is "Go"...? – Hauke Laging Mar 25 '18 at 11:15
  • GB sorry in french it's octet for byte – Mael Abgrall Mar 25 '18 at 11:16
0

The sum of the (usable) physical RAM and the swap space must be larger than the combined amount of RAM which the kernel and all running processes allocate. Of course, using much swap space may make the system terribly slow.

So if there is nothing besides your app which needs much memory then you should have at least 65GiB i.e. 55GiB swap space.

It is difficult to say whether Linux or your app is more effective with memory management. Thus I suggest to allocate 210GiB for swap (I just realize how crazy that sounds...) and compare the application performance with different application memory settings.

You can change the amount of swap space in a running system e.g. if you have LVM and several LVs which you can use for swap. See man swapon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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