SCRYPT-README 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. While BTC donations are preferred, if you wish to donate to the author, Con
  2. Kolivas, in LTC, please submit your 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. If you have less system ram than your GPU has, it may not be possible
  14. to mine at any reasonable rate.
  15. There are 5 main parameters to tuning scrypt, all of which are optional for
  16. further fine tuning. When you start scrypt mining with the --scrypt option,
  17. cgminer will fail IN RANDOM WAYS. They are all due to parameters being outside
  18. what the GPU can cope with.
  19. NOTE that if it does not fail at startup, the presence of hardware errors (HW)
  20. are a sure sign that you have set the parameters too high.
  21. Step 1 on linux:
  22. export GPU_MAX_ALLOC_PERCENT=100
  23. If you do not do this, you may find it impossible to scrypt mine. You may find
  24. a value of 40 is enough and increasing this further has little effect.
  25. export GPU_USE_SYNC_OBJECTS=1
  26. may help CPU usage a little as well.
  27. --intensity XX (-I XX)
  28. Just like in bitcoin mining, scrypt mining takes an intensity, however the
  29. scale goes from 0 to 20 to mimic the "Aggression" used in mtrlt's reaper. The
  30. reason this is crucial is that too high an intensity can actually be
  31. disastrous with scrypt because it CAN run out of ram. High intensities
  32. start writing over the same ram and it is highly dependent on the GPU, but they
  33. can start actually DECREASING your hashrate, or even worse, start producing
  34. garbage with HW errors skyrocketing. Note that if you do NOT specify an
  35. intensity, cgminer uses dynamic mode which is designed to minimise the harm
  36. to a running desktop and performance WILL be poor. The lower limit to intensity
  37. with scrypt is usually 8 and cgminer will prevent it going too low.
  38. SUMMARY: Setting this for reasonable hashrates is mandatory.
  39. --shaders XXX
  40. is a new option where you tell cgminer how many shaders your GPU has. This
  41. helps cgminer try to choose some meaningful baseline parameters. Use this table
  42. below to determine how many shaders your GPU has, and note that there are some
  43. variants of these cards, and nvidia shaders are much much lower and virtually
  44. pointless trying to mine on. If this is not set, cgminer will query the
  45. device for how much memory it supports and will try to set a value based on
  46. that.
  47. SUMMARY: This will get you started but fine tuning for optimal performance is
  48. required.
  49. GPU Shaders
  50. 7750 512
  51. 7770 640
  52. 7850 1024
  53. 7870 1280
  54. 7950 1792
  55. 7970 2048
  56. 6850 960
  57. 6870 1120
  58. 6950 1408
  59. 6970 1536
  60. 6990 (6970x2)
  61. 6570 480
  62. 6670 480
  63. 6790 800
  64. 6450 160
  65. 5670 400
  66. 5750 720
  67. 5770 800
  68. 5830 1120
  69. 5850 1440
  70. 5870 1600
  71. 5970 (5870x2)
  72. These are only used as a rough guide for cgminer, and it is rare that this is
  73. all you will need to set.
  74. Optional parameters to tune:
  75. -g, --thread-concurrency, --lookup-gap
  76. --thread-concurrency:
  77. This tunes the optimal size of work that scrypt can do. It is internally tuned
  78. by cgminer to be the highest reasonable multiple of shaders that it can
  79. allocate on your GPU. Ideally it should be a multiple of your shader count.
  80. vliw5 architecture (R5XXX) would be best at 5x shaders, while VLIW4 (R6xxx and
  81. R7xxx) are best at 4x. Setting thread concurrency overrides anything you put
  82. into --shaders and is ultimately a BETTER way to tune performance.
  83. SUMMARY: Spend lots of time finding the highest value that your device likes
  84. and increases hashrate.
  85. -g:
  86. Once you have found the optimal shaders and intensity, you can start increasing
  87. the -g value till cgminer fails to start. This is really only of value if you
  88. want to run low intensities as you will be unable to run more than 1.
  89. SUMMARY: Don't touch this.
  90. --lookup-gap
  91. This tunes a compromise between ram usage and performance. Performance peaks
  92. at a gap of 2, but increasing the gap can save you some GPU ram, but almost
  93. always at the cost of significant loss of hashrate. Setting lookup gap
  94. overrides the default of 2, but cgminer will use the --shaders value to choose
  95. a thread-concurrency if you haven't chosen one.
  96. SUMMARY: Don't touch this.
  97. Related parameters:
  98. --worksize XX (-w XX)
  99. Has a minor effect, should be a multiple of 64 up to 256 maximum.
  100. SUMMARY: Worth playing with once everything else has been tried but will
  101. probably do nothing.
  102. --vectors XX (-v XX)
  103. Vectors are NOT used by the scrypt mining kernel.
  104. SUMMARY: Does nothing.
  105. Overclocking for scrypt mining:
  106. First of all, do not underclock your memory initially. Scrypt mining requires
  107. memory speed and on most, but not all, GPUs, lowering memory speed lowers
  108. mining performance.
  109. Second, absolute engine clock speeds do NOT correlate with hashrate. The ratio
  110. of engine clock speed to memory matters, so if you set your memory to the
  111. default value, and then start overclocking as you are running it, you should
  112. find a sweet spot where the hashrate peaks and then it might actually drop if
  113. you increase the engine clock speed further.
  114. Third, the combination of motherboard, CPU and system ram ALSO makes a
  115. difference, so values that work for a GPU on one system may not work for the
  116. same GPU on a different system. A decent amount of system ram is actually
  117. required for scrypt mining, and 4GB is suggested.
  118. Finally, the power consumption while mining at high engine clocks, very high
  119. memory clocks can be far in excess of what you might imagine.
  120. For example, a 7970 running with the following settings:
  121. --thread-concurrency 22392 --gpu-engine 1135 --gpu-memclock 1890
  122. was using 305W!
  123. ---
  124. While BTC donations are preferred, if you wish to donate to the author, Con
  125. Kolivas, in LTC, please submit your donations to:
  126. Lc8TWMiKM7gRUrG8VB8pPNP1Yvt1SGZnoH
  127. Otherwise, please donate in BTC as per the main README.