Blocklist-Update.sh is a script that I wrote to manage blocklists from bluetack etc to be used in conjunction with Transmission torrent downloader in Linux/MacOS. The script can be taylored to work with Qbittorrent as well, but the placement of the blocklists means you'd have to redirect the blocklist to go somewhere locally manageable as Transmission uses its own blocklist directory in .config. I believe there are about 10 lists there now. It works well for my needs. It can be ran weekly using crontab in standard user profile. To download: blocklist-update.sh To download the others: Github
Ever wonder what’s going on under the hood of your current
operating system? Ever wonder if your system’s task manager is
reading the information correctly; would you like a second opinion?
Are you aware of what “zombie” processes are? Today’s modern
Linux or Unix operating systems handle memory fairly well. They do
this by caching the RAM used by recently opened applications so that
when they are opened again, there will be less load time and latency.
Memory runs at a set speed, but in the case of modern systems, it’s
the fastest bit of hardware in your system.
Within Linux, everything you do has a consequence, but don’t let
that scare you, Linux knows when RAM is being used and when it is
not. When RAM is no longer being accessed, small amounts get reclaimed
by the system. Usually this works without issue, but seeing as
loading applications from the hard drive can be slow, this procedure
takes time. Linux likes to store much of the existing apps in RAM for
as long as it feels is needed to ensure that it doesn’t put the
same amount of strain on the drive again.
The problem, however, is that many of the inactive bits get thrown
into a separate place on the drive when new apps need the same amount
of memory that is being held. We call this problematic feature
“swap”. Swap occurs generally when a certain threshold of RAM is
being used. This usually only takes the current inactive files in RAM
and moves them to a free portion of the hard drive that was previously
set up during installation. When it needs the file(s) again, it will
already know where they are and will fetch them back into memory. I
say problematic because of the way it writes data to precious SSDs as
well.
Memory is handled at the kernel level and so it is important to take
into account the current situations with Meltdown and Spectre as some
patches for these are still going on. RAM is usually inexpensive
these days and so it’s recommended that everyone at least have 8 GB
memory as a bare minimum, however, some of us only have access to 6
right now. To check how much RAM you have available you need to run a
couple of commands in the terminal. I will leave a screenshot to show
you just what I mean, but the first command is really simple, just
type free -h.
Free will show
you up to about 6 columns displaying total, used, free, shared,
buffered, available, the column you want is total to see how much
your system recognizes.
Most motherboards have a set limit
to how much memory they can accept. It is possible to work around
this issue by updating the bios, but not everyone has
the expertise required to pull off such a risky procedure. To dissect
the RAM usage even further, you will need to type cat /proc/meminfo.
This will give you a
detailed list of what is reclaimable, what is not, what is dirty,
cached, etc. Sometimes the system has a bad habit of swapping when it
doesn’t absolutely have to, but this can be somewhat modified. To
counteract the system’s longing to swap inactive pages to the disk,
you should type the following in the terminal sudo sysctl
vm.swappiness = somenumberlowerthan60,
and to make this permanent, you will have to add a line to a file, in
Ubuntu it’s usually /etc/sysctl file, however, in Manjaro
or Arch, it’s /etc/sysctl.d/some number.conf. The
potential range is from 0 to 100, but setting this to 0 could have a
weird effect, this is why most people recommend 10 and with ssds I
recommend 5 or even 1.
When using one of these commands,
the numbers can be a bit skewed as well. Never take a low number of
“free” RAM to mean your system is on its last leg. If you are
running fine and do not notice a slow down, it could be that most of
the memory is cached and not actually being used by anything at the
moment. Still, a good practice is to make sure that you don’t have
any zombie or otherwise crashed but still running processes in your
process list. A neat command to do this is ps -aux
to display the entire list, or ps A
| grep processname
to display trouble processes. For a real time view of this, Htop is a
great program.
Comments
Post a Comment