Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

asif786

macrumors 65816
Original poster
Jun 17, 2004
1,027
0
London, UK.
hey,

is anyone else getting a process called 'update' whenever you leave your computer on for more than a few hours? it's taking like *all* available cpu (70-80%) and is making my imac fans run on full.

i'm running tiger. anyone else with this problem or a solution? it seems i have to force-restart to fix it..
 
update

man update :

UPDATE(8) BSD System Manager's Manual UPDATE(8)

NAME
update -- flush internal filesystem caches to disk frequently

SYNOPSIS
update [normal_interval [save_energy_interval]]

DESCRIPTION
The update command helps protect the integrity of disk volumes by flush-
ing volatile cached filesystem data to disk at thirty second intervals.
Update uses the sync(2) function call to do the task. The normal_inter-
val and save_energy_interval can be used to set the sync(2) interval in
seconds of the normal case and the case where the computer is trying to
save energy.

Update is commonly invoked at startup time by rc(8) when the system goes
multi-user.

SEE ALSO
sync(2), fsck(8), init(8), rc(8), sync(8)

BUGS
It is possible on some systems that a sync occurring simultaneously with
a crash may cause file system damage. See fsck(8).

HISTORY
An update command appeared in Version 6 AT&T UNIX.

BSD April 19, 1994 BSD

It shouldn't be running all the time. Are you running something that does a lot of small disk writes at high frequency?
 
May or may not be helpful, but this is what update *does*:

The update command helps protect the integrity of disk volumes by flushing volatile cached filesystem data to disk at thirty second intervals. Update uses the sync(2) function call to do the task. The normal_interval and save_energy_interval can be used to set the sync(2) interval in seconds of the normal case and the case where the computer is trying to save energy.

(From the man page). How full is your hard drive? Unless update has somehow gone cancerous, the explanation would seem to have to do with having large amounts of filesystem data to dump to the disk for some reason. But if that's really happening, then you'd think that you'd be doing something compute intensive and expect the machine to be running full-out anyway. Maybe if your drive is too full, then it is bumping up the frequency or something like this?
 
mkrishnan said:
But if that's really happening, then you'd think that you'd be doing something compute intensive and expect the machine to be running full-out anyway. Maybe if your drive is too full, then it is bumping up the frequency or something like this?
Actually, it wouldn't be something compute intensive, it would be something I/O intensive.
 
daveL said:
Actually, it wouldn't be something compute intensive, it would be something I/O intensive.

What I meant was that many things that generate a large I/O stream also consume a significant amount of processor time.... Although you're right, not all of them do.

But with respect to what you said earlier, from the way I understood the man page, update *does* run all the time, but it isn't supposed to be *doing* much. It gets started by rc and then stays running like a daemon whenever the computer is on and in multi-user mode (ie basically always). Update is running atm on my computer, albeit with close to 0% processor and memory.
 
mkrishnan said:
What I meant was that many things that generate a large I/O stream also consume a significant amount of processor time.... Although you're right, not all of them do.

But with respect to what you said earlier, from the way I understood the man page, update *does* run all the time, but it isn't supposed to be *doing* much. It gets started by rc and then stays running like a daemon whenever the computer is on and in multi-user mode (ie basically always). Update is running atm on my computer, albeit with close to 0% processor and memory.
You are correct. It starts up a boot time and continues to run, but only actually fires off a sync for each file system once every 30 seconds. If there's a lot of disk writes going on, it conceivable that by the time the current file system caches are written out, it's time for update to sync again. I would only see this happening in real life if you were generating more write activity to the file systems than the disk subsystem could handle, and you kept that high level of I/O activity going for a long enough period that the system never got a chance to catch up. (Man, that was a long sentence.)

Edit: I meant to add that I doubt the OP is experiencing what I described above, unless maybe Spotlight is hosed somehow and is continually generating new indexes (just a guess) or something along those lines.
 
ok, i have about 5 gigs spare on my hd..it's pretty much always being written and read to, but i dont think that makes much of a difference..

next time it's running i'll get some info from activity viewer. it's happened a few times over the past few days - during normal computer activities (browsing web, qt movie, etc).

could this perhaps be a hard disk error? my hd was playing up about a month ago..perhaps it's on its way out?
 
asif786 said:
ok, i have about 5 gigs spare on my hd..it's pretty much always being written and read to, but i dont think that makes much of a difference..

next time it's running i'll get some info from activity viewer. it's happened a few times over the past few days - during normal computer activities (browsing web, qt movie, etc).

could this perhaps be a hard disk error? my hd was playing up about a month ago..perhaps it's on its way out?
Yes, a disk problem could account for it. If the writes don't complete because of a hardware error, then the file system cache is going to build and update is going to continue to try to complete flushing of the cache until it succeeds. Does Disk Utility show a SMART status for the drive? Have you tried booting of CD and running disk repair?
 
daveL said:
Yes, a disk problem could account for it. If the writes don't complete because of a hardware error, then the file system cache is going to build and update is going to continue to try to complete flushing of the cache until it succeeds. Does Disk Utility show a SMART status for the drive? Have you tried booting of CD and running disk repair?

thanks for all the help btw - i've heard of a few other people with this problem so i just want to see if we can find the cause so others can benefit too.

i'm switching hard drives in about a week, so this will probably remove the problem for me. in terms of SMART status, i get the following:

S.M.A.R.T. Status : Verified

disk repair hung the last time i tried to use it, so i think a hd problem could be the cause. then again, i haven't really had any problems occuring recently. i was wondering though, isn't osx supposed to be able to stop a process spiralling out of control and making the system unstable?
 
asif786 said:
disk repair hung the last time i tried to use it, so i think a hd problem could be the cause. then again, i haven't really had any problems occuring recently. i was wondering though, isn't osx supposed to be able to stop a process spiralling out of control and making the system unstable?

Sometimes. ;) Unix-based OSes have tools like nice that prevent processes fromm taking up too much processor time and interfering with the user. But this is a process to write the file cache to the disk! I don't think taking process time away from it is such a good idea! :eek: You have to fix why it *needs* the process time...if you prevented it from doing it's job, it would almost certainly cause you to lose data at a minimum, and probably also cause your system to crash.

If you were not able to do disk repair, try fsck. Directions here.
 
ok, here are some pictures of whats happening. when woke up this morning the fans were on full - and these showed up..
 

Attachments

  • update1.gif
    update1.gif
    43.9 KB · Views: 93
  • update2.gif
    update2.gif
    13.8 KB · Views: 97
asif786 said:
ok, here are some pictures of whats happening. when woke up this morning the fans were on full - and these showed up..

In comparison to mine, the only numbers that seem out in the right-hand grab are the total CPU time (obviously) and the number of context switches. Yours # of context switches is huge compared to mine, but all the other numbers are actually similar in magnitude....

I have:

Threads: 1
Ports: 14
CPU T: 52.61 (slightly less than a day of uptime since getting 10.4.1 on yesterday)
Context switches: 27k
Faults: 81k
Page ins: 3
Match in: 57k
Match out: 61k
Match calls: 61k
Unix calls: 1400
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.