Linux Speed, Responsiveness, and Latency Reduction with 'sysctl' Settings
article #892, updated 1889 days ago

On Manjaro, Debian, Ubuntu, and several others, these items are known help a lot in any application, including desktop, web server, or terminal server. The end of this post has two large compilations of these settings, one for wired (“non-lossy”) networking, one for wireless (“lossy”).

Do not use these on antiX or MX Linux, their developers have done much better right off the ISO. If you want more, recompile the Xanmod kernel for performance.

On the vast majority of Linux distributions, one can just add these changes to /etc/sysctl.conf, and then run sysctl -p to apply them without reboot. However, recent additions to standards have enabled us to place custom settings in our own configuration files, so that we don’t take /etc/sysctl.conf out of distro control.

On recent Debian and Ubuntu, we may best put them in /etc/sysctl.d/99-custom.conf (or replace the word “custom” to your liking), and then run sysctl --system to load both /etc/sysctl.conf and everything under /etc/sysctl.d. The 99 causes it to be run last, i.e., to override any others. But look at what already is there; sometimes there is already a last 99.

On some other recent distros, it’s /etc/sysctl.d/custom.conf (the word “custom” is still arbitrary), and then run systemctl restart systemd-sysctl.

You can check your results with sysctl -A.

The first group is for wired networking performance:

net.ipv4.tcp_window_scaling=1
net.ipv4.tcp_workaround_signed_windows=1
net.ipv4.tcp_sack=1
net.ipv4.tcp_fack=1
net.ipv4.tcp_low_latency=1
net.ipv4.ip_no_pmtu_disc=0
net.ipv4.tcp_mtu_probing=1
net.ipv4.tcp_frto=2
net.ipv4.tcp_frto_response=2
net.ipv4.tcp_congestion_control=illinois

A bit different first group for networking performance, is recommendable for anything involving wireless, i.e., “lossy” networks:

net.ipv4.tcp_window_scaling=1
net.ipv4.tcp_workaround_signed_windows=1
net.ipv4.tcp_sack=1
net.ipv4.tcp_fack=1
net.ipv4.tcp_low_latency=1
net.ipv4.ip_no_pmtu_disc=0
net.ipv4.tcp_mtu_probing=1
net.ipv4.tcp_frto=2
net.ipv4.tcp_frto_response=2
net.ipv4.tcp_congestion_control = hybla
net.ipv4.tcp_allowed_congestion_control = hybla cubic

And then some general networking performance items:

net.core.rmem_default = 31457280
net.core.rmem_max = 12582912
net.core.wmem_default = 31457280
net.core.wmem_max = 12582912
net.core.somaxconn = 4096
net.core.netdev_max_backlog = 65536
net.core.optmem_max = 25165824
net.ipv4.tcp_mem = 8388608 8388608 8388608
net.ipv4.udp_mem = 8388608 8388608 8388608
net.ipv4.tcp_rmem = 8192 87380 16777216
net.ipv4.udp_rmem = 8192 87380 16777216
net.ipv4.udp_rmem_min = 16384
net.ipv4.tcp_wmem = 8192 65536 16777216
net.ipv4.udp_wmem = 8192 65536 16777216
net.ipv4.udp_wmem_min = 16384
net.ipv4.tcp_max_tw_buckets = 1440000
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.route.flush=1

And some for network security enhancement:

net.ipv4.tcp_synack_retries = 2
net.ipv4.ip_local_port_range = 2000 65535
net.ipv4.tcp_rfc1337 = 1
net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_keepalive_time = 300
net.ipv4.tcp_keepalive_probes = 5
net.ipv4.tcp_keepalive_intvl = 15

And now a few to keep virtual memory usage under good control:

vm.swappiness=20
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2

And one to increase the maximum number of open and watched files, very helpful indeed for servers, file synchronization of all sorts, and many other functions:

fs.file-max = 2097152
fs.inotify.max_user_watches = 524288

The above was compiled from these two excellent articles:

http://www.networkworld.com/article/2227856/opensource-subnet/best-networking-tweaks-for-linux.html
https://easyengine.io/tutorials/linux/sysctl-conf/

and other sources. Here is the whole set for wired (non-lossy) networking:

net.ipv4.tcp_window_scaling=1
net.ipv4.tcp_workaround_signed_windows=1
net.ipv4.tcp_sack=1
net.ipv4.tcp_fack=1
net.ipv4.tcp_low_latency=1
net.ipv4.ip_no_pmtu_disc=0
net.ipv4.tcp_mtu_probing=1
net.ipv4.tcp_frto=2
net.ipv4.tcp_frto_response=2
net.ipv4.tcp_congestion_control=illinois
pre. net.core.rmem_default = 31457280
net.core.rmem_max = 12582912
net.core.wmem_default = 31457280
net.core.wmem_max = 12582912
net.core.somaxconn = 4096
net.core.netdev_max_backlog = 65536
net.core.optmem_max = 25165824
net.ipv4.tcp_mem = 8388608 8388608 8388608
net.ipv4.udp_mem = 8388608 8388608 8388608
net.ipv4.tcp_rmem = 8192 87380 16777216
net.ipv4.udp_rmem = 8192 87380 16777216
net.ipv4.udp_rmem_min = 16384
net.ipv4.tcp_wmem = 8192 65536 16777216
net.ipv4.udp_wmem = 8192 65536 16777216
net.ipv4.udp_wmem_min = 16384
net.ipv4.tcp_max_tw_buckets = 1440000
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.route.flush=1
vm.swappiness=20
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
fs.file-max = 2097152
fs.inotify.max_user_watches = 524288

