SCRYPT-README 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. If you wish to donate to the author, Con Kolivas, in LTC, please submit your
  2. donations to:
  3. Lc8TWMiKM7gRUrG8VB8pPNP1Yvt1SGZnoH
  4. Otherwise, please donate in BTC as per the main README.
  5. ---
  6. Scrypt mining, AKA litecoin mining, for GPU is completely different to sha256
  7. used for bitcoin mining. The algorithm was originally developed in a manner
  8. that it was anticipated would make it suitable for mining on CPU but NOT GPU.
  9. Thanks to some innovative work by Artforz and mtrlt, this was proven to be
  10. wrong. However, it has very different requirements to bitcoin mining and is a
  11. lot more complicated to get working well. Note that it is a ram dependent
  12. workload, and requires you to have enough system ram as well as fast enough
  13. GPU ram.
  14. There are 5 main parameters to tuning scrypt, 2 of which you MUST set, and
  15. the others are optional for further fine tuning. When you start scrypt mining
  16. with the --scrypt option, cgminer will fail IN RANDOM WAYS. They are all due
  17. to parameters being outside what the GPU can cope with. Not giving cgminer a
  18. hint as to your GPU type, it will hardly ever perform well.
  19. Step 1 on linux:
  20. export GPU_MAX_ALLOC_PERCENT=100
  21. If you do not do this, you may find it impossible to scrypt mine. You may find
  22. a value of 40 is enough and increasing this further has little effect.
  23. export GPU_USE_SYNC_OBJECTS=1
  24. may help CPU usage a little as well.
  25. --shaders XXX
  26. is a new option where you tell cgminer how many shaders your GPU has. This
  27. helps cgminer try to choose some meaningful baseline parameters. Use this table
  28. below to determine how many shaders your GPU has, and note that there are some
  29. variants of these cards, and nvidia shaders are much much lower and virtually
  30. pointless trying to mine on.
  31. GPU Shaders
  32. 7750 512
  33. 7770 640
  34. 7850 1024
  35. 7870 1280
  36. 7950 1792
  37. 7970 2048
  38. 6850 960
  39. 6870 1120
  40. 6950 1408
  41. 6970 1536
  42. 6990 (6970x2)
  43. 6570 480
  44. 6670 480
  45. 6790 800
  46. 6450 160
  47. 5670 400
  48. 5750 720
  49. 5770 800
  50. 5830 1120
  51. 5850 1440
  52. 5870 1600
  53. 5970 (5870x2)
  54. These are only used as a rough guide for cgminer, and it is rare that this is
  55. all you will need to set.
  56. --intensity XX
  57. Just like in bitcoin mining, scrypt mining takes an intensity, however the
  58. scale goes from 0 to 20 to mimic the "Aggression" used in mtrlt's reaper. The
  59. reason this is crucial is that too high an intensity can actually be
  60. disastrous with scrypt because it CAN run out of ram. Intensities over 13
  61. start writing over the same ram and it is highly dependent on the GPU, but they
  62. can start actually DECREASING your hashrate, or even worse, start producing
  63. garbage with rejects skyrocketing.
  64. Optional parameters to tune:
  65. -g, --thread-concurrency, --lookup-gap
  66. -g:
  67. Once you have found the optimal shaders and intensity, you can start increasing
  68. the -g value till cgminer fails to start. Rarely will you be able to go over
  69. about -g 4 and each increase in -g only increases hashrate slightly.
  70. --thread-concurrency:
  71. This tunes the optimal size of work that scrypt can do. It is internally tuned
  72. by cgminer to be the highest reasonable multiple of shaders that it can
  73. allocate on your GPU. Ideally it should be a multiple of your shader count.
  74. vliw5 architecture (R5XXX) would be best at 5x shaders, while VLIW4 (R6xxx and
  75. R7xxx) are best at 4x. Setting thread concurrency overrides anything you put
  76. into --shaders.
  77. --lookup-gap
  78. This tunes a compromise between ram usage and performance. Performance peaks
  79. at a gap of 2, but increasing the gap can save you some GPU ram, but almost
  80. always at the cost of significant loss of hashrate. Setting lookup gap
  81. overrides the default of 2, but cgminer will use the --shaders value to choose
  82. a thread-concurrency if you haven't chosen one.
  83. Overclocking for scrypt mining:
  84. First of all, do not underclock your memory initially. Scrypt mining requires
  85. memory speed and on most, but not all, GPUs, lowering memory speed lowers
  86. mining performance.
  87. Second, absolute engine clock speeds do NOT correlate with hashrate. The ratio
  88. of engine clock speed to memory matters, so if you set your memory to the
  89. default value, and then start overclocking as you are running it, you should
  90. find a sweet spot where the hashrate peaks and then it might actually drop if
  91. you increase the engine clock speed further. Unless you wish to run with a
  92. dynamic intensity, do not go over 13 without testing it while it's running to
  93. see that it increases hashrate AND utility WITHOUT increasing your rejects.
  94. Suggested values for 7970 for example:
  95. export GPU_MAX_ALLOC_PERCENT=100
  96. --shaders 2048 -g 5 --gpu-engine 1135 --gpu-memclock 1375
  97. ---
  98. If you wish to donate to the author, Con Kolivas, in LTC, please submit your
  99. donations to:
  100. Lc8TWMiKM7gRUrG8VB8pPNP1Yvt1SGZnoH
  101. Otherwise, please donate in BTC as per the main README.