More swap and (no) hard disk firmware upgrade
Egg, October 9, 2023: This little blog is about what swap space is, why more cache space can be added, and why certain SSDs need an upgrade — or not.
What is swap memory ?
If we look at the way a computer works, there is, besides the processor (CPU), primarily the main memory (RAM or Memory) and the hard disk, which, in contrast to the main memory, is there to store the data permanently. This means that changed data in the main memory must be stored on the hard disk so that they are still available (e.g. after a restart).
Unfortunately, the main memory (just like the hard disk) is limited in size. As a rule, hard disks can hold much more data than the main memory. If the computer has to process a lot of data, it can happen that the main memory is “exhausted” quite soon. In this case, programs would have to swap many individual data blocks to the hard disk in order to obtain space for further processing.
This in turn would take a relatively long time under certain circumstances. It makes a big difference whether 1000 times each 1000 characters are written to the hard disk or whether 1’000’000 (1 million) characters are stored once. In the latter case, the hard disk receives the command to write data once, in the former case, individual operations on the hard disk must be started 1000 times.
This is where swap memory comes in, by reserving an area of the hard disk for it, so that this part of the hard disk can be used (albeit slowly and virtually) as main memory. Here is an example: There is 8 GB of main memory and the hard disk contains 200 GB. Now 16 GB of this 200 are set as swap memory. Consequently, the hard disk can “only” store 184 GB of data, but instead of 8 GB, 24 GB are available as main memory for the operating system or the programs.
How much swap memory is useful ?
Our ArchivistaBox systems usually have between 4 and 16 GB of main memory. The ArchivistaMediaVM computers usually receive between 64 and 256 GB of main memory (RAM). On the hard disk, a good 6 GB of swap memory has so far been allocated when setting up the operating system. With 4 to 8 GB of main memory this is quite reasonable, because a “rule of thumb” says that the swap memory should also not be designed too large.
If, for example, 40 GB of swap memory is available with 4 GB of main memory, this can lead to programs with 44 GB of main memory quickly wanting to use this memory as well. However, since only 4 GB is effectively available, this results in very suboptimal runtime behavior. The operating system would constantly move data back and forth between swap and main memory.
With the ArchivistaBoxes, there has been very little need for more virtual swap memory to date. The situation is different with the ArchivistaMediaVM computers. Both multimedia applications and virtualization like to require a lot of main memory.
Until now, for these cases, ArchivistaBox had the option of creating more swap memory on the partition of the data. Specifically, this involves the ‘avswap’ file under ‘/var/lib/vz’. However, this virtual memory can only be used once the data hard disk(s) has been mounted.
How to set up more swap space
Therefore, there is now the possibility to assign more swap memory directly when setting up the system. Via the option ‘swap.xx’ (‘swap.16’ e.g. for 16 GB) of the ISO file or during the boot process, the desired number of GB of the corresponding hard disk is directly set up as swap memory and made permanently available.
It must be added here that the new variant of the enlarged swap partition is only available when setting up the hard disk for the first time. If existing systems are subsequently given a larger swap partition, the ArchivistaBox must be completely set up again. This means that the existing hard disk(s) must be destroyed.
Problems with Samsung SSD hard disks
For about 7 years now, most of our customers have been getting SSD disks with ArchivistaBoxes. Predominantly Samsung SSD disks of the “series” EVO were installed.
Unfortunately, there have been problems with Samsung SSD disks recently. This led to some deployments due to defective hard disks in the current year. Of course, all customers received new SSD disks free of charge. However, it is still unpleasant. Samsung does provide firmware updates for certain models.
Installing the corresponding firmware is not quite trivial. First of all, the upgrade can only be installed if the hard drive is installed as a SATA drive. SSD hard drives that are connected via USB cannot be upgraded.
According to the manufacturer, the “problem” affects all Samsung EVO models with a production date before November 2022. Samsung’s information is spartan. In particular, it is not mentioned that there are currently no updates for models from 2022.11. Likewise, it does not affect all ArchivistaBox systems (according to our experience). The hard disk errors only occur when the hard disks are under high load for a longer period of time.
Specifically for our customers, it can be said that it either affects customers who use virtualization with SSD hard disks, as well as those who feed the ArchivistaBox with an extremely large number of (large) documents (movies). It is and remains unpleasant that Samsung only provides very rudimentary information. We have not had to register any such problems in support for a few months now. We therefore hope that this is a “one-time” slip-up on Samsung’s part.
Doc film Bike Across America
So that this blog does not end on an unpleasant note, it should be mentioned here that the extended “summer vacations” were used to cross the USA by road bike. From this fantastic journey there is the documentary Bike Across America in dialect (without subtitles), with German and English subtitles. Have fun!