Bitcoin Forum
December 09, 2016, 03:44:51 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: [PULL] Low I/O and CPU priority during process initialization  (Read 1180 times)
CAFxX
Jr. Member
*
Offline Offline

Activity: 30


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.

1Pes7NpYkvYojYutZgJJ2NpChRxhmburfo
1481298291
Hero Member
*
Offline Offline

Posts: 1481298291

View Profile Personal Message (Offline)

Ignore
1481298291
Reply with quote  #2

1481298291
Report to moderator
1481298291
Hero Member
*
Offline Offline

Posts: 1481298291

View Profile Personal Message (Offline)

Ignore
1481298291
Reply with quote  #2

1481298291
Report to moderator
1481298291
Hero Member
*
Offline Offline

Posts: 1481298291

View Profile Personal Message (Offline)

Ignore
1481298291
Reply with quote  #2

1481298291
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
CAFxX
Jr. Member
*
Offline Offline

Activity: 30


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.

1Pes7NpYkvYojYutZgJJ2NpChRxhmburfo
CAFxX
Jr. Member
*
Offline Offline

Activity: 30


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.

1Pes7NpYkvYojYutZgJJ2NpChRxhmburfo
CAFxX
Jr. Member
*
Offline Offline

Activity: 30


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.

1Pes7NpYkvYojYutZgJJ2NpChRxhmburfo
CAFxX
Jr. Member
*
Offline Offline

Activity: 30


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

*bump*

1Pes7NpYkvYojYutZgJJ2NpChRxhmburfo
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!