Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The guest was swapping, after adding 100% memory reservation it continued to do so. After a restart - after some time not much changed.

How can a VM who's memory is 'reserved' be swapping?


alt text

share|improve this question
add comment

1 Answer

A reservation only ensures a given VM CAN have the memory resource it has been allocated IF it requests/uses it, it doesn't mean it won't be swapped out if it's not being used.

share|improve this answer
    
@chopper3. Do you have a reference for that? ESX's declared behaviour is that reservation requires physical memory to be allocated to a VM at power on, if the reservation cannot be met it wont power up and the .vswp file size is adjusted so that reserved memory is never covered by swap so I can't see how this could be true. –  Helvick Nov 11 '09 at 11:03
1  
It has to be available in physical memory at power on yes, you're right, but if it's not requested after that it can be swapped but WILL be allocated physical memory if requests come in, to the detriment of other non-reserved VMs. –  Chopper3 Nov 11 '09 at 11:58
2  
True enough - the Physical RAM may be allocated by the Kernel to other VM's if it hasn't been actively used by the VM up to that point but I don't believe it can be swapped - there is no swap location for it. My understanding is that it is simply not allocated, there is no need to swap it because there is (by definition) nothing useful in it. Again I might be wrong, it's (somewhat) possible that the Kernel could use its dedicated swap partition for this but I don't see why this would be done, it would hit performance for no reason at all. –  Helvick Nov 11 '09 at 16:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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