Skip to main content

Blocklist-Update.sh

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

MEMORY MANAGEMENT WITHIN LINUX

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

Popular posts from this blog

NOSCRIPT CONFIGURATION FOR PALE MOON SPECIFICALLY

I wrote an article before about making Pale Moon more private. I covered a few of the settings and back end changes I make each time I install it. I mentioned Noscript, but I didn’t give any details about how I set it up. First though, you have to get the version already marked for your version of “Firefox” or in this case, Pale Moon. If you went to https://addons.palemoon.org/addon/noscript/ you would probably find the Pale Moon addons page devoted to the newest possible Noscript being marked specifically for Pale Moon. Other versions may work, but these are hybrid addons and the closer we get to Noscript 10, the less I trust it to work with Pale Moon specifically. I just opt to stick with 5.0.6. There have been people asking about what happens when Maone, the developer stops supporting the hybrid versions of Noscript, “Will it work with Pale Moon?” Why yes it will. Noscript blocks scripts, that’s its main function and it will do that as long as Java script exists on a page.

SSD PARTITION ALIGNMENT

I was searching for more information regarding SSDs last night as that is what I now use, I found an interesting little tip that most users will never have to worry about, but people using Arch Linux, Manjaro or Windows that was cloned from another drive may want to consider checking this. The Partition manager within Linux normally takes good care to ensure that you have some free space to be used by the SSD in the event that a cell becomes worn out or corrupted. Also, Linux generally ensures that a proper amount of unallocated drive space is set aside preceeding the partition. However, on my own image of Manjaro, I discovered that this was not the case. The partition was “out of alignment”. To fix this situation, I found an article on  Lifehacker that went into instructional detail about how to solve this from a live environment or an image of Gparted . Gparted is a separate live environment of Linux that is based on Debian and uses Gparted as the main tool to manage par

PALE MOON PRIVACY SETUP

I did a review of Pale Moon back when 27.6.2 came out in linux. I had mostly great things to say about the browser then and my feelings towards it have not changed. Pale Moon is a very useful tool for scowering the net. It has privacy at its core with a few implementations made by Moonchild, the lead developer, built in. I also mentioned the point that Pale Moon has a canvas poisoning feature in the backend, however, I wasn’t very clear about how to turn it on. I thought in this tutorial, I’d show with a series of screen shots, some of the useful settings and preferences that I change to make Pale Moon a bit more private. I also thought I’d take this time to rant a little more about some of the not so savory issues with Firefox which have recently come under scrutiny by various people in the the Linux world. First order of business, if you haven’t heard, Mozilla recently added an extension into their browser which gave people ads. That’s right, they were ads for a specific t