<p>I'm not sure if those questions were asked this way before but ...:</p>

<p><strong>Is it possible to allocate CPU resources/hash power to an instance of bitcoind run on regtest?If yes, how?</strong><br/>
Assuming I'm going to run 100 nodes on regtest, how can I run one node with 20% of total hashing power?</p>

<p><strong>Is CPU allocation hardcoded? If yes, where in the code?</strong></p>

<p><strong>If not possible by Bitcoin source code, is there a way to allocate CPU to a daemon, in general?</strong></p>

<p>By the way: I'm using Bitcoin Core 0.10.0.</p>

CC BY-SA 3.0
2015-06-18T15:06:16.027Z
Regtest doesn't really have hashpower - each node mints a block only when you tell it to. You could replicate the same thing by having a cronjob that triggers the creation of a block every so ofter.
Nick ODell
CC BY-SA 3.0
2015-06-18T15:13:05.800Z
@NickODell: Ok i see..or in case of selfish mining simulation and for mimicking hashpower distribution I could use a pool of 20 selfish miners out of 100 nodes for 20%, right?
Aliakbar Ahmadi
CC BY-SA 3.0
2015-06-18T15:32:19.980Z
@AliakbarAhmadi you can allocate CPU to a particular process if you're using linux/OS X with setting the priority of the process, called [niceness](http://unix.stackexchange.com/questions/127312/what-does-a-niceness-value-of-mean).
morsecoder
<bitcoind><miner-configuration><cpu><regtest>
How to allocate hash power to an instance of bitcoind?
Aliakbar Ahmadi
# How to allocate hash power to an instance of bitcoind?

(Asked by: username_0 on 2015-06-18)

I'm not sure if those questions were asked this way before but ...:

**Is it possible to allocate CPU resources/hash power to an instance of bitcoind run on regtest?If yes, how?**  
Assuming I'm going to run 100 nodes on regtest, how can I run one node with 20% of total hashing power?

**Is CPU allocation hardcoded? If yes, where in the code?**

**If not possible by Bitcoin source code, is there a way to allocate CPU to a daemon, in general?**

By the way: I'm using Bitcoin Core 0.10.0.

**Tags:** bitcoind, miner-configuration, cpu, regtest

> **Comments:**
> **username_1**: Regtest doesn't really have hashpower - each node mints a block only when you tell it to. You could replicate the same thing by having a cronjob that triggers the creation of a block every so ofter.  
> **username_0**: @NickODell: Ok i see..or in case of selfish mining simulation and for mimicking hashpower distribution I could use a pool of 20 selfish miners out of 100 nodes for 20%, right?  
> **username_2**: @AliakbarAhmadi you can allocate CPU to a particular process if you're using linux/OS X with setting the priority of the process, called [niceness](http://unix.stackexchange.com/questions/127312/what-does-a-niceness-value-of-mean).  

---

## 0 answers

