>> (p.1)
    Author Topic: bitcoind - possibly process priority bug?  (Read 12071 times)
    asdfman (OP)
    Newbie
    *
    Offline Offline

    Activity: 38
    Merit: 0


    View Profile
    July 12, 2010, 08:20:34 AM
     #1

    This is kind of a continuation of this thread : http://bt.irlbtc.com/view/72.0

    I believe there might be a misunderstanding regarding the code for changing the process priorities... basically in short, I believe the intention is to set the processes to lowest priority (meaning most non intrusive, least priority in cpu scheduling) when the thread generating coins as it is very CPU intensive, and if not set to low priority, will noticeably decrease system responsiveness..

    in main.cpp, there are multiple points in which the priority is changed to "lowest":

    Code:
       while (fGenerateBitcoins)
        {
            SetThreadPriority(THREAD_PRIORITY_LOWEST);

    in util.h THREAD_PRIORITY_LOWEST is set to PRIO_MIN:

    Code:
    #define THREAD_PRIORITY_LOWEST          PRIO_MIN

    however, PRIO_MIN == the "minimum" in raw numeric terms (as in -20 < 20), but this actually means the highest priority in terms of how the OS interprets the number for the purpose of CPU scheduling

    in the kernel sources resource.h:

    Code:
    #define PRIO_MIN        (-20)
    #define PRIO_MAX        20

    Quote
    "A niceness of −20 is the highest priority and 19 or 20 is the lowest priority."
    - http://en.wikipedia.org/wiki/Nice_(Unix)

    I believe that THREAD_PRIORITY_LOWEST should be set to PRIO_MAX, otherwise the bitcoind starts disrupting system usabilty during coin generation..


    Thanks
    asdfman

Page 1
Viewing Page: 1