When mining, the
~/.ethash folder is quickly fielded. This is annoying as my home directory is on a SSD with no large empty space. Furthermore, mining is writing/reading a lot on the SSD, which is not convenient. Thus my wish to move this directory somewhere else.
I know the
geth command accept the
--datadir option to point to
.ethereum folder when this one is elsewhere than in home directory. But there is no such option for .ethash directory.
Is there any way to create this directory somewhere out of home and tell
geth its path ?
When mining, the
There are no options in
geth to set the location of
One workaround is to create the directory elsewhere and soft link it back to
Assuming that you want to move
# Create new ethash directory mkdir /mnt/disk1/ethash # Move old ethash directory out of the way mv ~/.ethash ~/.ethash_original_to_delete # Soft link the new ethash directory back to the original location ln -s /mnt/disk1/ethash ~/.ethash
And when your testing is completed:
The Ethash DAG is stored at ~/.ethash (Mac/Linux) or ~/AppData/Ethash (Windows) so that it can be reused by all clients. You can store this in a different location by using a symbolic link.
I know that this question is very old. I report the current options for ethash (v. 1.8.11-stable):
ETHASH OPTIONS --ethash.cachedir Directory to store the ethash verification caches (default = inside the datadir) --ethash.cachesinmem value Number of recent ethash caches to keep in memory (16MB each) (default: 2) --ethash.cachesondisk value Number of recent ethash caches to keep on disk (16MB each) (default: 3) --ethash.dagdir "$HOME/.ethash" Directory to store the ethash mining DAGs (default = inside home folder) --ethash.dagsinmem value Number of recent ethash mining DAGs to keep in memory (1+GB each) (default: 1) --ethash.dagsondisk value Number of recent ethash mining DAGs to keep on disk (1+GB each) (default: 2)
As you see to set the directory for ethash now you can start geth as follows:
geth --ethash.cachedir $MY_ETHASH_DIR/cache/ --ethash.dagdir $MY_ETHASH_DIR/dag/
Not currently AFAIK. Please open an issue on our tracker to get some input from the others who designed it as non configurable. Not sure what the decision was (guessing to be cross client conformant).
Until then however I think the solution to move it to a different place was to symlink
~/.ethash to somewhere else where you're more comfortable having it at.
There is a
DatasetDir field under
Eth.Ethash, in the output from
geth dumpconfig. It should be possible to configure the Ethash output using that.