and another full set for wireless / lossy networking:

net.ipv4.tcp_window_scaling=1
net.ipv4.tcp_workaround_signed_windows=1
net.ipv4.tcp_sack=1
net.ipv4.tcp_fack=1
net.ipv4.tcp_low_latency=1
net.ipv4.ip_no_pmtu_disc=0
net.ipv4.tcp_mtu_probing=1
net.ipv4.tcp_frto=2
net.ipv4.tcp_frto_response=2
net.ipv4.tcp_congestion_control = hybla
net.ipv4.tcp_allowed_congestion_control = hybla cubic
pre. net.core.rmem_default = 31457280
net.core.rmem_max = 12582912
net.core.wmem_default = 31457280
net.core.wmem_max = 12582912
net.core.somaxconn = 4096
net.core.netdev_max_backlog = 65536
net.core.optmem_max = 25165824
net.ipv4.tcp_mem = 8388608 8388608 8388608
net.ipv4.udp_mem = 8388608 8388608 8388608
net.ipv4.tcp_rmem = 8192 87380 16777216
net.ipv4.udp_rmem = 8192 87380 16777216
net.ipv4.udp_rmem_min = 16384
net.ipv4.tcp_wmem = 8192 65536 16777216
net.ipv4.udp_wmem = 8192 65536 16777216
net.ipv4.udp_wmem_min = 16384
net.ipv4.tcp_max_tw_buckets = 1440000
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1
net.ipv4.route.flush=1
vm.swappiness=20
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
fs.file-max = 2097152
fs.inotify.max_user_watches = 524288

Categories:      

==============

Sticky notes for the Windows desktop
article #750, updated 1892 days ago

I have just moved to this one:

https://www.notefly.org/

Bugs showing up in the others I’ve used, some of them only showing up at the end of the day when lots of notes exist.

Categories:      

==============

Reset StorageCraft ImageManager Password
article #1364, updated 1893 days ago

Here is a quick link to the utility:

http://downloads.storagecraft.com/SP_Files/ImageManager.ResetPassword.zip

Categories:      

==============

Single Download via Powershell
article #1363, updated 1894 days ago

To download a single file in binary mode, try translating this:

Invoke-WebRequest -Uri "http://fq.dn/sub/binary.exe" -Outfile "C:\folder\binary.exe"

Categories:      

==============

Linux Kernel Compilation Settings for Desktop Speed
article #1362, updated 1898 days ago

Here is what I have been using, for speed. It’s probably important to note that I’m running in 8G RAM. The last one might be set to “performance” if I had 12G or more.

Processor Family, set to Native Optimizations

Processor type and features -> Timer frequency, set to 1000

General setup -> Compiler optimization level, set to “size”, for small memory usage

Categories:      

==============

Check Your Email Blacklists
article #644, updated 1898 days ago

Here’s a great place to do so:

https://mxtoolbox.com/blacklists.aspx

And another:

https://www.ultratools.com/tools/spamDBLookup

And another:

http://www.dnsbl-check.info/

And a third, realtime:

http://www.uceprotect.net/en/rblcheck.php

Categories:      

==============

Latest Microsoft Group Policy Templates
article #1183, updated 1899 days ago

It is often helpful to update the Group Policy templates for a domain. The most current set can be found quite easily via a Google search:

https://www.google.com/search?q=Administrative+Templates+%28.admx%29+for+Windows+10&ie=utf-8&oe=utf-8&client=firefox-b-1-ab

They install as an MSI which does nothing but dump them into a folder here:

 C:\Program Files (x86)\Microsoft Group Policy

Once you have the above done, we have manual steps. The best way to approach this is probably in an administrative CMD.

First, look in here:

%WINDIR%\PolicyDefinitions

We will be wiping everything there. If there are many files with numbers at the end of their names, you probably have Microsoft Office templates as well as Windows templates, and you will have to replace them too. There are other templates which could be involved, so be warned and be ready.

For now, we are going to write as if you have just Microsoft default templates there. Wipe them all. Then replace them with all of the .ADMX files in the dump folder, plus just the language folder appropriate for you. The dump folder will have all of the language folders, you want just yours.

The second destination folder is:

\\<localdomain>\SYSVOL\<localdomain>\policies\PolicyDefinitions

where is the name of the Windows domain. If the folder does not exist, create it, this is creation of your Central Store. If the folder does exist, replace them as above.

Categories:      

==============

"Show Desktop" shortcut in Windows 10
article #1359, updated 1899 days ago

Create a shortcut to this:

explorer.exe shell:::{3080F90D-D7AD-11D9-BD98-0000947B0257}

and name it “Show Desktop”. When double-clicked, it will minimize all applications and show the desktop. This was standard in 7 and before. You can pin this icon to the Taskbar, to the Start menu, et cetera.

Categories:      

==============

Mitel Connect download
article #1358, updated 1901 days ago

Here is a working URL:

http://upgrade01.sky.shoretel.com/ClientInstall

Categories:      

==============

Windows 8 and 10 Application Icon (ex- Start Menu) Locations
article #608, updated 1901 days ago

The icons which were used in the “Start Menu” in 7 and before, are still present in Windows 8 through 10, though they are hidden. At the machine level, they are here:

%SYSTEMDRIVE%\Users\All Users\Microsoft\Windows\Start Menu\Programs

At the user level, they are here:

%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

Categories: