Linux Server Swap and Memory Usage | Top Docs from Linode

  Рет қаралды 5,197

Akamai Developer

Akamai Developer

Күн бұрын

Пікірлер: 9
@afflictionofarmada8857
@afflictionofarmada8857 2 жыл бұрын
Swap can have another benefit: Linux takes note of which pages of memory are not being touched. It tags them as "Inactive". They might be speculatively written to the swap file but not removed from DRAM (SwapCached). When memory pressure happens, those SwapCached pages can be released without having to write to disk. Some processes might allocate, but not actively use, a fair amount of memory that can eventually be recognised as Inactive, and SwapCached. If those pages are eventually accessed, they can be quickly pulled out of SwapCached+Inactive and into Active, without having to read from disk. Alternatively, if you're dealing with a fileserver, most of your memory might indeed be Cached, swap might allow those Inactive pages to be moved out of DRAM to gain a little bit more memory for the cache. The linux kernel devs working on its virtual memory subsystem are pretty smart, swap is rarely going to be a hinderence, but as mentioned swappiness (and many other tunables) can be adjusted for pretty much any workload. Those categorizations I mentioned about memory (Active, Inactve, SwapCached, Cached, and dozens more) can be retrieved with: $ cat /proc/meminfo If you have a large amount of Inactive, swap might just be a benefit.
@lethalz4519
@lethalz4519 2 жыл бұрын
Great video, clear and consice!
@art4018
@art4018 2 жыл бұрын
Thank you for another great video!
@send2gl
@send2gl 2 жыл бұрын
I actually run headless Raspberry Pi server using Apache, xsane, mumble, samba, dlna and others. It is an original Pi with only 256MB RAM. I also have a desktop and vnc installed but neither run at boot. I created a 512MB RAM for the very rare occasions I initialize the Desktop and VNC. Works well but I admit I've not actually checked the memory usage whilst running these two services.
@netwebgaming5121
@netwebgaming5121 2 жыл бұрын
In Ubuntu, if CSF and fail2ban is installed, do you recommend installing UFW too?
@Henk777ER
@Henk777ER 2 жыл бұрын
Hi, thanks for the video. What about the size of the swap partition? These days you can have plenty of RAM on your system like 16GB. A rule of thumb is the swap size is twice the amount of RAM, so here the swap partition would be 32GB. But with 16GB of RAM isn't the chance you run out of RAM and need swap very remote? So why then allocate 32GB of swap space?
@AkamaiDeveloper
@AkamaiDeveloper 2 жыл бұрын
Hello Henk - The following article from It's Foss outlines a bit more about swap recommendations and how vary from distro to distro. itsfoss.com/swap-size/ For some additional context, on the Linode platform, the default swap size on a 16GB instance is 512MB.
@vinvvinv7460
@vinvvinv7460 2 жыл бұрын
Hi, can you make a video explaining /etc/hosts, /etc/resolve.conf & /etc/named.conf why and when are they used? if you can provide a practical real-world working example In a basic understanding manner, please its a request
@PS_Tube
@PS_Tube 2 жыл бұрын
If someone uses Linux desktop with suspend, you'd need to have swap that's equal to or double the RAM. Else, 1 or 2 GiB of swap is enough. Better to be safe than sorry.
How to Use Tar on Linux | Command Line Tips from Linode's Top Docs
23:26
The htop Command | Linux Essentials Tutorial
13:44
Akamai Developer
Рет қаралды 32 М.
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 958 М.
Linux Crash Course - Understanding Memory and Swap Usage
20:55
Learn Linux TV
Рет қаралды 51 М.
What's the BEST home server operating system?
17:35
Christian Lempa
Рет қаралды 720 М.
Why You Should Use ZRAM on Your Raspberry Pi
20:20
Gary Explains
Рет қаралды 20 М.
We finally have a simple solution for backing up files on Linux
12:24
Dreams of Autonomy
Рет қаралды 209 М.
Understanding Cache & Buffers
12:12
networknutsdotnet
Рет қаралды 20 М.
The Linux Filesystem Explained | How Each Directory is Used
14:08
Akamai Developer
Рет қаралды 237 М.
12 MORE Commands That Will Change The Way You Use Linux Forever
22:21
Akamai Developer
Рет қаралды 17 М.
Linux File System/Structure Explained!
15:59
DorianDotSlash
Рет қаралды 4,3 МЛН
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН