Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU mining performance - Dual X5650** - 466 H/s #136

Open
Quietstorm247 opened this issue Jun 2, 2017 · 29 comments
Open

CPU mining performance - Dual X5650** - 466 H/s #136

Quietstorm247 opened this issue Jun 2, 2017 · 29 comments

Comments

@Quietstorm247
Copy link

Hello team,

Do you know why I can't get this same performance with my server with the above Dual X5650 and 24MB RAM while using xmr-stak-cpu?

When I press the h key, I got:
Totals: 82.1 82.5 81.6 H/s
Highest: 84.9 H/s
is that normal?

below is my configuration:

/*

  • Thread configuration for each thread. Make sure it matches the number above.
  • low_power_mode - This mode will double the cache usage, and double the single thread performance. It will
  •              consume much less power (as less cores are working), but will max out at around 80-85% of 
    
  •              the maximum performance.
    
  • no_prefetch - Some sytems can gain up to extra 5% here, but sometimes it will have no difference or make
  •              things slower.
    
  • affine_to_cpu - This can be either false (no affinity), or the CPU core number. Note that on hyperthreading
  •              systems it is better to assign threads to physical cores. On Windows this usually means selecting 
    
  •              even or odd numbered cpu numbers. For Linux it will be usually the lower CPU numbers, so for a 4 
    
  •              physical core CPU you should select cpu numbers 0-3.
    
  • On the first run the miner will look at your system and suggest a basic configuration that will work,
  • you can try to tweak it from there to get the best performance.
  • A filled out configuration should look like this:
  • "cpu_threads_conf" :
  • [
  •  { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 0 },
    
  •  { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 1 },
    
  • ],
    */
    "cpu_threads_conf" :
    [ { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 0 },
    { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 1 },
    ],

/*

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

/*

  • use_slow_memory defines our behaviour with regards to large pages. There are three possible options here:
  • always - Don't even try to use large pages. Always use slow memory.
  • warn - We will try to use large pages, but fall back to slow memory if that fails.
  • no_mlck - This option is only relevant on Linux, where we can use large pages without locking memory.
  •       It will never use slow memory, but it won't attempt to mlock
    
  • never - If we fail to allocate large pages we will print an error and exit.
    */
    "use_slow_memory" : "warn",

/*

  • NiceHash mode
  • nicehash_nonce - Limit the noce to 3 bytes as required by nicehash. This cuts all the safety margins, and
  •              if a block isn't found within 30 minutes then you might run into nonce collisions. Number
    
  •              of threads in this mode is hard-limited to 32.
    

*/
"nicehash_nonce" : false,

/*

  • TLS Settings
  • If you need real security, make sure tls_secure_algo is enabled (otherwise MITM attack can downgrade encryption
  • to trivially breakable stuff like DES and MD5), and verify the server's fingerprint through a trusted channel.
  • use_tls - This option will make us connect using Transport Layer Security.
  • tls_secure_algo - Use only secure algorithms. This will make us quit with an error if we can't negotiate a secure algo.
  • tls_fingerprint - Server's SHA256 fingerprint. If this string is non-empty then we will check the server's cert against it.
    */
    "use_tls" : false,
    "tls_secure_algo" : true,
    "tls_fingerprint" : "",

/*

  • pool_address - Pool address should be in the form "pool.supportxmr.com:3333". Only stratum pools are supported.
  • wallet_address - Your wallet, or pool login.
  • pool_password - Can be empty in most cases or "x".
    */
    "pool_address" : "pool.supportxmr.com:3333",
    "wallet_address" : "Removed for security reason",
    "pool_password" : "Removed for security reason",

