Advertisement
Guest User

Untitled

a guest
Dec 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1. /*
  2. * LARGE PAGE SUPPORT
  3. * Lare pages need a properly set up OS. It can be difficult if you are not used to systems administation,
  4. * but the performace results are worth the trouble - you will get around 20% boost. Slow memory mode is
  5. * meant as a backup, you won't get stellar results there. If you are running into trouble, especially
  6. * on Windows, please read the common issues in the README.
  7. *
  8. * By default we will try to allocate large pages. This means you need to "Run As Administrator" on Windows.
  9. * You need to edit your system's group policies to enable locking large pages. Here are the steps from MSDN
  10. *
  11. * 1. On the Start menu, click Run. In the Open box, type gpedit.msc.
  12. * 2. On the Local Group Policy Editor console, expand Computer Configuration, and then expand Windows Settings.
  13. * 3. Expand Security Settings, and then expand Local Policies.
  14. * 4. Select the User Rights Assignment folder.
  15. * 5. The policies will be displayed in the details pane.
  16. * 6. In the pane, double-click Lock pages in memory.
  17. * 7. In the Local Security Setting – Lock pages in memory dialog box, click Add User or Group.
  18. * 8. In the Select Users, Service Accounts, or Groups dialog box, add an account that you will run the miner on
  19. * 9. Reboot for change to take effect.
  20. *
  21. * Windows also tends to fragment memory a lot. If you are running on a system with 4-8GB of RAM you might need
  22. * to switch off all the auto-start applications and reboot to have a large enough chunk of contiguous memory.
  23. *
  24. * On Linux you will need to configure large page support "sudo sysctl -w vm.nr_hugepages=128" and increase your
  25. * ulimit -l. To do do this you need to add following lines to /etc/security/limits.conf - "* soft memlock 262144"
  26. * and "* hard memlock 262144". You can also do it Windows-style and simply run-as-root, but this is NOT
  27. * recommended for security reasons.
  28. *
  29. * Memory locking means that the kernel can't swap out the page to disk - something that is unlikey to happen on a
  30. * command line system that isn't starved of memory. I haven't observed any difference on a CLI Linux system between
  31. * locked and unlocked memory. If that is your setup see option "no_mlck".
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement