Bitcoin Forum
May 05, 2024, 01:18:54 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [PULL] Low I/O and CPU priority during process initialization  (Read 1409 times)
CAFxX (OP)
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile WWW
April 17, 2011, 09:59:24 AM
 #1

https://github.com/bitcoin/bitcoin/pull/161

If starting in GUI mode or with the -nicestart option run the disk-intensive initialization with low priority. As soon as initialization is over, switch back to normal priority. This should help especially if starting bitcoin at system startup.
Windows-only for now.
"The nature of Bitcoin is such that once version 0.1 was released, the core design was set in stone for the rest of its lifetime." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714915134
Hero Member
*
Offline Offline

Posts: 1714915134

View Profile Personal Message (Offline)

Ignore
1714915134
Reply with quote  #2

1714915134
Report to moderator
1714915134
Hero Member
*
Offline Offline

Posts: 1714915134

View Profile Personal Message (Offline)

Ignore
1714915134
Reply with quote  #2

1714915134
Report to moderator
CAFxX (OP)
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile WWW
April 18, 2011, 11:10:38 AM
 #2

This is a short quote from the MSDN:
Quote
The *_PRIORITY_CLASS values affect the CPU scheduling priority of the process. For processes that perform background work such as file I/O, network I/O, or data processing, it is not sufficient to adjust the CPU scheduling priority; even an idle CPU priority process can easily interfere with system responsiveness when it uses the disk and memory. Processes that perform background work should use the PROCESS_MODE_BACKGROUND_BEGIN and PROCESS_MODE_BACKGROUND_END values to adjust their resource scheduling priorities; processes that interact with the user should not use PROCESS_MODE_BACKGROUND_BEGIN.

If a process is in background processing mode, the new threads it creates will also be in background processing mode. When a thread is in background processing mode, it should minimize sharing resources such as critical sections, heaps, and handles with other threads in the process, otherwise priority inversions can occur. If there are threads executing at high priority, a thread in background processing mode may not be scheduled promptly, but it will never be starved.
CAFxX (OP)
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile WWW
April 18, 2011, 11:48:11 AM
 #3

For processes that perform background work such as file I/O, network I/O, or data processing, it is not sufficient to adjust the CPU scheduling priority; even an idle CPU priority process can easily interfere with system responsiveness when it uses the disk and memory. Processes that perform background work should use the PROCESS_MODE_BACKGROUND_BEGIN and PROCESS_MODE_BACKGROUND_END values to adjust their resource scheduling priorities
In the long run, probably, also all worker threads that are not GUI-related should be made to use this background processing mode. I have no idea how to do the same thing on other OSes.
CAFxX (OP)
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile WWW
April 19, 2011, 08:59:32 AM
 #4

For processes that perform background work such as file I/O, network I/O, or data processing, it is not sufficient to adjust the CPU scheduling priority; even an idle CPU priority process can easily interfere with system responsiveness when it uses the disk and memory. Processes that perform background work should use the PROCESS_MODE_BACKGROUND_BEGIN and PROCESS_MODE_BACKGROUND_END values to adjust their resource scheduling priorities
In the long run, probably, also all worker threads that are not GUI-related should be made to use this background processing mode. I have no idea how to do the same thing on other OSes.
I went ahead and implemented this in a second, separate pull request. As usual, Windows-only for now.
CAFxX (OP)
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile WWW
April 20, 2011, 02:12:54 PM
 #5

*bump*
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!