# Swapping to /dev/null - normal?



## raindog308 (Feb 16, 2014)

# swapon -s
Filename                                Type            Size    Used    Priority
/dev/null                               partition       131072  0       -1



 

So in fairness...this is a Virtuozzo VPS from WiredTree.  They promise X MB of RAM and deliver it.  I've been very impressed with their technical chops so far so I'm not worried this is misconfigured.  Just the first time I'd ever seen that.

 

I know Vz has vswap now, but they don't use it.

 

I'm wondering what the point is of adding 128MB of swap and pointing it at /dev/null...maybe some software wont run if there's no swap?


----------



## BuyCPanel-Kevin (Feb 19, 2014)

I've never seen this happen before, so no this isn't normal from what I've observed


----------



## tchen (Feb 19, 2014)

Some programs like Chef require a swap file and you can 'fake' it by using /dev/null.


----------



## Damian (Feb 20, 2014)

So what happens when the program tries to recall the page, and the VM system looks for it but it doesn't exist anymore?


----------



## tchen (Feb 20, 2014)

Damian said:


> So what happens when the program tries to recall the page, and the VM system looks for it but it doesn't exist anymore?


My guess vm.swappiness=0 visibly from the VE (can't test since I don't have a non vSwap container anymore).  That'll still die horribly on a OOM, but well at that point it's probably the least of your worries.


----------