/*

  • Network timeouts.
  • Because of the way this client is written it doesn't need to constantly talk (keep-alive) to the server to make
  • sure it is there. We detect a buggy / overloaded server by the call timeout. The default values will be ok for
  • nearly all cases. If they aren't the pool has most likely overload issues. Low call timeout values are preferable -
  • long timeouts mean that we waste hashes on potentially stale jobs. Connection report will tell you how long the
  • server usually takes to process our calls.
  • call_timeout - How long should we wait for a response from the server before we assume it is dead and drop the connection.
  • retry_time - How long should we wait before another connection attempt.
  •            Both values are in seconds.
    
  • giveup_limit - Limit how many times we try to reconnect to the pool. Zero means no limit. Note that stak miners
  •            don't mine while the connection is lost, so your computer's power usage goes down to idle.
    

*/
"call_timeout" : 10,
"retry_time" : 10,
"giveup_limit" : 0,

/*

  • Output control.
  • Since most people are used to miners printing all the time, that's what we do by default too. This is suboptimal
  • really, since you cannot see errors under pages and pages of text and performance stats. Given that we have internal
  • performance monitors, there is very little reason to spew out pages of text instead of concise reports.
  • Press 'h' (hashrate), 'r' (results) or 'c' (connection) to print reports.
  • verbose_level - 0 - Don't print anything.
  •             1 - Print intro, connection event, disconnect event
    
  •             2 - All of level 1, and new job (block) event if the difficulty is different from the last job
    
  •             3 - All of level 1, and new job (block) event in all cases, result submission event.
    
  •             4 - All of level 3, and automatic hashrate report printing 
    

*/
"verbose_level" : 4,

/*

  • Automatic hashrate report
  • h_print_time - How often, in seconds, should we print a hashrate report if verbose_level is set to 4.
  •            This option has no effect if verbose_level is not 4.
    

*/
"h_print_time" : 60,

/*

  • Output file
  • output_file - This option will log all output to a file.

*/
"output_file" : "",

/*

  • Built-in web server
  • I like checking my hashrate on my phone. Don't you?
  • Keep in mind that you will need to set up port forwarding on your router if you want to access it from
  • outside of your home network. Ports lower than 1024 on Linux systems will require root.
  • httpd_port - Port we should listen on. Default, 0, will switch off the server.
    */
    "httpd_port" : 0,

/*

  • prefer_ipv4 - IPv6 preference. If the host is available on both IPv4 and IPv6 net, which one should be choose?
  •           This setting will only be needed in 2020's. No need to worry about it now.
    

*/
"prefer_ipv4" : true,

@Quietstorm247
Copy link
Author

PS. I am running windows server 2012

@fireice-uk
Copy link
Owner

fireice-uk commented Jun 2, 2017

You are only running two threads, you can easily run 12 threads on your setup. Autoconfig doesn't support multi-cpu systems yet.

@Quietstorm247
Copy link
Author

How I can use 12 threads? What configuration should I use?

@psychocrypt
Copy link
Collaborator

psychocrypt commented Jun 2, 2017

Please use the latest release and start your miner with the default config.txt. The auto sugestion will show you a config for 6 threads. Copy past this config to config.txt. Than double the core lines and multiply the afine values by two for the secound block of the six threads.

@Quietstorm247
Copy link
Author

Thanks for the feedback but I am very new on this.
What is the name of the containing the 6 threads config? can you please give me an example of the coding ?

@Quietstorm247
Copy link
Author

I have performed the below configuration and it was increased to 224.9 H/s

should I go above 12 threads ?

