PDA

View Full Version : Mac faster after reboot?


tech4all
Nov 10, 2004, 10:00 PM
Why is it that when I turn on my computer, then if I reboot it, it seems a lot snappier? Like Mail takes like 4-5 seconds to open up. After a reboot it takes like 1 second? Just seems like a reboot gives it some caffine or something. Any ideas? (specs in sig)

KC9AIC
Nov 10, 2004, 10:27 PM
It may be that you have some programs that have memory leaks, or have lots of programs open, taking up RAM, and forcing mail to open up using virtual memory.

~loserman~
Nov 10, 2004, 10:30 PM
Why is it that when I turn on my computer, then if I reboot it, it seems a lot snappier? Like Mail takes like 4-5 seconds to open up. After a reboot it takes like 1 second? Just seems like a reboot gives it some caffine or something. Any ideas? (specs in sig)

Memory Fragmentation is the number one problem with OS X and performance. The second reason would be Possible memory Leaks in one of the Apps you run.

tech4all
Nov 10, 2004, 10:33 PM
It may be that you have some programs that have memory leaks, or have lots of programs open, taking up RAM, and forcing mail to open up using virtual memory.


Hmmm memory leaks? I thought OS X was better at that compared to Windows....guess not :confused:


....The thing is, when I first boot up the computer, I imdietely restart it (not all the time of course ;)) then once it gets to the desktop and I start using things, like open Mail, its snappy. Its not that big of a deal really, but it would be nice if it was snappier at first start up rather than having to reboot and such :(

tech4all
Nov 10, 2004, 10:36 PM
Memory Fragmentation is the number one problem with OS X and performance. The second reason would be Possible memory Leaks in one of the Apps you run.

Well I do notice that on first start up a second Virex icon appears briefly on my dock. Not sure what Memory Fragmentation is exactly :D, but I take it it's not the best thing. Anyway to correct this minor snafu?

Sun Baked
Nov 10, 2004, 10:51 PM
Hmmm memory leaks? I thought OS X was better at that compared to Windows....guess not :confused:Yes, but if the applications you are using keep asking for memory and don't flush it after use, they will consume more and more -- and unix will try and give it to them.

While the same program would just end up giving you and out of/low memory
error.

There are quite a few programs that ended up with memory leaks, when they Carbonized them.

Mechcozmo
Nov 10, 2004, 11:32 PM
Also the swapfile is reduced to a realistic level again after building up junk for who knows how long.

And your brain is wired to think that your Mac runs faster after a restart, so it does. :D

MacsRgr8
Nov 11, 2004, 01:55 PM
Eh.. does he mean his Mac is faster after a warm boot (i.e. reboot) than after a cold boot (i.e. turn on)??

Could be me... but that's what I make out of his post... :confused:

Mr_Ed
Nov 11, 2004, 02:37 PM
Others have pointed out the most likely culprits:
- Too many open apps using up "real" memory causing newly launched apps to load largely in "virtual" memory.
- Some of the applications have leaks causing them to use increasingly larger shares of the memory.

In either case, closing open apps. should alleviate the problem. In other words, if you close all apps, wait a couple of seconds (for the OS to "recover" all previously used resources), then open Mail.app, it should "feel" about the same as when you do it after a reboot.

The other solution is to add more RAM to your system, though that does not actually fix a "leaky" application. It just delays the time when the leak will impact performance.

Timelessblur
Nov 11, 2004, 03:01 PM
well closing the apps is going to free up ram yes but it is not going to clean up the Ram fragmation. that normal just keeps getting worse as time goes on to a point. Also the OS it self prouble has some minor memoriy leaks in it that just build up over time. Also when an App is close the data in the ram is not always destoyred instead it just sit there taking up the space.

2ndly OSX has pretty crummy page swaping when it compared to windows

Mr_Ed
Nov 11, 2004, 05:05 PM
well closing the apps is going to free up ram yes but it is not going to clean up the Ram fragmation. that normal just keeps getting worse as time goes on to a point. Also the OS it self prouble has some minor memoriy leaks in it that just build up over time. Also when an App is close the data in the ram is not always destoyred instead it just sit there taking up the space.

2ndly OSX has pretty crummy page swaping when it compared to windows

I'm probably a little rusty on this, but bear with me . . . Seems to me the OS loads first, so it is not the primary cause of fragmentation, it's the other user apps. That being the case, if you shut them down, the OS ends up with large contiguous chunks of free memory to be used by newly launched apps (ie. little or no fragmentation). If the OS was not consistent about recovering RAM from a finished process, we would have a lot bigger problems on a regular basis. It is my impression that UNIX and its derivatives have had that part of the equation worked out for many years. While the virtual memory size of a running process will not decrease even if the process "frees" memory it was using, ALL of it is recovered by the OS when the process exits.

I won't say I know there are zero memory leaks in the OS, but you could not keep your machine up for long periods of time unless it was damn near zero. The same goes if there was a lot of problems with fragmentation. I keep my Mac running for weeks at a time without noticeable loss of performance. Everything seems to work about the same two weeks after a reboot as it does right after a reboot. A far cry from most Windows systems I have used which required almost daily reboots to keep performance up.

tech4all
Nov 11, 2004, 09:18 PM
Eh.. does he mean his Mac is faster after a warm boot (i.e. reboot) than after a cold boot (i.e. turn on)??

Could be me... but that's what I make out of his post... :confused:

Yea that pretty much describes it.


In either case, closing open apps. should alleviate the problem. In other words, if you close all apps, wait a couple of seconds (for the OS to "recover" all previously used resources), then open Mail.app, it should "feel" about the same as when you do it after a reboot.

That's the thing, I have no apps that I have opened up (like Photoshop, Flash, Illustrator, Word, etc). The only "app" that I see open is a second Virex icon in the dock, but that disappears in a few seconds on it's own. And I think it said Virex login, when I quickly rolled my mouse over it to see what it was. I would close apps to regain RAM, but I don't have any apps to close. But is there much of a difference in the way apps go into RAM when you turn on the computer vs. rebooting? Because there is obviously difference in performance between the two.


Thanks for the info :)

