topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 5:44 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Taming disk accesses  (Read 12260 times)

highflier

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1
    • View Profile
    • Donate to Member
Taming disk accesses
« on: December 31, 2006, 05:09 AM »
Hi all,

ProcessTamer does a good job in handling one of the bottlenecks of current computers, which is access to the CPU. It does so by changing the priorities of the processes. This works because Windows incorporates a priority-based queue for CPU access.

There's another important bottleneck in present-day computers: access to the disk(s). Windows doesn't include a priority-based queue for disk access. It just has a first come - first served queue. This can allow a low-priority process to virtually hang a computer.

Imagine the following situation: a certain process needs to make many, very frequent disk accesses. An example could be the disk scanning component of an anti-virus package, which has to access all the files in the disk to do its job. You set this process to low priority, in an attempt to make it run in the background, without disturbing your normal use of the computer. However, whenever the higher-priority processes leave a bit of free CPU time, this low-priority process is allowed to run. Even if it runs for a short time, it immediately fills the disk queue with a lot of access requests. Now, one of your higher-priority process runs again, and needs to make a single disk access. Since the disk queue is full of requests from the low-priority process, and since the disk is a relatively slow component, your high-priority process will have to wait until all the requests from the low-priority one are served. While the high-priority process waits to get its disk access served, the low-priority process gets to run a tiny bit of time again, and places a further lot of requests in the disk queue... The net effect is that the high-priority process is almost completely blocked by the low-priority one.

Situations like this are not infrequent. I think that some present-day disk scanners from anti-virus packages are already designed so as to prevent this from happening (e.g. by self-limiting the number of consecutive disk access requests that they make, and waiting until all of them are served before making new ones). But most other programs are not designed in that way. And a program that runs astray due to some bug can also start placing an inordinate number of requests in the disk queue. I've run into situations like this from time to time, and in some cases the only way to solve the problem was to press the reset button and then reboot, because even the task manager would take an inordinate amount of time to start, and therefore I was unable to kill the offending process.

This kind of problem can't be solved by changing process priorities: As I explained, even a low-priority process can effectively block high-priority ones. I think that the only way to handle it is to temporarily suspend the offending process, based on the number of disk requests that it makes. The best rules for doing this will probably have to be learned by experimenting. Certainly, it will be desirable to allow the user to explicitly exclude some processes from this kind of taming.

I don't know how hard it is to implement a strategy of this kind, because it means adding a taming philosophy that is very different from the one currently used by ProcessTamer. But it would certainly be a very useful addition.

On a side note, the fact that Windows still doesn't include a prioritized queue for disk access says a lot about Microsoft's own priorities in software development.

And on another side note, thanks a lot to Mouser for making ProcessTamer, and other useful programs, available to all of us.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Taming disk accesses
« Reply #1 on: January 01, 2007, 08:39 AM »
Welcome highflier,

There have been a few similar requests to this, regarding memory usage, and/or taming to reduce absolute cpu usage not just priority changing.. I am going to give some thought to this..

-mouser

CodeTRUCKER

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,085
    • View Profile
    • Donate to Member
Re: Taming disk accesses
« Reply #2 on: January 01, 2007, 08:45 AM »
I'll throw my hat in the ring.
« Last Edit: September 26, 2010, 02:11 AM by CodeTRUCKER »

yksyks

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 476
    • View Profile
    • Donate to Member
Re: Taming disk accesses
« Reply #3 on: January 08, 2007, 04:04 AM »
Another vote for taming the disk access. It would be really helpful for applications dealing with video files, for example. Usually I don't care how long it takes to finish, but I'd like to be able work in the meantime effectively. And despite the application itself consumes, say, 8 % of CPU; the PC is quite stuck due to the heavy disk access.

coen99

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 3
    • View Profile
    • Donate to Member
Re: Taming disk accesses
« Reply #4 on: January 16, 2007, 12:57 PM »

You also got my vote !  :Thmbsup:

Great feature.

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: Taming disk accesses
« Reply #5 on: August 08, 2007, 05:37 PM »
Another vote. :up:
That would be extremely convenient.

Darwin

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 6,984
    • View Profile
    • Donate to Member
Re: Taming disk accesses
« Reply #6 on: August 08, 2007, 05:41 PM »
I'd like to add my vote, too  :Thmbsup:. Thanks for bumping this thread, Armando, if you hadn't I never would have noticed it!

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: Taming disk accesses
« Reply #7 on: August 08, 2007, 05:46 PM »
Actually, Darwin, it was yksyks who brought it to my attention -- from the Process tamer... Express your feature requests... thread.

So, thanks to yksyks too!  ;)

Darwin

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 6,984
    • View Profile
    • Donate to Member
Re: Taming disk accesses
« Reply #8 on: August 08, 2007, 06:09 PM »
Oops!  :-[ Thanks yksysks!

stinky1

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: Taming disk accesses
« Reply #9 on: February 06, 2008, 12:33 PM »
This would be great, but I wonder if it is realistically achievable.

Armando

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 2,727
    • View Profile
    • Donate to Member
Re: Taming disk accesses
« Reply #10 on: February 06, 2008, 12:53 PM »
Actually, somebody explained somewhere that it was not possible....  :(

(BTW : welcome to DC, stinky1!)

stinky1

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: Taming disk accesses
« Reply #11 on: February 07, 2008, 09:09 AM »
Thanks Armando.  I think Vista is supposed to have this ability?

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Taming disk accesses
« Reply #12 on: February 07, 2008, 09:20 AM »
Vista added I/O priorities, yes... dunno how well it works, but at least the facility is there.
- carpe noctem