|
Post by Alfeu Marcatto on Jun 21, 2005 18:56:21 GMT -5
I want reduce priority of a zip process and I can do it, with good results, if I set the zip thread to Idle and the other simultaneous processes running only in memory, without HD access.
But if during a zip process I start a Corel Draw, for example, the load phase is very slow, much more than normal. Zip thread is in Idle priority but continue running (a little more slow than normal).
I use this command, in Delphi, to change the priority of thread: SetPriorityClass(GetCurrentProcess, IDLE_PRIORITY_CLASS); SetThreadPriority(GetCurrentThread, THREAD_PRIORITY_IDLE);
Alfeu
|
|
|
Post by Kevin on Jun 22, 2005 6:53:35 GMT -5
Alfeu, That's good advice, thanks very much for the excellent tip! Kevin
|
|
|
Post by Alfeu on Jun 23, 2005 13:47:55 GMT -5
But I did not solve yet the slow load of the program during the zip process.
I think which if I set the thread priority of zip to Idle or “lowest“ the load time of any other program should be the same with or without a zip running.
But it is not that happens. I checked the priorities of both programs: zip and Corel Draw. Corel was with 8 (normal) and Zip with 1 (idle), correctly. But Corel, which load with 2 or 3 seconds (without zip), delayed 1 minute.
Do you have any idea?
Thanks
Alfeu
|
|
|
Post by Alfeu on Jun 26, 2005 8:00:16 GMT -5
The solution (I received this information from a colleague):
Problem is not priority, but slow disk access. When several programs are trying to access small chunks of data from disk access becomes very slow for both programs because those chunks are located in different parts of disk. It is many times faster to read/write large blocks from same disk sector. When you change thread priority to slowest possible (as you did) it still isn't slow enough to make any delays in disk access. So the best solution is to cache data for reading/writing and read/write it in large blocks.
|
|