ho-nl / vagrant-development-box

Maintainer: Paul
MIT License
0 stars 0 forks source link

Vagrant using too much disk space because of swap files #60

Closed PascalBrouwers closed 6 years ago

PascalBrouwers commented 6 years ago

Vagrant using too much disk space because of swap files:

screen shot 2018-02-05 at 09 52 17

Only have 1 vagrant box running.

paales commented 6 years ago

Locally I haven't got any swap files. Swap files are normally created because of a lack of memory. Have you got multiple boxes running at the same time a lot of times? Are they specific to a certain project?

Make sure all the boxes are actually halted when you dont use them. Vagrant will suspend boxes if you are low on battery etc. which will store the memory on disk:

Paul-Hachmang:~ paulhachmang$ vagrant global-status
id       name                provider   state    directory
-----------------------------------------------------------------------------------------------------------
b1e833e  hypernode           virtualbox poweroff /Users/paulhachmang/Sites/bouwprofi/vagrant
967c4de  hypernode           virtualbox poweroff /Users/paulhachmang/Sites/magento-msi/vagrant
bd91ac6  hypernode           virtualbox poweroff /Users/paulhachmang/Sites/paracord.eu/vagrant
8a640e1  hypernode           virtualbox running  /Users/paulhachmang/Sites/ho/vagrant
9dd6462  vagrant-development virtualbox poweroff /Users/paulhachmang/Sites/vagrant-development-box/vagrant
63d2f89  proophessor-do      virtualbox running  /Users/paulhachmang/Sites/proophessor-do/vagrant
78bbcbd  soft3               virtualbox running  /Users/paulhachmang/Sites/soft3/vagrant
0691879  vanmoof             virtualbox running  /Users/paulhachmang/Sites/vanmoof/vagrant

Simply go to the folder and run vagrant halt for each of the boxes and it will show something like:

Paul-Hachmang:vagrant paulhachmang$ vagrant halt
==> hypernode: Discarding saved state of VM...
PascalBrouwers commented 6 years ago

Only had 1 box running. Now that I have 15G free I don't get any problems with memory or swapping anymore. Was probably an issue with memory.