Skip to content
Advertisement

Tag: swap

mkswap fails to create a file

I was attempting to create a swap file: I get “/var/swap No such file or directory” Am I supposed to create the file first? The documentation I found does not say that, so I am concerned. Answer Yes, you’ll need to create the file first. dd is the standard choice: this’d create a 128meg swap file.

Can I tell Linux not to swap out a particular processes’ memory?

Is there a way to tell Linux that it shouldn’t swap out a particular processes’ memory to disk? Its a Java app, so ideally I’m hoping for a way to do this from the command line. I’m aware that you can set the global swappiness to 0, but is this wise? Answer You can do this via the mlockall(2) system

Advertisement