Mr_Ed
Nov 12, 2004, 10:02 AM
...
That's the thing, I have no apps that I have opened up (like Photoshop, Flash, Illustrator, Word, etc). The only "app" that I see open is a second Virex icon in the dock, but that disappears in a few seconds on it's own. And I think it said Virex login, when I quickly rolled my mouse over it to see what it was. I would close apps to regain RAM, but I don't have any apps to close. But is there much of a difference in the way apps go into RAM when you turn on the computer vs. rebooting? Because there is obviously difference in performance between the two.
...
Weird. Generally there should not be much difference between the way apps and OS load after a "cold" (machine startup) boot and a "warm" (reboot) boot.

The only "variable" seems to be the Virex thingy. I'm not familiar with it. Does it have some component that continues to run in the background? If so, you would probably be able to see it in the process listing (launch the 'Activity Monitor' application). Does this Virex do anything to your mail (like scanning for viruses) while Mail is running? If so, could this be interfering with the performance of your Mail app?

I suppose you could try to disable Virex temporarily (so it does not load at startup) and see if you still experience the symptoms with the Mail app.

Timelessblur
Nov 12, 2004, 11:18 AM
I'm probably a little rusty on this, but bear with me . . . Seems to me the OS loads first, so it is not the primary cause of fragmentation, it's the other user apps. That being the case, if you shut them down, the OS ends up with large contiguous chunks of free memory to be used by newly launched apps (ie. little or no fragmentation). If the OS was not consistent about recovering RAM from a finished process, we would have a lot bigger problems on a regular basis. It is my impression that UNIX and its derivatives have had that part of the equation worked out for many years. While the virtual memory size of a running process will not decrease even if the process "frees" memory it was using, ALL of it is recovered by the OS when the process exits.

I won't say I know there are zero memory leaks in the OS, but you could not keep your machine up for long periods of time unless it was damn near zero. The same goes if there was a lot of problems with fragmentation. I keep my Mac running for weeks at a time without noticeable loss of performance. Everything seems to work about the same two weeks after a reboot as it does right after a reboot. A far cry from most Windows systems I have used which required almost daily reboots to keep performance up.

I going to counter you argument on windows because my XP computer easily goes 4-6 days with out a reboot the only reason I have to reboot is because my collage does something funning with assing ip and what not glitchs the network configation. Most of the time it other software the eats up your memory and when the program is shut down it does not free up correctly. Generly after a several hours the memory has pretty much reach a point of totally random and fragment about as far as it going to go so you not going to degread any farther. Really after a few hours the computer has degreeed about as far as it going ot ram wise. then it just be memory leaks that eat up space. I know most of my ram is eatten up by a few programs that I run that have memory leaks in them that add up in about 3 days but I can clean those up. The OS will flush the ram from time to time to clean it up.

wdlove
Nov 12, 2004, 11:43 AM
I haven't really noticed any difference with mine. Although I do run Optimizer X weekly on my Mac.

Mr_Ed
Nov 12, 2004, 12:07 PM
I going to counter you argument on windows because my XP computer easily goes 4-6 days with out a reboot the only reason I have to reboot is because my collage does something funning with assing ip and what not glitchs the network configation. Most of the time it other software the eats up your memory and when the program is shut down it does not free up correctly. Generly after a several hours the memory has pretty much reach a point of totally random and fragment about as far as it going to go so you not going to degread any farther. Really after a few hours the computer has degreeed about as far as it going ot ram wise. then it just be memory leaks that eat up space. I know most of my ram is eatten up by a few programs that I run that have memory leaks in them that add up in about 3 days but I can clean those up. The OS will flush the ram from time to time to clean it up.

I can't comment on how stable XP is since I have not used it. My experience with 95, 98, NT, and 2000 has been as I stated. XP may very well be an improvement.

You say that memory leaks are the applications' (not OS') fault because they fail to free up memory correctly. This should only be true as long as the application is actually running. The operating system should always be in control of ALL resources, including memory. Whether or not an application explicitly "frees" memory it acquired from the OS, the OS should recover ALL of it when the application exits. If it does not, it's not much of an operating system by modern standards, and the system as a whole will not run efficiently for very long if applications are starting and exiting on a regular basis (as might be typical for a personal computer). With that in mind, any memory leaks in an application can be "cleaned up" simply by exiting the application. If there are any memory leaks in the OS itself, those generally would require a reboot to clean up.

I believe even Windows tries to do this level of resource management though I don't know how efficiently they do it. The fact that I had to reboot so often (in past versions of Windows) to clear certain things up and to improve performance caused me to have serious doubts about how well Windows manages resources, and how relatively free of OS leaks it was since quitting all applications often did not seem to help.

gekko513
Nov 12, 2004, 01:06 PM
Mac OSX frees up all the memory that an application has allocated when it exits, even if the application has memory leaks.

Timelessblur
Nov 12, 2004, 06:04 PM
I can't comment on how stable XP is since I have not used it. My experience with 95, 98, NT, and 2000 has been as I stated. XP may very well be an improvement.

You say that memory leaks are the applications' (not OS') fault because they fail to free up memory correctly. This should only be true as long as the application is actually running. The operating system should always be in control of ALL resources, including memory. Whether or not an application explicitly "frees" memory it acquired from the OS, the OS should recover ALL of it when the application exits. If it does not, it's not much of an operating system by modern standards, and the system as a whole will not run efficiently for very long if applications are starting and exiting on a regular basis (as might be typical for a personal computer). With that in mind, any memory leaks in an application can be "cleaned up" simply by exiting the application. If there are any memory leaks in the OS itself, those generally would require a reboot to clean up.