"cpu_threads_conf" :
[ { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 0 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 1 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 2 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 3 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 4 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 5 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 6 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 7 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 8 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 9 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 10 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 11 },
{ "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 12 },
],

@itdaniher
Copy link

Try it and find out!

@xmrig
Copy link

xmrig commented Jun 3, 2017

12 threads (6 for each cpu) is optimal, 11 or 10 may be fine too.
What operation system do you use? HT enabled? You can simple disable CPU affinity for test "affine_to_cpu" : false

@Quietstorm247
Copy link
Author

@itdaniher, I kept it { "low_power_mode" : false, "no_prefetch" : true, "affine_to_cpu" : 14 },

@xmrig, I am using win server 2012 and I think HT is enabled cause it told me that I have 2 times that I have 6 Cores and 12 Logical Processors as follows:

C:\Users\Quietstorm>wmic
wmic:root\cli>cpu Get NumberOfCores,NumberOfLogicalProcessors /Format:List

NumberOfCores=6
NumberOfLogicalProcessors=12

NumberOfCores=6
NumberOfLogicalProcessors=12

wmic:root\cli>exit

@ac0rnsoup
Copy link

ac0rnsoup commented Jun 13, 2017

@Quietstorm247

As @xmrig pointed out, you want to try 12 threads total, the config you posted has 13 total (0 through 12) and will definitely decrease performance on your second CPU.

On windows, you want to go every other CPU core to avoid hyperthreading. So affine to CPU cores 0,2,4,6,8,10,12,14,16,18,20,22

I also find that not maxing out my L3 cache works better sometimes, so compare that to 10 threads with CPU cores
0,2,4,6,8,12,14,16,18,20 and see which performs better.

If you were on linux, you'd want the CPU cores listed sequentially as you have them (minus the one extra thread at the end).

@Quietstorm247
Copy link
Author

@xmrig Thanks for the suggestion. I have tried both configurations the 0-20 and 0-22. However, my hashrate report is showing a lower performance (264h/s). Meanwhile I had 312 h/s with the previous 0,1,2...14.

Any suggestions to reach 466h/s ?

@Quietstorm247
Copy link
Author

@xmrig Please disregards the previous post. I rebooted the server and use configuration 0-22. As a result, the hashrate report is now 459.6 H/s.

Thanks for your support.

@psychocrypt
Copy link
Collaborator

@Quietstorm247 If you compile the current dev and hwloc is installed (see README.md) the miner will create a suggestion for your system and takes care if the native cores has even or odd id's.
This suggestion is in the most cases optimal and will give you the max hash rate.

@Quietstorm247
Copy link
Author

@psychocrypt How i can install hwloc. I am running windows server 2012. I have downloaded the windows 64 bit, which contain a bin folder but i do not know where to go from there

@Quietstorm247 Quietstorm247 reopened this Jun 15, 2017
@fireice-uk
Copy link
Owner

@Quietstorm247 The release will have it built in. I compile it from source on Windows.

@Quietstorm247
Copy link
Author

@fireice-uk My hashrate is now 473.5 H/s. Is it ok for my system or i can have a much higher hashrate?

@Quietstorm247
Copy link
Author

As agreed, please mark this issue as resolved. Hashrate will not go above 481.7H/s

@StanislavNikolov
Copy link

Some people are able to push 420h/s with one cpu, although with a different miner. I expect that 700+h/s with xmr-stak-cpu with 2 CPUs should be possible.

@Quietstorm247
Copy link
Author

Quietstorm247 commented Jul 20, 2017 via email

@StanislavNikolov
Copy link

Mine came a few hours ago and on arch linux with no gui runs at 480h/s.

@Quietstorm247
Copy link
Author

Hello Stan,

Mine is running now at 487.2 h/s. Thanks for follow up

@PanamaMike
Copy link

How much power are you guys drawing from the wall to get 466h/s? Do you have any suggestions for how to optimize/reduce the power consumption?

@StanislavNikolov
Copy link

StanislavNikolov commented Sep 22, 2017 via email

@PanamaMike
Copy link

That's pretty close to what I'm getting. 260 W. 6 sticks of ram and a hard drive. Was surprised to see the amount of power draw. What system are you running?

@StanislavNikolov
Copy link

System as in operating system? Arch linux

@lotrjoel
Copy link

Hi I'm using an IBM server with 2 X5650's, for some reason the miner says it doesn't have AES. I had no issue when I used a HP rack server with the same processors. Do you have any idea why that is?

@StanislavNikolov
Copy link

StanislavNikolov commented Dec 20, 2017 via email

@Rosofeno
Copy link

Hi, I'm using a server with 2 X5650's running xmr-stak on Ubuntu 17.10. I read on monerobenchmark that is possible to get about 700 h/s setting Arch Linux with no gui. What I have to do? Is it possible to install Arch Linux on Ubuntu? Thanks

@psychocrypt
Copy link
Collaborator

psychocrypt commented Jan 19, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants