Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a p2p number crunching program that was written for Windows but is written in Java. It sits in the background of the computer using your spare RAM as a low priority program. When your computer requires more RAM, this program lets go of some. Does this program tap into my SWAP?

share|improve this question

closed as off topic by izx, Caesium, Stephen Myall, hbdgaf, fossfreedom Aug 24 '12 at 15:16

Questions on Ask Ubuntu are expected to relate to Ubuntu within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Which version of Ubuntu is the program running on? –  izx Aug 23 '12 at 4:41
    
It's currently one 12.04. –  KI4JGT Aug 23 '12 at 11:36
add comment

2 Answers 2

Swap is a very low level thing. Your program is not aware of the existence of swap.

Essentially, from your program point of view, swap is just available memory to your program. The kernel takes care of what chunks of memory are swapped and which are in RAM, and how much memory your program is allowed to get.

share|improve this answer
    
I was more or less worried about the continuous reading and writing my program would do to SWAP as I've heard that isn't good for a hard drive. –  KI4JGT Aug 23 '12 at 0:06
add comment

You should take a look to the Ubuntu's Swap FAQ page to better understand how swap is working and how to tweak his use to your need (see the swapiness part).

share|improve this answer
add comment

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