I believe even Windows tries to do this level of resource management though I don't know how efficiently they do it. The fact that I had to reboot so often (in past versions of Windows) to clear certain things up and to improve performance caused me to have serious doubts about how well Windows manages resources, and how relatively free of OS leaks it was since quitting all applications often did not seem to help.

I though I stated I am running the programs. when you exit the program it takes some time to compeltey free up the memory. But it mostly the exitingg that cause memory fagmation. if a program is not the active using the memory a lot of the time it put off in the VM or pagefiles depending on your term for it. Windows runs the page swap/VM better than OSX but they also had more time to figure it all out and getting working

gekko513
Nov 12, 2004, 08:03 PM
How do you know that Windows runs the page swap/VM better than OSX? Do you have any sources or links?

I really don't know which OS has the best swap mechanism, but the only thing I've read about it is an article on arstechnica or anandtech about a hardcore Windows user who tried the switch to Mac OSX sort of as a test.

One of his observations was that OSX was better at having several applications open at once and switching between them. In other words, a better swap mechanism. It wasn't a scientific test, though.

And since the swap mechanism is a part of the kernel, the roots of the OSX swap mechanism is much older than Windows, so that would give OSX more time to figure how to do it right.

Timelessblur
Nov 12, 2004, 10:48 PM
well the proof would like if you look at the size in each of them. windows XP oddly enough has smaller memory footprint that OSX and it swap/VM files is lower. Macs start complaining if you drop below the 3-4 gig line. windows slowing start to show problems when you drop below 2 gigs of free hard drive space. Mind you most of the time the swap is under a gig.

gekko513
Nov 13, 2004, 08:32 AM
I'm sorry TimelessBlur, but that's not proof of anything of what you have said before.

First of all it's just another set of claims that aren't backed up by any sources.

Second of all, even if the claims where true, they would not in any way indicate that Windows has better VM management under normal running conditions.

:confused:

dorqiekat
Nov 13, 2004, 05:40 PM
how do you know which apps have "leaks" and how do you fix it?

...if it smells like a newbie, it must be. :o

you know that purple/pink face looks like it passed gas real loud.

Mechcozmo
Nov 13, 2004, 05:52 PM
:o

you know that purple/pink face looks like it passed gas real loud.

LMAO... you made my dog look at me like I was crazy after I fell of the chair...

After a fresh start (or two):
Open the Terminal and run the "top" command
Open an application
Do some work in aforementioned application
Close that application
In the terminal, the top command shows you the amount of free memory you have. It should be lower now... and that isn't good.

dorqiekat
Nov 13, 2004, 06:04 PM
LMAO... you made my dog look at me like I was crazy after I fell of the chair...

Did he do the cocking-head-one-side-with-erect-ears? I get that all the time :rolleyes:

After a fresh start (or two):
Open the Terminal and run the "top" command
Open an application
Do some work in aforementioned application
Close that application
In the terminal, the top command shows you the amount of free memory you have. It should be lower now... and that isn't good.

The terminal huh... I guess I'll have to have a mac geek come over and do it for me... the terminal and don't get along. Plus, I try to stay away from it. It sounds too... scary.

Mr_Ed
Nov 13, 2004, 06:17 PM
You don't need the 'Terminal' app. You can see this information in the 'Activity Monitor' (Panther) or the 'Process Monitor' (I think that was the name in 10.2 or earlier) applications (Applications/Utilities folder).

The 'Free' memory amount should generally increase when you shut down an application. If it does not, then the 'Inactive' pool increased instead. In some situations (such as when there is little free memory) new apps are given space from the 'Inactive' (not Free) pool and as the OS 'cleans up' fragmentation in the 'Inactive' and 'Free' pools, the space for a newly closed app will then be returned to the 'Free' pool. The main thing is, no memory was really "lost" (as in a leak) in those cases. Memory was allocated from the 'Free' pool or the 'Inactive' pool, and returned to one of those when the application closed.