Bitcoin Forum
May 07, 2024, 06:34:52 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Limit bitcoin to only use 2 CPUs under linux  (Read 1966 times)
Flow (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
February 12, 2011, 10:36:57 PM
 #1

I see this option in the GUI, but could not found the corresponding line in the command options nor the bitcoin.conf. I would like to run bitcoin on my server, which has no GUI available.

Flow
1715063692
Hero Member
*
Offline Offline

Posts: 1715063692

View Profile Personal Message (Offline)

Ignore
1715063692
Reply with quote  #2

1715063692
Report to moderator
"In a nutshell, the network works like a distributed timestamp server, stamping the first transaction to spend a coin. It takes advantage of the nature of information being easy to spread but hard to stifle." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715063692
Hero Member
*
Offline Offline

Posts: 1715063692

View Profile Personal Message (Offline)

Ignore
1715063692
Reply with quote  #2

1715063692
Report to moderator
1715063692
Hero Member
*
Offline Offline

Posts: 1715063692

View Profile Personal Message (Offline)

Ignore
1715063692
Reply with quote  #2

1715063692
Report to moderator
1715063692
Hero Member
*
Offline Offline

Posts: 1715063692

View Profile Personal Message (Offline)

Ignore
1715063692
Reply with quote  #2

1715063692
Report to moderator
grondilu
Legendary
*
Offline Offline

Activity: 1288
Merit: 1076


View Profile
February 12, 2011, 10:39:26 PM
 #2

I see this option in the GUI, but could not found the corresponding line in the command options nor the bitcoin.conf. I would like to run bitcoin on my server, which has no GUI available.

Flow

I think you can do that on a OS level.  For instance, running "htop" you can press 'a' to set CPU affinity.

Flow (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
February 12, 2011, 11:03:52 PM
 #3

Thanks. But I prefer a persistent option, because the binary will still spawn 4 miner threads, when I want only 2.
Just wondering that there is a option in the GUI, which is not represented anywhere else. :-(
mail2345
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
February 12, 2011, 11:38:03 PM
 #4

I suggest writing a shell script that starts bitcoind and sets affinity.
EDIT:
Or use an external miner, jgarzik's CPU miner has a thread setting.
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5194
Merit: 12972


View Profile
February 13, 2011, 12:09:44 AM
 #5

You can use the RPC command "setgenerate true threadNumber". Bitcoin will store the number of threads to run in your wallet and remember it across runs.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Flow (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
February 13, 2011, 10:33:45 AM
 #6

You can use the RPC command "setgenerate true threadNumber". Bitcoin will store the number of threads to run in your wallet and remember it across runs.
How do I issue the RPC from command line?

Edit: Found it. Just set the user name and password in bitcoind.conf and run bitcoind with the given RPC command. Thanks all!
theymos
Administrator
Legendary
*
Offline Offline

Activity: 5194
Merit: 12972


View Profile
February 13, 2011, 10:42:35 AM
 #7

How do I issue the RPC from command line?

Just "bitcoind setgenerate true threadNumber". Bitcoin acts as its own RPC client when it's given any parameters that don't start with a dash.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Pages: [1]
  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!