Guest User

XMR mining performance

a guest
Feb 26th, 2021
572
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.44 KB | None | 0 0
  1. Here I'm going to detail some information I've found for improving XMR mining performance, keep in mind this was done using the tool "XMRig" (anything relevant will be linked at the end). The steps here will be listed from easiest to hardest and you can feel free to go as far as you feel comfortable doing so, if you don't think you have the technical knowledge or skill it's perfectly fine not to follow one of the steps, I've been working with computers just about all my life and if you haven't you shouldn't feel put off by not being comfortable with getting in to the really technical stuff, it's perfectly fine to not be an autistic computer sperg like me.
  2.  
  3. [BUILDING YOUR RIG RIGHT (easy)]:
  4. If you're either building a rig specifically for mining or you're upgradding an existing machine for it, there's a few things to think about when starting:
  5. -Just because it's old doesn't mean it's worthless
  6. I managed to get a $500 R815 with 4 opteron 6276 CPUs to push 9KH/s by configuring the bios right and really going all
  7. out on tuning, you'd be surprised how good old hardware can be if used right.
  8. -Don't forsake your memory
  9. With hardware (mostly in regards to ryzen) having a fast memory clock speed can massivelly effect performance, my R3900x
  10. nearly doubled in hashrate when moving to 3200MHz memory from 1600MHz
  11. -Stay cool
  12. Mining makes your CPU hot, VERY hot, even more so if you're overclocking, I would recommend getting a good cooler if
  13. your CPU is going over 85*, either downvolt it or get a bigger heatsink
  14. -This penguin is your friend, he fights for your hashrates
  15. Not only is linux the best operating system for serious computer work, it's also great for hashrates, letting you custom
  16. tune your kernel for better memory performance can reduce security but increase your hashrate, it also lets you reduce
  17. initial hardware costs as it lowers the minimum amount of RAM required, best distros are (unironically) arch and gentoo,
  18. since Ubuntu is big gay (technical description, you can use it just fine but arch and gentoo are lighter weight, artix
  19. is also really good since it's just arch without systemd which reduces total memory use)
  20.  
  21. [PART QUALITY (easy)]:
  22. When choosing parts, this is the way you should judge them.
  23. CPU:
  24. -Cache size
  25. -Core count
  26. -Clock speed
  27. -Maximum memory speed
  28. These should be BALANCED, having a massive cache at 1GHz on one core is going to produce poor results
  29. MEMORY:
  30. -Channels (ex. dual channel, quad channel, etc...)
  31. -Speed
  32. The more DIMMS the better, small size multi-channel setups are great since it lets XMRig access more memory at once
  33. MOTHERBOARD:
  34. -Memory slots
  35. -Max memory speed
  36. Not much to say, unless you plan to overclock that should do
  37.  
  38. [COMPILING FROM SOURCE (medium)]:
  39. If you want to take this seriously, you should be building XMRig from source since it lets you remove the minimum donation amount, though if you do this you SHOULD donate to the XMRig team since they made a damn good tool that's basically printing you money, it also lets you build with options like '-mtune=znver2' if you're on ryzen to further optimize the application for your CPU.
  40. If you're going this far, you should REALLY be using linux, having done development on both windows and linux, I can safely say I'd rather eat salted razers than compile for windows.
  41.  
  42. [TUNING YOUR XMRIG (medium)]:
  43. One of the best ways to boost performance is making sure your config and system are set up right.
  44. Be sure to poke with the config settings in the CPU section of your XMRig config, if you don't yet have a config you can use the config wizzard (linked below, with CPU config docs) to make one.
  45. Another important thing to remember is enabling large memory pages (link below), you can generally do this by running as admin or sudo but for linux make sure you check the documentation on it since there's a couple other commands you may want to run.
  46.  
  47.  
  48.  
  49. [CONFIGURING THE SYSTEM BIOS (medium)]:
  50. In your system's BIOS, make sure you disable hardware prefetching.
  51. If you're running a more advanced system like a DELL PowerEdge server, make sure you only disable the following settings:
  52. -Hardware prefetch training on software prefetch
  53. -CPU Core Hardware Prefetcher
  54. -CPU Cache Stride Prefetcher
  55.  
  56. [CONFIGURING YOUR KERNEL (hard)]:
  57. If you're on linux, you can take the extra step of configuring your system for better memory performance.
  58. I wont go into extensive detail with this, but basically you'll want to disable any security or abstraction related options pretaining to memory (ONLY DO THIS IF THE MACHINE IS INTENDED TO BE A DEDICATED MINING RIG AND NOTHING ELSE).
  59. Also, make sure NUMA support is enabled if you're using a server grade CPU like an Opteron, EPYC, threadripper or Xeon.
  60. Once done, pass 'CFLAGS="-mtune=znver2" CXXFLAGS="-mtune=znver2"' to the make command if you're running a ryzen CPU, replace the number in 'znver2' with whatever generation of ryzen CPU you have.
  61.  
  62. [TUNING YOUR SYSTEM ON A CORE LEVEL FOR YOUR CPU (very autistically hard, also time consuming)]:
  63. If you want to be certain that everything on your mining rig is running as efficiently as possible, build an LFS (Linux From Scratch) install and make sure everything is compiled with '-mtune=(your CPU architecture)'. You definitely DON'T need to do this but if you REALLY want to get EVERY SINGLE INCH of power out of your system this is an option. Seriously though, this is NOT mandatory and you'll already hit really good rates without it, it doesn't even boost that much from what I've seen. It does however make certain that nothing you don't need is installed.
  64.  
  65. [OPSEC (normal)]:
  66. The only way in and out of your mining units should be local SSH, with no ports exposed to the internet whatsoever.
  67. This goes double if you're running a node server, which you generally should be if you're mining.
  68. SSH keys are very important for security too, use this over password login.
  69. NEVER, FOR ANY REASON, SET A ROOT PASSWORD. DO. NOT. DO. THIS.
  70. Another important note, if you save your seed phrase for your wallet anywhere that's not a sheet of paper, it should be encrypted. Save it, run it through GPG with a good password or key, write random bytes to the cleartext file, then delete it, if you just delete it, it will still be on the drive, just not shown in the filesystem.
  71.  
  72.  
  73. XMRig:
  74. https://github.com/xmrig/xmrig
  75. XMRig config wizzard:
  76. https://config.xmrig.com/
  77. XMRig CPU config documentation:
  78. https://github.com/xmrig/xmrig/blob/master/doc/CPU.md
  79. XMRig huge-pages:
  80. https://xmrig.com/docs/miner/hugepages
Add Comment
Please, Sign In to add comment