Hello,
This same behavior was bugging me too.. I would renice all the threads to 19, as it was interrupting system responsiveness since bitcoind was taking priority, but every so often the program would automatically reset the priority to something that would disrupt system responsiveness ..
so what I did was just edit util.h
and change the function that manipulates the priority:
inline void SetThreadPriority(int nPriority)
{
printf("No, were not changing any damn priority
");
}
and then recompiled bitcoind
now I just renice all the threads once, and they are stuck at what I set them to until program exit (NI column staying at 19):
1 [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%] Time: 03:59:40
2 [||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||100.0%] Uptime: 253 days(!), 01:12:27
Mem[||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||501/1255MB] Load: 4.01
Swp[|||||||||||||||||||||||||||||||||||||||||||||||||||||| 501/1004MB] Load average: 4.01 4.15 3.49
__ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
| | |__ __| |__ |__||__ |__| | | | | | | | | | | | | __| __| | |
Avg: |__|.|__|% sy: |__ . __|% ni: __||__|.|__|% hi: |__|.|__|% si: |__|.|__|% wa: |__|.|__|% Tasks: __| __| | total, | running
PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
4523 root 39 19 126M 46280 3424 S 0.0 3.6 0:00.66 `- bitcoind -gen -daemon
4534 root 39 19 126M 46280 3424 R 90.0 3.6 12:43.73 | `- bitcoind -gen -daemon
4533 root 39 19 126M 46280 3424 R 45.0 3.6 10:49.02 | `- bitcoind -gen -daemon
4532 root 39 19 126M 46280 3424 R 46.0 3.6 10:05.83 | `- bitcoind -gen -daemon
4531 root 39 19 126M 46280 3424 S 0.0 3.6 0:00.03 | `- bitcoind -gen -daemon
4530 root 39 19 126M 46280 3424 S 1.0 3.6 0:15.53 | `- bitcoind -gen -daemon
4529 root 39 19 126M 46280 3424 S 0.0 3.6 0:00.72 | `- bitcoind -gen -daemon
4527 root 39 19 126M 46280 3424 S 0.0 3.6 0:00.02 | `- bitcoind -gen -daemon
4526 root 39 19 126M 46280 3424 S 0.0 3.6 0:00.03 | `- bitcoind -gen -daemon
4525 root 39 19 126M 46280 3424 S 0.0 3.6 0:00.06 | `- bitcoind -gen -daemon
in my debug.log:
[root@raidserv] (~/.bitcoin)# grep "No," debug.log
No, were not changing any damn priority
No, were not changing any damn priority
No, were not changing any damn priority
No, were not changing any damn priority
...
So now I can leave bitcoind running all day long without me noticing much...