I've got Bitcoin Core version v22.0.0 running on Windows 7, and it kicks off automatically when the computer starts using the command "C:\Program Files\Bitcoin\bitcoin-qt.exe" -min -chain=main.
The thing is, it really hogs all the CPU, making my PC super slow to respond at first.
Is there a way to launch it with some options that cut down the priority level?
You're probably know about it, but both Bitcoin Core 22.0 and Windows 7 are outdated. I would recommend you to both of them.
Looking at https://github.com/bitcoin/bitcoin/blob/v22.0/src/init.cpp, looks like only -par=1 only can be used to limit total core/thread used by Bitcoin Core 22.0. Besides that, try setting bitcoin-qt.exe to have lower CPU priority using this guide https://answers.microsoft.com/en-us/windows/forum/all/how-to-permanently-set-priority-processes-using/df82bd40-ce52-4b84-af34-4d93da17d079.
it either can put its instructions to cpu pipeline or it can't. You can't low-profile it from outside. with this ms stuff all you'll gain is frozen gui because its messages will not be processed.
So it's the PC that is freezing, not just Bitcoin Core's GUI?
Not to lower Bitcoin Core's priority but -par can minimize the CPU usage dedicated for script verifications, try to set a low number of CPU threads.
Its default sets Core to use all minus one of your CPU Cores.
Other CPU resource intensive task aren't affected by that command line arg though.
-edit-
default is -par=0 (auto) but it's what I've described which is CPU cores -1.
I don't have direct experience with this issue with Bitcoin Core, but:
* In my experience with various other CPU intensive software I use (more than average) max - 1 usually leaves Windows quite responsive.
* Also keep an eye on the disk usage, since in my experience, if CPU is already at max - 1 then the throttling happens because of the disk (PS. is the blockchain on SSD or HDD?)
You can also use the wmic command to set the priority of Core
https://superuser.com/questions/620724/changing-windows-process-priority-via-command-line
If you do it in the registry you have to remember set it back up if you want it faster.
Doing it with a command lets you just have a couple of different batch scripts sitting on your desktop to change it's resource use.
-Dave
Lowering the CPU priority isn't going to help you if one of the processes is disk-intensive, because disk reads and writes are uninterruptible by nature, which means the kernel cannot just make the other, high-priority process run in its place because disk access requires a CPU core as well.
Also, eventually, other programs will need to read data from the disk and if you have too many of those programs running, you run out of cores. And your system becomes unresponsive, your mouse freezes etc.
OP, how many cores does your system have?
Although it's better to just upgrade your disk setup.
Thanks for the advice.
I'll go down the route of a batch file and setting the priority to /low of /below normal
The PC is pretty powerful with 8 cores, 40Gb RAM and SSD throughout. The blockchain is on its own disk.
So, I have the Windows startup command
D:\temp\BTC.bat
which says:
@echo off
set
start "Bitcoin Core" /LOW "C:\Program Files\Bitcoin\bitcoin-qt.exe" -min -chain=main
It seems to be OK so far
/LOW does nothing. use -1 or so and you'll see a huge difference (from bad to worse)
there's dma thing on stage and it may be not so. Say you can burn cd on single core with no freezing of other stuff
If your system is already equipped with powerful hardware, instead of limiting CPU usage with -par, optimizing disk I/O performance might yield better results. For instance, ensuring the blockchain is stored on a high-speed SSD or using disk prioritization tools can significantly improve responsiveness
That's set by default, yet, he mentioned that the PC isn't responding while Bitcoin Core is using all of his Cores.
That depends on the specs and the PC's usage, -par is only for script verifications and if all set cores are fully utilized, the remaining core will be used by Bitcoin Core's other processes.
You mean -par=-1?
The suggestion to use a lower value is to keep a few CPU Cores free to solve his 100% CPU usage by Bitcoin Core.
It will reduce Bitcoin Core's sync performance, yes; but that's a solution if his whole PC is not responding due to the mentioned 100% CPU usage.
This should've been written beforehand.
Whole datadir and not just the blockchain?
If so, you can rule-out 100% system disk usage scenario, the OS shouldn't be affected in this case.
8-cores but still 100% used by Bitcoin Core, low-power low-frequency CPU perhaps?
Or it's actually Bitcoin Core that's not responding, not the PC? Because this is normal in Windows.
I haven't used Windows ever for Bitcoin Core, but with those specs a computer shouldn't freeze from verifying a few blocks. I can only imagine disk-IO being a limitation, but with that much RAM that shouldn't be a problem. If your OS can't properly multitask, changing priority isn't going to help.
I completely agree.
As the others said, such a setup should handle easily Bitcoin Core.
OP another ideas:
1. Double check that the data dir is indeed on the separate SSD and not %AppData%\Bitcoin
2. Consider adding the data dir to your antivirus exclusion