2

I have few GBs (5,38 GB at the moment) of free space on my hard disk (MacBook Pro 2010, 10.7.5). Few hours after I turn on/reboot my computer, the free space slowly goes down to zero and the system hangs. I've found out that these 2 programs cause this problem: xCode, Google Chrome (both programs are memory-consuming I believe), although I think the problem is related to OS itself.

I've found similar questions but they all seem to be related to vanishing some of the disk space, where in my case I slowly loose all of the disk space.

What I've tried so far:

  1. Using OmniSweeper to clean my disk
  2. Disabling Mac OS X Paging/Swap as described here
  3. Deleting sleep image

Right now, the only solution for this problem is to reboot the system (then it has all these GBs back and I can work for few hours). When I close Google Chrome and wait for few minutes, the system frees some (no more than 600 MBs) of disk space.

What can cause this problem? What software can I use to investigate it?

3
  • 1
    If you have only 6G free then losing some disk space is the same as losing it all.
    – mmmmmm
    Commented Nov 7, 2012 at 13:27
  • 1
    Why not re-enable swap, leave the sleep image alone and clear off enough drive space to hold the temporary files your choice of programs needs to run? The system and the vast majority of programs are designed to work in an environment where the virtual memory system is operational and this is exactly what happens when you disable swap. Memory fills and the machine crashes.
    – bmike
    Commented Nov 7, 2012 at 15:11
  • 1
    @bmike It looks like that was a solution. Few days ago I've deleted app data of few apps and the system seems to work properly now.
    – syntagma
    Commented Nov 7, 2012 at 18:44

3 Answers 3

2

First, if you want to free up some more space, I used xSlimmer. It delocalizes AND gets rid of the "Universal" code that isn't used by Intel processors. This makes all the Apps smaller. Depending on the number of Apps you have installed you may only see another couple Gigs freed up.

Chrome is caching websites to your disk. That's part of what it does to "speed up" page viewing. Most people don't spend all day going to new websites. They go to websites they are familiar with. So Chrome (and other web browsers) cache to your hard drive. Since material is pulled from the local disk, it "speeds up" the page view.

Quite honestly, this is not a "problem" (per se). This is expected behavior. You need to either remove unused programs, remove (or compress) unnecessary data files, or increase the size of your HD. There's really not another option. Programs may use hard drive space for other functions (auto saving is an example).

It's actually not a great idea to turn off your swap. Now there are some exceptions to this, I have 16 GB of RAM and didn't Swap once in 30 days. I have years of experience and decided to shut off my Swap temporarily. That was a month ago. No problems yet.

I'm not trying to sound condescending, you may know more about Swap files than I do (you may have invented them). I'm just saying that usually this is not a good idea. And if your system really only (yes, only) has 4GB of memory, you are going to cause yourself out of memory problems, or software crashes. I know because my Mac Mini swaps all the time using 4GB.

3
  • Thank you for all the tips. I am aware of Google Chrome caching and I clear my cache from time to time (doesn't help much). I turned off swap just temporary, trying to find out if this would be a solution. I still believe it is a "problem" I haven't had such problem few months ago (with approx. same amount of free disk space). I'll try to free some more space using xSlimmer.
    – syntagma
    Commented Nov 4, 2012 at 17:20
  • Another thing, programs grow in size as they are updated (in general, there are a few instances where code is "tightened up"). So a few months ago all your programs may have been a smaller size. As functions are added, and they are updated, program size increases. This may explain why a few months ago things were good, but now, after updates, there is less room.
    – Everett
    Commented Nov 4, 2012 at 17:55
  • I've accepted this answer as it pointed me to the right direction. The solution was to free few more GBs of the disk space (because of the Virtual Memory). OmniSweeper and Grand Perspective did the job.
    – syntagma
    Commented Nov 7, 2012 at 18:47
0

Download Grand Perspective. It visually shows you where your files are. Then you can manually delete them. Look for your "sleep" image. If thats larger than your current RAM its a major issue.

1
  • sleepimage file is 4.0G and the total 'System Memory' in Activity Console is also 4.0G (Free: 1.64 GB, 723.5 MB, 1.37 GB, 289.9 MB, 2.36 GB) - all after reboot.
    – syntagma
    Commented Nov 4, 2012 at 14:47
0

A few other tips...

To keep your sleepimage from coming back, check out http://www.jinx.de/SmartSleep.html - a program that will help you control when or if a sleepimage is written.

To clear out 1-2 GB more space, you could delocalize your machine (remove all of your language) files by executing the below script in the terminal. Beware: this will remove all language files but English across your whole system. That said, I have used this script on hundreds of machines from 10.3 to 10.8 without problem.

sudo find / \( -name *.lproj -and \! \( -name English.lproj -or -name en.lproj -or -name en_US.lproj -or -name en-US.lproj -or -name empty.lproj \) \) -exec rm -rf \{\} \;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .