README.scrypt 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. If you wish to donate to the author of scrypt support, Con Kolivas, for his past
  2. work (he no longer maintains this), please send your donations to
  3. 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ
  4. ---
  5. Scrypt mining for GPU is completely different to sha256 used for bitcoin
  6. mining. It has very different requirements to bitcoin mining and is a
  7. lot more complicated to get working well. Note that it is a ram dependent
  8. workload, and requires you to have enough system ram as well as fast enough
  9. GPU ram. If you have less system ram than your GPU has, it may not be possible
  10. to mine at any reasonable rate.
  11. There are 5 main parameters to tuning scrypt, 2 of which you MUST set, and
  12. the others are optional for further fine tuning. When you start scrypt mining
  13. with the --scrypt option, BFGMiner will fail IN RANDOM WAYS. They are all due
  14. to parameters being outside what the GPU can cope with. Not giving BFGMiner a
  15. hint as to your GPU type, it will hardly ever perform well.
  16. NOTE that if it does not fail at startup, the presence of hardware errors (HW)
  17. are a sure sign that you have set the parameters too high.
  18. DRIVERS AND OPENCL SDK
  19. The choice of driver version for your GPU is critical, as some are known to
  20. break scrypt mining entirely while others give poor hashrates. As for the
  21. OpenCL SDK installed, for AMD it must be version 2.6 or later.
  22. Step 1 on Linux:
  23. export GPU_MAX_ALLOC_PERCENT=100
  24. If you do not do this, you may find it impossible to scrypt mine. You may find
  25. a value of 40 is enough and increasing this further has little effect.
  26. export GPU_USE_SYNC_OBJECTS=1
  27. may help CPU usage a little as well.
  28. On windows the same commands can be passed via a batch file if the following
  29. lines are in the .bat before starting BFGMiner:
  30. setx GPU_MAX_ALLOC_PERCENT 100
  31. setx GPU_USE_SYNC_OBJECTS 1
  32. --shaders XXX
  33. is a new option where you tell BFGMiner how many shaders your GPU has. This
  34. helps BFGMiner try to choose some meaningful baseline parameters. Use this table
  35. below to determine how many shaders your GPU has, and note that there are some
  36. variants of these cards, and Nvidia shaders are much much lower and virtually
  37. pointless trying to mine on.
  38. GPU Shaders
  39. 7750 512
  40. 7770 640
  41. 7850 1024
  42. 7870 1280
  43. 7950 1792
  44. 7970 2048
  45. 6850 960
  46. 6870 1120
  47. 6950 1408
  48. 6970 1536
  49. 6990 (6970x2)
  50. 6570 480
  51. 6670 480
  52. 6790 800
  53. 6450 160
  54. 5670 400
  55. 5750 720
  56. 5770 800
  57. 5830 1120
  58. 5850 1440
  59. 5870 1600
  60. 5970 (5870x2)
  61. These are only used as a rough guide for BFGMiner, and it is rare that this is
  62. all you will need to set.
  63. --intensity XX
  64. Just like in Bitcoin mining, scrypt mining takes an intensity, however the
  65. scale goes from 0 to 20 to mimic the "Aggression" used in mtrlt's reaper. The
  66. reason this is crucial is that too high an intensity can actually be
  67. disastrous with scrypt because it CAN run out of ram. Intensities over 13
  68. start writing over the same ram and it is highly dependent on the GPU, but they
  69. can start actually DECREASING your hashrate, or even worse, start producing
  70. garbage with HW errors skyrocketing. The low level detail is that intensity is
  71. only guaranteed up to the power of 2 that most closely matches the thread
  72. concurrency. i.e. a thread concurrency of 6144 has 8192 as the nearest power
  73. of two above it, thus as 2^13=8192, that is an intensity of 13.
  74. Optional parameters to tune:
  75. -g, --thread-concurrency, --lookup-gap
  76. -g:
  77. Once you have found the optimal shaders and intensity, you can start increasing
  78. the -g value till BFGMiner fails to start. Rarely will you be able to go over
  79. about -g 4 and each increase in -g only increases hashrate slightly.
  80. --thread-concurrency:
  81. This tunes the optimal size of work that scrypt can do. It is internally tuned
  82. by BFGMiner to be the highest reasonable multiple of shaders that it can
  83. allocate on your GPU. Ideally it should be a multiple of your shader count.
  84. vliw5 architecture (R5XXX) would be best at 5x shaders, while VLIW4 (R6xxx and
  85. R7xxx) are best at 4x. Setting thread concurrency overrides anything you put
  86. into --shaders.
  87. --lookup-gap
  88. This tunes a compromise between ram usage and performance. Performance peaks
  89. at a gap of 2, but increasing the gap can save you some GPU ram, but almost
  90. always at the cost of significant loss of hashrate. Setting lookup gap
  91. overrides the default of 2, but BFGMiner will use the --shaders value to choose
  92. a thread-concurrency if you haven't chosen one.
  93. Overclocking for scrypt mining:
  94. First of all, do not underclock your memory initially. Scrypt mining requires
  95. memory speed and on most, but not all, GPUs, lowering memory speed lowers
  96. mining performance.
  97. Second, absolute engine clock speeds do NOT correlate with hashrate. The ratio
  98. of engine clock speed to memory matters, so if you set your memory to the
  99. default value, and then start overclocking as you are running it, you should
  100. find a sweet spot where the hashrate peaks and then it might actually drop if
  101. you increase the engine clock speed further. Unless you wish to run with a
  102. dynamic intensity, do not go over 13 without testing it while it's running to
  103. see that it increases hashrate AND utility WITHOUT increasing your HW errors.
  104. Suggested values for 7970 for example:
  105. export GPU_MAX_ALLOC_PERCENT=100
  106. --thread-concurrency 8192 -g 4 --gpu-engine 1135 --gpu-memclock 1375