Is web3.eth.hashrate broken or my CPU is ?

PleuPleu Member Posts: 3
edited February 2016 in Mining
Hello all,

I was playing with eth when I found out that when typing > web3.eth.hashrate returns only ~240 000 when mining with my CPU with 4 threads (can't test on GPU), whereas on geth, > eth.hashrate returns ~1 400 000. Since, to my knowledge, eth is supposed to be slightly faster than geth, it kind of suprises me.

We can multiply the result of web3.eth.hashrate by the number of threads to get closer to geth's hashrate in the case that eth returns only one thread's hashrate, but we are still way off.
Why such a gap ?

Thanks :).

Answers

  • happytreefriendshappytreefriends Member Posts: 537 ✭✭✭
  • PleuPleu Member Posts: 3
    $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 15.10 Release: 15.10 Codename: wily $ uname -a Linux linux 4.2.0-30-generic #35-Ubuntu SMP Fri Feb 19 13:52:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux $ cat /proc/cpuinfo | grep "model name" model name : Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz model name : Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz model name : Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz model name : Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz

    Command used to start eth:
    $ eth -C -t 4 -m on console
    And geth:
    $ geth --mine console

    I think you should test your hashrate with both clients on a private network to see if you get the result as I have.
  • pburtonpburton Member Posts: 2
    I'm very new to this (yet quite familiar with Ubuntu). I found this thread as I tried to determine whether I was mining. It is unfortunate that there doesn't seem to be a clear indicator. Just while I am exploring Ethereum, I have geth running on a linux host with 25 cores assigned. There are no GPUs available and I know this configuration will never be profitable, but it will let me explore Ethereum.

    I am sync'd to the main line (took about 13 hours)
    > eth.syncing
    false
    >
    And my geth.log has a commit line for every import.

    I can understand having a 0 balance as I have only been mining for about 4 days. What I don't understand is my hash rate. Everyone talks about their hash rates, but all I see is
    > eth.hashrate
    0
    > web3.eth.hashrate
    0
    >

    CPUs are:
    [email protected]:~/home-lab/guides/lab3b$ cat /proc/cpuinfo | grep "model name"
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    model name : Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
    [email protected]:~/home-lab/guides/lab3b$

    Geth is performing somes tasks because top shows about 25 CPUs at 100%

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    53390 pburton 20 0 12.748g 5.628g 2.411g S 2436 4.5 107871:15 geth


    So why is my hashrate showing 0?
    Thanks
Sign In or Register to comment.