Tips and Tweaks Plugin to possibly improve performance of Unraid and VMs


Recommended Posts

Totally True. I'm just trying to deter those people that attempt to remote login from anywhere else that isn't supposed to be on my machine. Basically keep the script kiddies out of my machine or I should say "our machines" :D I like the layer method of protecting my system. One layer of protection over another. I lock my front door with two locks. The bottom lock and the dead bolt.  

Link to comment
  • 1 month later...

There have been reports of a NIC hang when NIC offload is enabled.  I ran into this issue myself.  For some reason a while back I re-enabled NIC offload and then began to get NIC hang call traces in the later 6.4rc releases.  I have two NICs bonded and used tlb (transmit load balance) .  When I switched to alb (active load balance) and disabled NIC offload, the NIC hangs stopped.

 

Just one more reason to keep the NIC offload disabled.

Link to comment
  • 1 month later...
10 minutes ago, johnnie.black said:

On a normal shutdown yes.

Thanks - thought so, but I thought I'd check just in case.  I've been playing with my ratios today, and at the moment I'm at 10%/40% for vm.dirty_background_ratio/vm.dirty_ratio as my thinking is that 10% of 64GB of RAM is a good amount of space which will cover the majority of my files and 40% will cover a large movie file.  My hope is that writing it to ram first will give the impression of faster writes, while the background job gets completed at a later time

 

Edit: going to drop both as just realised I don't want to sit around and wait for potentially 25GB to be written when I shutdown, or lose 25GB if I crash.

Edited by DZMM
Link to comment
3 minutes ago, DZMM said:

I've been playing with my ratios today, and at the moment I'm at 10%/40% for vm.dirty_background_ratio/vm.dirty_ratio as my thinking is that 10% of 64GB of RAM is a good amount of space which will cover the majority of my files and 40% will cover a large movie file. 

 

Those values should be OK but you need to test and probably don't go above that, at least I found that having a 50% or higher dirty ratio was great while the RAM lasted but slower than normal for larger transfers when the kernel flushed all data data to the disks while still writing the new data resulting in noticeable slower writes, also good to be using an UPS, the more dirty memory you have the more data you'll lose if there's a power cut during writes.

Link to comment
2 hours ago, DZMM said:

question re vm.dirty_ratio - if I set it high to say 40%, does unraid ensure all writes that are still in memory get written before it shuts down?

 

Thanks

 

2 hours ago, johnnie.black said:

 

Those values should be OK but you need to test and probably don't go above that, at least I found that having a 50% or higher dirty ratio was great while the RAM lasted but slower than normal for larger transfers when the kernel flushed all data data to the disks while still writing the new data resulting in noticeable slower writes, also good to be using an UPS, the more dirty memory you have the more data you'll lose if there's a power cut during writes.

 

Which is exactly the reason that many of us turned it off back in the days when MS first introduced this 'feature' in MS-DOS 6.22 in 1994.  Plus, crashes with Windows for Workgroups happened at least once a day if not oftener.  UPS were a very expensive luxury item for most of us for a problem that was a minor issue compared to the instability of MS-DOS software.  

 

I think one important factor to consider is that this memory is reserved at bootup and it is apparently contiguous.  This is not a problem for most uses of Linux as, if the OS requires a block of memory larger than is currently available, it just 'rolls' some idle process(es) out to its disk cache.  The problem with unRAID is that it does not have a dedicated disk cache to do this and it can go ballistic in its failure to be able to provide the requested memory!  That was the one of the reasons why the current recommendation in the GUI Help for these settings are quite small values.  

Edited by Frank1940
Link to comment
  • 2 months later...

Hi, I'm new to unRAID and I've managed to figure out all but one issue that my Fix Common Problems plugin has notified me of:

 

Quote

1. CPU will possibly not throttle down frequency at idle. Your CPU is running constantly at 100% and will not th rottle down when it's idle (to save heat / power). This is because there is currently no CPU Scaling Driver Installed. Seek assistance on the unRaid forums with this issue.



Another user has recommended that I install this plugin to resolve the issue, however, it hasn't seemed to help. I've tried setting the governor to "on demand" and "conservative" in the plugin, with no results.

 

I'm running a Ryzen CPU if that helps.

Link to comment
  • 2 months later...
  • 2 months later...

I have dual AMD Opteron™ 4386 @ 3.1 GHz cpus and the tips and tweaks shows the following. any ideas how to fix this?

 

CPU Frequency Scaling

Driver: * no driver *

Governor:

 

root@Server:/tmp# cpufreq-info -d
root@Server:/tmp# cpufreq-info -o
          minimum CPU frequency  -  maximum CPU frequency  -  governor
root@Server:/tmp# cpufreq-info -g
root@Server:/tmp# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to [email protected], please.
analyzing CPU 0:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 1:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 2:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 3:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 4:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 5:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 6:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 7:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 8:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 9:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 10:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 11:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 12:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 13:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 14:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.
analyzing CPU 15:
  no or unknown cpufreq driver is active on this CPU
  maximum transition latency: 4294.55 ms.

 

Edit: found the issue. i checked the BIOS and found the CPU was set to performance mode. i changed it to OS controlled and its working now

 

CPU Frequency Scaling

Driver: ACPI CPU Freq

Governor: Power Save

 

Edited by rcmpayne
Link to comment
  • 1 month later...

You corrected too many capitalizations :)  

 

Getting update information...
Installing update...
plugin: updating: tips.and.tweaks.plg



Warning: parse_ini_file(/etc/unRAID-version): failed to open stream: No such file or directory in Standard input code on line 4
*********************************************************

Open Files Requires Unraid version 6.4 or greater to run.

*********************************************************
plugin: run failed: /usr/bin/php retval: 1

Not to mention that the fail notice states Open files and not Tips & Tweaks

Edited by Squid
Link to comment
  • 2 months later...

Not a big deal, but when I click on help for ethernet nics, the help for ethernet nics and the next section comes up.

 

I cant get the help for the next section to come up on its own

 

"Don't change the Disk Cache settings until you read and understand this guide" has nothing to click to bring up help info.

 

image.thumb.png.1686a134f68a1e1b13f87e5c4848f83c.png

Link to comment
  • 2 months later...
3 hours ago, wdelarme said:

awesome thanks. On a side note do you think it will make any difference on a 1 Gb network?

I don't think the Rx and Tx ring buffers will be a limit on your throughput.  It kind of depends on the NIC though.

 

I've read where to large a setting on the buffers can actually be counter productive, but I am not an expert on NICs.

Link to comment
  • 2 months later...

Just a small suggestion. The "Enable Intel Turbo Boost?" affects AMD CPUs too e.g. my 2990WX will only turbo up i.e. Precision Boost with that flag = Yes.

 

So I guess maybe change that to "Enable Intel Turbo Boost / AMD Precision Boost?" may help some folks out there.

Link to comment

Just a suggestion to your plugin if you think it's worth including. It may help others with the random crash bug in Ryzen having the option in your plugin. Could you add an option to fix the Ryzen Gen 1 issue (Ryzen 3/5 1xxx series) that causes random lockups/freezes when the system goes into C6 state. The issue has plagued me for about 3 weeks now and i finally found a thread the other day about it.

 

The fix is to put "/usr/local/sbin/zenstates --c6-disable" into the go file.

But it seems the command just has to be run at any point after boot so i think a plugin should be able to do it.

 

Link to comment
On 6/6/2019 at 8:01 PM, ShivalWolf said:

Just a suggestion to your plugin if you think it's worth including. It may help others with the random crash bug in Ryzen having the option in your plugin. Could you add an option to fix the Ryzen Gen 1 issue (Ryzen 3/5 1xxx series) that causes random lockups/freezes when the system goes into C6 state. The issue has plagued me for about 3 weeks now and i finally found a thread the other day about it.

 

The fix is to put "/usr/local/sbin/zenstates --c6-disable" into the go file.

But it seems the command just has to be run at any point after boot so i think a plugin should be able to do it.

 

The best way to handle this is to create a User Script that will run this at Unraid startup.

  • Like 1
Link to comment
  • 1 month later...
  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.