-
caloysam
Guest
Diminishing disk space and speed
My experience with Windows Pcs is that the smaller the free space you have in your hard drive, the system responds slower.
Is there a similar behaviour with Macs?
-
05-07-2004 12:23 PM # ADS
Google Adsense
-
gonz
Guest
Originally posted by caloysam
My experience with Windows Pcs is that the smaller the free space you have in your hard drive, the system responds slower.
Is there a similar behaviour with Macs?
The reason for this behavior is that modern operating systems require a certain amount of free hard drive space for virtual memory to operate. Data is constantly being copied to and from RAM to the hard drive. If you don't have enough free space on your hard drive to accommodate this data, then the entire system slows down and becomes unreliable. This can happen on both Windows and Mac OS X, or any other OS that uses virtual memory.
-
caloysam
Guest
So, let's say for a 40GB hard drive, what's a good amount of space to keep free?
-
gonz
Guest
Originally posted by caloysam
So, let's say for a 40GB hard drive, what's a good amount of space to keep free?
On UNIX systems, it's a good rule of thumb to keep at least 10 percent of your startup hard drive free for the swap file. In real terms, I'd start to worry if you dip below two gigs of free space.
-
caloysam
Guest
Ok, thanks!
I'm already going down to 7GB left at my ibook and the issue crossed my mind, because my computer here at work (a Windows) is sooo slow already :dry: and I wasn't sure if it could happen to my ibook too. Thanks again! :beer:
-
Mac Freak
Originally posted by caloysam
So, let's say for a 40GB hard drive, what's a good amount of space to keep free?
First off, if you're using the Finder (instead of Toast Titanium, etc.) to burn CDs, have at least 1GB of free space ready since the Finder uses up to 700MB of disk space depending on the size of the CD you're burning. When burning DVDs, the Finder uses up to 4.38GB of disk space so have at least 5GB free then. Not an issue with Toast Titanium, DragonBurn, etc.
If you want to minimize the use of hard drive space as virtual memory (and therefore minimize the amount of free disk space you need for VM), install as much RAM in your system as you can. OS X will only begin to use the virtual memory when it runs out of physical RAM. Using VM is slower than using physical RAM so the less your system has to use VM, the better.
To know just how much extra RAM you need (or how big the VM swap files are in your system), do this: use your Mac as you normally do, run all your usual apps, etc. etc. At the end of the day (or before you restart/shut down your Mac), open up Terminal and type in "vm_stat" (without the quotes). Look for the number of pageouts. Each pageout = 4K so 20,000 pageouts = 80,000K or around 78MB worth of virtual memory. It means that you need at least 78MB more physical RAM to minimize or eliminate the system's use of VM. It also means that your system is currently using around 78MB worth of hard drive space as VM for the usual computing tasks you're doing.
It gets complicated though. As OS X uses more and more VM, it creates more swap files. Swap files are created in the following sizes: 64MB for the first two swap files; 128MB for the third; 256MB for the fourth; 512MB for the fifth; and 1GB(!) for the sixth.
What this means is that while your system is only using 78MB worth of hard drive space as VM, the system in fact already has 128MB (swap files 1 & 2) of disk space reserved since swap file 1 alone is not enough for 78MB. If you get to the 40,000 pageouts range (160,000K/156MB), the system already needs three swap files for the VM since the first two (64MB+64MB) are not enough for 156MB worth of VM. Three swap files = 64MB+64MB+128MB. That's already 256MB of hard drive space.
512MB if you get to the 67,000 pageouts range; 1GB if you get to the 133,000 pageouts range!
IMHO, 1GB of free space is the bare minimum, even if you're just using your Mac for word processing, etc. You can probably get by with less if you've got lots of RAM (1GB+) and you restart your Mac every so often to clear the VM swap files. Not a good idea though, just stick with 1GB and more and you'll be okay. :-)
~Henjie
p.s. Ang haba pa ng sinabi, 1GB+ din pala bagsak. Hay, I'm bored. ;-)
[Edited on 5-7-2004 by Henjie]
-
ginoledesma
Guest
For Mac OS X, make sure your system drive absolutely never dips below 80MB, which is the mimimum size of the page file (a.k.a. a slice of virtual memory). Mac OS X handles low disk space for the system drive poorly, in my experience, and can result in very unexpected behaviour (e.g. Finder preferences being trashed, etc).
I agree with Gonz on the 10% rule of thumb, though you might find this unacceptable for high capacity drives (e.g. 120GB and above). I generally keep at least 8GB of space free on high-capacity drives, but on my system drive, I try to make it a point never to dip below 1GB.
-
ginoledesma
Guest
Originally posted by Henjie
If you want to minimize the use of hard drive space as virtual memory (and therefore minimize the amount of free disk space you need for VM), install as much RAM in your system as you can. OS X will only begin to use the virtual memory when it runs out of physical RAM. Using VM is slower than using physical RAM so the less your system has to use VM, the better.
Just a minor thing I learned from other sites: Mac OS X will use virtual memory regardless of how much RAM you have and how much physical RAM is used. Inactive contents in memory (e.g. applications that are running but have been idle for a very long time), will be paged out to disk. Similarly, quitting applications does not "free" memory as it did in the older Mac OS, but is "cached," and only purged when the page file(s) become full, and there is no room for newer contents to be cached. This explains why relaunching the application tends to be much, much faster.
[Edited on 5-7-2004 by ginoledesma]
-
Mac Freak
Originally posted by ginoledesma Originally posted by Henjie
If you want to minimize the use of hard drive space as virtual memory (and therefore minimize the amount of free disk space you need for VM), install as much RAM in your system as you can. OS X will only begin to use the virtual memory when it runs out of physical RAM. Using VM is slower than using physical RAM so the less your system has to use VM, the better.
Just a minor thing I learned from other sites: Mac OS X
will use virtual memory regardless of how much RAM you have and how much physical RAM is used. Inactive contents in memory (e.g. applications that are running but have been idle for a very long time), will be paged out to disk. Similarly, quitting applications does not "free" memory as it did in the older Mac OS, but is "cached," and only purged when the page file(s) become full, and there is no room for newer contents to be cached. This explains why relaunching the application tends to be much, much faster.
Technically, OS X will always use VM. But until you run out of physical RAM and pageouts occur, the VM is actually occupying zero space in your hard drive.
Looking back, I should have said: "OS X will only begin to use hard drive space as virtual memory when it runs out of physical RAM". :-)
BTW, missed one thing earlier. OS X always creates a 64MB swap file during startup so that's 64MB reserved for VM right off the bat.
As for inactive memory, as far as I know, inactive memory isn't being paged out to disk. My system reports that it's got 210MB of inactive memory, yet the number of swap file is still at 1, for a total of 64MB. Should have been 3 swap files by now if the inactive memory is being paged out. :-)
~Henjie
[Edited on 5-7-2004 by Henjie]
-
caloysam
Guest
Holy! ...
So much information.
Thanks guys for all your help. Although, I found most explanations a bit confusing :wound: So here are my numbers.
40GB HDD, 640MB RAM, 933MHz
I use my ibbok mainly for surfing, typing, making powerpoint presentations, listening to music, studying freehand, photoshp, and illustrator (but with the multimedia aspects, i don't really do it as much)
Hit me a number guys. The curiosity in me is kicking in. How much GB/MB should I keep "untouched"
(Geez, this post sounds like a word problem they give in high school :drunk
Bookmarks