Sharing/shielding generated DAG between 2 or more processes when mining on multiple GPUs

0xff0xff Member Posts: 22
A few theoretical questions:

When running 2 ethminers as two separate processes on same system each with different value for option --opencl-device do they share the same DAG?
Say, when a new epoch triggers regeneration of DAG - will these two processes share the same DAG or each will start working on its own version?
Can they create conflicts?
If conflicts are a possibility - is it possible specify folder for DAG generation?

I have not experienced any problem by running two processes, but would like to understand if this is a potential issue.

Comments

  • eupraxiceupraxic Member Posts: 16
    On linux, the DAG is written to $(HOME)/.ethash/full-R{REVISION}-{SEEDHASH} so if both ethminers are being run by the same user, they will share the DAG.

    see https://github.com/ethereum/wiki/wiki/Ethash-DAG

    I have up to six ethminers sharing the DAG on the same server. I haven't seen any problems when they are only reading the DAG. However, if the ethminers discover they need to generate a new DAG, all six attempt to create the same file. This generally results in a segfault or "bus error" in my configuration.

    Some additional flexibility in locating the DAG would be welcome.
  • 0xff0xff Member Posts: 22
    @eupraxic
    Ok, thanks! So this actually does cause issues. I had not witnessed it yet, but was afraid that it will be the case.

    One solution to this then would be running ethminer from 2 (in your case 6 !!!) different users.

    And let us hope some cpp-ethereum developer will take care of this.
  • eupraxiceupraxic Member Posts: 16
    Running each ethminer as a different user would definitely avoid the DAG generation problem. My systems are disk-space-challenged, so having six copies of a 1GB file is problematic.

    Another approach might be to specify the new --no-precompute flag on all but one of the ethminers. It seems like it should work, but I've had so many problems with epoch transitions that I'm now just manually pre-generating each upcoming DAG (e.g. ethminer -D 450000).
Sign In or Register to comment.