Opened 15 years ago
Closed 7 weeks ago
#4843 closed bug (fixed)
Disabling VirtualMemory does not free up disk space
Reported by: | Adek336 | Owned by: | leavengood |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta6 |
Component: | Preferences/VirtualMemory | Version: | R1/Development |
Keywords: | Cc: | hamish@… | |
Blocked By: | Blocking: | #18971 | |
Platform: | All |
Description
hrev33753 gcc4+2 hybrid
Disable VirtualMemory, reboot, disk space still used by swap. Go to VirtualMemory preferences ; note that the size slider is not disabled. Anyhow, moving the slider to 1 MiB does not free up memory either. /boot/var/swap is still 2 GiB.
Removing the file frees up memory and doesn't introduce any problems or crashes.
Change History (10)
comment:1 by , 15 years ago
Version: | R1/alpha1 → R1/Development |
---|
comment:2 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 13 years ago
A user in IRC found this bug as well, but in his case deleting the file did not seem to actually free the disk space. Either way the system should remove or at least truncate to 0 the swap file when virtual memory is disabled.
I'll attempt to make the fix which does one or the other. It will be my first kernel change ;)
comment:4 by , 13 years ago
The way you fix this is relevant to a patch I'm working on in #3723.
With support for swap on different volumes, simply deleting /var/swap at boot won't work. Also, deleting the swap file from the volume specified in the config won't work either, because the user could have changed the swap volume and rebooted, leaving a dormant swap file on the old volume.
I thought a possible solution might be to symlink /var/swap to wherever the swap file actually is, and delete through that at boot. This would require that the target volume be manually mounted and then unmounted for the deletion.
Ideally, there would be a procedure to switch off virtual mem at system shutdown which would make use of the existing swap_file_delete() function.
comment:5 by , 13 years ago
Cc: | added |
---|
comment:6 by , 12 years ago
#8971 opened to track the issue with the non-erased swap.
After the OS releases the swap, the file can be erased. (however, remember to empty the trash to regain the space!)
comment:7 by , 4 years ago
Milestone: | R1 → R1.1 |
---|
comment:8 by , 3 months ago
Blocking: | 18971 added |
---|
comment:9 by , 3 months ago
Milestone: | R1.1 → R1/beta6 |
---|
comment:10 by , 7 weeks ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Taking ownership.