Bitcoin Forum
March 29, 2024, 11:42:47 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Add a "low priority" setting for Windoze?  (Read 2757 times)
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1072


Ian Knowles - CIYAM Lead Developer


View Profile WWW
January 21, 2013, 03:30:37 AM
Last edit: January 21, 2013, 06:07:52 AM by CIYAM Open
 #1

Running bitcoin-qt on a not so powerful laptop running XP can be a pain as it consumes basically all CPU every time it validates a new block (so every 10 minutes or so my computer *freezes* for generally around 5 seconds which feels like a long time when you're trying to code).

Of course I know how to lower the priority of the bitcoin-qt process (and do this for now) but I think this makes for a pretty bad new user experience (especially if you are catching up blocks) and I would guess that many users may not even know how to adjust the process priority.

So maybe it would be a good idea to have a setting to "Run as low priority"?

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
The trust scores you see are subjective; they will change depending on who you have in your trust list.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1711755767
Hero Member
*
Offline Offline

Posts: 1711755767

View Profile Personal Message (Offline)

Ignore
1711755767
Reply with quote  #2

1711755767
Report to moderator
1711755767
Hero Member
*
Offline Offline

Posts: 1711755767

View Profile Personal Message (Offline)

Ignore
1711755767
Reply with quote  #2

1711755767
Report to moderator
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
January 21, 2013, 04:09:15 AM
 #2

Code:
#ifndef WIN32
#include <Windows.h>
#endif
[...]
SetPriorityClass(GetCurrentProcess(), BELOW_NORMAL_PRIORITY_CLASS);

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1072


Ian Knowles - CIYAM Lead Developer


View Profile WWW
January 21, 2013, 04:55:41 AM
 #3

Sure and I have coded SetPriorityClass before - but I was suggesting something that might be more usable for Gavin's Grandma than an API call - let's say a check box perhaps? Smiley

Hmm... just realised I posted this in the wrong sub-forum (should have been posted in Development & Technical Discussion) - any mod want to move this for me?

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
dree12
Legendary
*
Offline Offline

Activity: 1246
Merit: 1076



View Profile
January 21, 2013, 05:27:57 AM
 #4

Any mod want to move this for me?
You can do so yourself.
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1072


Ian Knowles - CIYAM Lead Developer


View Profile WWW
January 21, 2013, 05:48:12 AM
 #5

You can do so yourself.

Oh - how?

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
2112
Legendary
*
Offline Offline

Activity: 2128
Merit: 1060



View Profile
January 21, 2013, 05:56:26 AM
 #6

Oh - how?
start /b /belownormal c:\program files\bitcoin\bitcoin-qt.exe

from the command line; or you can make a shortcut:

c:\windows\system32\cmd.exe /c start /b /belownormal c:\program files\bitcoin\bitcoin-qt.exe

Please comment, critique, criticize or ridicule BIP 2112: https://bitcointalk.org/index.php?topic=54382.0
Long-term mining prognosis: https://bitcointalk.org/index.php?topic=91101.0
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1072


Ian Knowles - CIYAM Lead Developer


View Profile WWW
January 21, 2013, 06:00:13 AM
 #7

I *know* how to do these things (changing the priority either from a shortcut or from the Task Manager or in code, etc.).

I posted in the wrong sub-forum and I thought that I was being told I can *move* my topic so that is what I want to know "how to do".

Can someone please explain "how do I move this topic"?

(actually maybe I'll just delete it as it looks as though it will take me more time to explain what the purpose of this topic is than I think I can be bothered with)

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
2112
Legendary
*
Offline Offline

Activity: 2128
Merit: 1060



View Profile
January 21, 2013, 06:06:36 AM
 #8

Can someone please explain "how do I move this topic"?

(actually maybe I'll just delete it as it looks as though it will take me more time to explain what the purpose of this topic is than I think I can be bothered with)

I'm sorry, I misunderstood your request.

The "move topic" is somewhere on the bottom of the page on the left, next to the "lock topic".

Please comment, critique, criticize or ridicule BIP 2112: https://bitcointalk.org/index.php?topic=54382.0
Long-term mining prognosis: https://bitcointalk.org/index.php?topic=91101.0
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1072


Ian Knowles - CIYAM Lead Developer


View Profile WWW
January 21, 2013, 06:08:48 AM
 #9

IIRC the "move thread" is somewhere on the bottom of the page on the left.

Thanks!

I had actually never noticed that link was there before (wasn't trying to be lazy).

Finally moved to where it should have been originally posted (must be a bit tired today).

Smiley

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1170


View Profile WWW
January 21, 2013, 10:36:52 PM
 #10

I'm quite sure your computer freezing up is not caused by the CPU needed for verifying signatures, but by the database I/O blocking your OS and other applications from accessing your hard disk. Scheduling the task at low priority will not help in that case.

The next release (0.8 ) should decrease I/O requirements a lot. If you're interested, feel free to try the test builds

BTW: I'm not saying that a checkbox to lower CPU priority (or even a default) is a bad idea - I just don't think it will help preventing freezes.

I do Bitcoin stuff.
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1072


Ian Knowles - CIYAM Lead Developer


View Profile WWW
January 22, 2013, 12:24:06 AM
 #11

BTW: I'm not saying that a checkbox to lower CPU priority (or even a default) is a bad idea - I just don't think it will help preventing freezes.

When I switch the process to low priority I get *no* freezes at all so yes I *do* very much think that it is CPU.

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
Diapolo
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500



View Profile WWW
January 22, 2013, 01:02:22 PM
 #12

Can you plese stop using that "Windoze" slang Wink, thanks.

Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
DarkHyudrA
Legendary
*
Offline Offline

Activity: 1386
Merit: 1000


English <-> Portuguese translations


View Profile
January 22, 2013, 01:31:18 PM
 #13

Can you plese stop using that "Windoze" slang Wink, thanks.

Dia
What a helpful post .-.

OP: Unless that in the coming years there will still exists slow laptops or even those crap netbooks, I don't believe that this is necessary.

English <-> Brazilian Portuguese translations
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1063


Gerald Davis


View Profile
January 22, 2013, 01:42:13 PM
 #14

Unless that in the coming years there will still exists slow laptops or even those crap netbooks, I don't believe that this is necessary.

Um I would say that is an absolute GUARANTEE.  Either underpowered hardware sold to meet price points accepted by the general public or otherwise decent hardware slowed to a crawl by software bloat.  Ever seen the amount of services and background processed launched by third parties in the average user's (think your mom not anonymous hacker) computer after say 3-4 years.
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1072


Ian Knowles - CIYAM Lead Developer


View Profile WWW
January 22, 2013, 01:59:30 PM
 #15

Can you plese stop using that "Windoze" slang Wink, thanks.

Oh sorry - didn't mean to offend - it's just that I'm not going to put a TM every time a type a bloody standard English word just because some American company things it has the right to *own* common English words and sue people who don't do this.

So let me know what I should call it (in a way the M$ is happy for me to with but with no TM or the like)?

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
Diapolo
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500



View Profile WWW
January 22, 2013, 02:37:15 PM
 #16

Can you plese stop using that "Windoze" slang Wink, thanks.

Oh sorry - didn't mean to offend - it's just that I'm not going to put a TM every time a type a bloody standard English word just because some American company things it has the right to *own* common English words and sue people who don't do this.

So let me know what I should call it (in a way the M$ is happy for me to with but with no TM or the like)?


Just use Windows Cheesy, I call Linux Linux and Mac Mac, so that should be rather straight forward ^^.

Thanks Smiley,
Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
Diapolo
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500



View Profile WWW
January 22, 2013, 02:40:04 PM
 #17

I'm quite sure your computer freezing up is not caused by the CPU needed for verifying signatures, but by the database I/O blocking your OS and other applications from accessing your hard disk. Scheduling the task at low priority will not help in that case.

The next release (0.8 ) should decrease I/O requirements a lot. If you're interested, feel free to try the test builds

BTW: I'm not saying that a checkbox to lower CPU priority (or even a default) is a bad idea - I just don't think it will help preventing freezes.

After reading this thread I took a look at the same idea, to use some lower than normal priority. Perhaps I'll create a pull for this.

Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
CIYAM (OP)
Legendary
*
Offline Offline

Activity: 1890
Merit: 1072


Ian Knowles - CIYAM Lead Developer


View Profile WWW
January 22, 2013, 02:45:58 PM
 #18

BTW: I'm not saying that a checkbox to lower CPU priority (or even a default) is a bad idea - I just don't think it will help preventing freezes.

As I already stated I have tested this on my laptop many times I am certain that it must be CPU and not I/O (it does not *freeze* when the task has been set to low priority).

After reading this thread I took a look at the same idea, to use some lower than normal priority. Perhaps I'll create a pull for this.

That would be great and I'll happily use that on my old and dirty windows. Cheesy

With CIYAM anyone can create 100% generated C++ web applications in literally minutes.

GPG Public Key | 1ciyam3htJit1feGa26p2wQ4aw6KFTejU
Diapolo
Hero Member
*****
Offline Offline

Activity: 769
Merit: 500



View Profile WWW
January 22, 2013, 05:24:56 PM
 #19

You are free to take a look at my (untested and yet to be commented) pull-request.
It's perhaps just a starting point or could even be considered useless by other core devs, well see Smiley.

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

Dia

Liked my former work for Bitcoin Core? Drop me a donation via:
1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x
bitcoin:1PwnvixzVAKnAqp8LCV8iuv7ohzX2pbn5x?label=Diapolo
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1170


View Profile WWW
January 22, 2013, 07:45:00 PM
 #20

BTW: I'm not saying that a checkbox to lower CPU priority (or even a default) is a bad idea - I just don't think it will help preventing freezes.

As I already stated I have tested this on my laptop many times I am certain that it must be CPU and not I/O (it does not *freeze* when the task has been set to low priority).

Interesting - thanks for reporting, in that case.

I do Bitcoin stuff.
Pages: [1] 2 »  All
  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!