|
|||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
#1 |
|
Prospect
Join Date: Feb 2013
Posts: 4
|
Has anyone else with an older Macbook disabled swapping in Snow Leopard and seen...
...massive performance gains?
I figured I'd ask this here as I'd probably get more enlightened answers than those at Apple's discussion forums who insist that any tampering whatsoever with OS X above and beyond what Apple recommends will hasten the apocalypse ![]() I'm using a late 2006 Macbook2,1 intel core duo with Snow Leopard. I presume it's because my hard drive is old and its motor is wearing out (even though it has never failed a smart test or surface scan), but paging out doesn't just cause a performance hit on my machine, it literally renders OS X totally unusable (to the point where a dock icon will bounce 20 times before opening, and you'll get a spinning beachball doing something as simple as closing a Finder window or navigating to a new directory). Couple this with the fact that the latest version of Safari available for Snow Leopard is the version with the dreaded Safari Web Content memory leak and you have a recipe for ending up in hospital after one too many facedesks manages to break your nose ![]() I was told this was a mad thing to do but I have a bootable external drive with Techtool Pro and a bunch of other recovery tools, HD fully cloned on two different external drives and at this moment in my life I'm not working on anything with my laptop which I can't just as easily use my iPhone for, so nothing whatsoever to lose by taking risks. Using Cocktail, I disabled the dynamic pager daemon and completely turned off the Swap File. I've been using the machine without a pager for about a week now, and to my surprise, no ice age has begun, no asteroid has struck the earth, Krakatoa has not erupted and CERN's LHC has not created a gigantic black hole to wipe us all out. On the contrary, my Macbook is suddenly reminiscent of what it was when I first bought it: Faster than any other computer I have either at home or in college, and capable of performing such outrageously unlikely tasks as watching a movie on YouTube without any audio skipping, beachballs, or hangs ![]() I don't know why - one theory I have is that perhaps when there literally is nowhere to put any extra un needed RAM, the system tells Safari Web Content to go F itself when it asks for another 500GB for absolutely no logical reason. I do notice that hardly any memory is wasted anymore - instead of paging, the system actually uses the vast chunk of blue "inactive" memory Safari creates after half an hour of having a few pages open. Only when the red "wired" section reaches 99% do I notice any problems, and even then the system doesn't actually hang. It slows down almost, but not quite, as much as it used to when it would start paging out to disk, and all I have to do is generally kill whatever process is using up memory to get it going again. Crucially, unlike what used to happen with paging out, the process itself doesn't tend to hang, meaning it's still possible to save whatever file you might have been working on before you quit it. Another example I have is Melodyne's music editor - this used to automatically cause page outs due to its ridiculous insistence on having the entire deconstructed WAV file in memory while converting it. Now, while conversions are slightly slower, I notice it (again) simply using the inactive memory portion of RAM - therefore, once it's done converting and has given back all that memory, I am then able to edit and play back whatever piece of music I'm working on easily and efficiently. In the days of page outs, the minute the system had paged even 1 kilobyte to the swap file, editing any form of multimedia would become utterly impossible as playing back an audio file would result in a 10 minute beachball and multiple incidents of audio skipping when it finally started playing. Crucially, I don't have to restart nearly as often as I used to. As I noted, even one page out rendered my computer hellish to use, and quitting applications would rarely fully resolve this. Sometimes logging out of my user account and back in again would decrease the swap somewhat, but only a reboot would bring the machine back up to speed. I haven't had to reboot in ages now and there's no sign of that kind of permanent drop in performance from having it on for too long. Now I'm not here to recommend this to anyone as I know that it's a horrendously risky thing to do and as I said, should anything go wrong right now it's not that big a deal to me, I'm not working on anything which absolutely requires me to have my computer working at all times and I regularly back up so that if it goes pear shaped it really doesn't hurt me that much. I realize most people probably aren't in a position to be able to take that kind of risk. What I AM here for, however, is to see if anyone else has actually tried this and noticed the same thing I have, that the performance of the machine is hugely increased? OR conversely has anyone done this and had a negative experience? And does this finally put paid to the (in my view absurd) claims from some people that users shouldn't tinker as Apple's memory management is beautifully designed and anything wrong with it is the user's fault? Or that there are actually cases in which paging out is preferable to killing some inactive memory?
|
|
|
|
|
|
#2 |
|
Triple-A Player
Join Date: Sep 2002
Location: America
Posts: 107
|
The theory sounds interesting, but I myself haven't tried this. On the Mac where I started noticing serious sluggishness, I verified hard drive performance was the culprit and replaced the drive, then cloned the data back over and all was well.
On another note, I find it interesting that you mentioned "never failed a smart test/surface scan". I've seen other instances when supporting Mac customers where they noticed serious sluggishness and we troubleshot til we were blue in the face and finally found that the hard drive (in most cases) was the cause for slowness. Even though we ran a smart on the HDD and nothing came back. Since that time, it's made me seriously doubt the usefulness of SMART. |
|
|
|
|
|
#3 |
|
MVP
Join Date: Apr 2008
Location: Berkeley CA USA
Posts: 1,008
|
Your disk is failing. It has a weak sector that is requiring many retries to read/write.
It's pure coincidence that that bad sector happens to be in your swap file. By turning off swap, you've made that bad sector available to be used for some other file instead. When you get around to writing some other data to that sector, you'll experience the same slowdown. I'm glad things are better for the time being, but the lesson you should take away from this is not "swapping is bad" but rather "a bad disk is bad". |
|
|
|
|
|
#4 | |||||||||||||||||||||||
|
Moderator
Join Date: Jun 2003
Location: Boulder, CO USA
Posts: 19,549
|
S.M.A.R.T. gives you a good look at only a tiny sliver of what can go wrong in a hard drive. It's like a view of 5% (I pulled that number out of the air, but it's a tiny percentage) of the potential problems. If a drive fails S.M.A.R.T., then it's certainly bad, but there's another 95% of things that S.M.A.R.T. doesn't and cannot address. So many many hard drives will fail without S.M.A.R.T. telling you anything. Trevor
__________________
How to ask questions the smart way |
|||||||||||||||||||||||
|
|
|
|
|
#5 |
|
Triple-A Player
Join Date: Sep 2002
Location: America
Posts: 107
|
Thanks for the feedback trevor. Do you use a tool or a set of tools that helps verify the HDD's health for the rest of that 95%? I used to use Diskwarrior a long time back, but I'm quite sure my subscription ran out.
|
|
|
|
|
|
#6 |
|
Moderator
Join Date: Jun 2003
Location: Boulder, CO USA
Posts: 19,549
|
Oh, I just got an email from Micromat about something that they sell purporting to tell you the health of your entire computer. But frankly I doubt that it will be much better than S.M.A.R.T.
There's simply a limit to how much detection can take place for many issues. It's not like in a car, where the automobile manufacturers stick sensors into every imaginable location to tell you when your tires are low on air pressure, or there's the wrong amount of oxygen in your catalytic convertor, or whatever. So the short answer is no, I don't have any tools to verify a hard drive's health. I usually discover a problem because something isn't right to the user--pauses, or delays, or error messages, or failures to boot, or whatever, and then fix it. Trevor
__________________
How to ask questions the smart way |
|
|
|
|
|
#7 |
|
Prospect
Join Date: Feb 2013
Posts: 4
|
On the suggestion that my drive has a bad sector:
I use techtool pro to defragment free space every now and then. I know that again this is an "unofficial" procedure, but as I work with music files which can get huge, OS X's built in defragmentor which doesn't deal with anything bigger than 20mb isn't much use. Free space, or volume defragmentation, pushes all the files to one contiguous block on the disk, leaving the other block one contiguous area of free space, to speed up how quickly new files can be saved. To be honest I'm never sure of the usefulness of this seeing as if any of the existing files gets bigger, it will automatically fragment due to there being no free space near it, but even so I do it periodically. Recently, it's been failing to completely defragment free space. But the interesting thing is, it reports a full defragmentation. What I get is this kind of thing: Volume Optimization: Complete Free space: 40 GB Largest contiguous free space: 39.5 GB Number of free space blocks: 1 Is that indicative of a fault somewhere? How can there be only one free block if the largest block is 39.5 and there is apparently 500 megs missing? |
|
|
|
|
|
#8 |
|
League Commissioner
Join Date: Jan 2002
Posts: 7,948
|
@hatrickpatrick - you didn't say how much RAM memory you have in your MacBook
Your Macbook2,1 can recognize up to 4GB - although only 3GB will be addressed by the system. Maximizing the memory can result in a large increase in performance, too. Another way to look at your situation: If you can increase your performance by preventing your system from utilizing your hard drive when necessary, then your may have a hard drive that is simply not providing the read/write performance that you should expect from a hard drive. |
|
|
|
|
|
#9 | |||||||||||||||||||||||
|
League Commissioner
Join Date: Sep 2003
Location: Tokyo
Posts: 6,045
|
Defragmentation tools cause a lot of wear and tear on a drive. It's better 9and usually faster) to just clone the drive to a new one, reformat the old one, and copy data back. You get the benefit of a fresh directory this way. Better solution for you right now is a new drive. Put an SSD in there and it will run even faster than when it was new. And you never need to defragment an SSD. |
|||||||||||||||||||||||
|
|
|
|
|
#10 | |||||||||||||||||||||||
|
Prospect
Join Date: Feb 2013
Posts: 4
|
Was actually thinking of getting another mechanical drive - don't SSDs have a very limited lifespan in terms of how many times each block can be overwritten? Also, I'm not sure if this macbook would take an SSD since it's about 6 years old. Best solution might actually be to just save up and replace the whole machine... |
|||||||||||||||||||||||
|
|
|
|
|
#11 |
|
League Commissioner
Join Date: Sep 2003
Location: Tokyo
Posts: 6,045
|
I put an SSD into a 2008 MacBook. As long as the interfaces match the computer largely won't care.
SSDs are write-limited but the firmware in the drive knows all about it and spreads out the sector usage. They are also over-provisioned (120Gb model really has 130Gb in it) so unless you are doing something that requires constant saving to disk (software development, commercial-level media editing, running defragmentation software....) the drive will last as long as the computer. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|