Sponsored Content
Operating Systems Linux Underutilization of Linux memory Post 303044609 by Neo on Thursday 27th of February 2020 08:32:25 PM
Old 02-27-2020
Quote:
Originally Posted by sea
And here I come by thinking that swap nowadays was used to save whats in the memory (ram) on hibernate/suspend.

At least on 'personal' machines that are not used as servers.

My 2 cents, please correct me if I'm wrong on this.

You are not wrong that swap is used for hibernation in systems that are configured to use swap-based hibernation. But, I am confused by your reply, to be honest. This is not a question of "right and wrong". Not everyone hibernates, in fact, hibernation is a something some people choose to use and others choose not to hibernate. This is the same as any computer configuration. For example in Ubuntu, hibernation is not enabled by default; and as I recall, Ubuntu stopped supporting hibernation (in general) and only makes it available for users who want it.

Personally, I have zero systems (desktop or server) configured to hibernate. That is my choice (right?); others may like hibernation. I do not. The original poster did not ask a question about hibernation, to be honest; and it is very likely the OP does not use hibernation, since on Linux systems (at least the ones I am familiar with, like Ubuntu), hibernation is not enabled by default.

The title of this thread by the OP is "Underutilization of Linux memory" not "How to Enable Hibernation in Linux", isn't that correct?

As for me, I have a number of very busy Ubuntu servers in production and I do not enable hibernation on a single one of them.

My reply early discusses how RAM in 2020 is so cheap, that when you have system swapping for performance reasons (not for those people who configuration their systems to hibernate), that is a sign that you should invest in more RAM.

That is my choice and this is how I always advice others to admin their systems after over 25 years of hands on Linux work since Slackware 0.8. I like lots of deep, cheap RAM and never hibernate.

As a side, I just checked and Slackware 1.0 was released in 1993. I started deploying Linux for the United States Air Force at 27 Air Combat Command bases worldwide as Slackware 0.8, so that was at least 27 years ago. Perhaps over 27 years of using Linux in production has informed me "just a little" on how to configure systems.

Code:
https://en.wikipedia.org/wiki/Slackware

Everyone has a choice. You can build your system with plenty of "deep, cheap" RAM or not. Maybe you like having you systems move bits to disk and like to be "frugal" with RAM, LOL. However, I prefer RAM, it is CHEAP; and I never enable hibernation on any system. That is my choice and my advise to most people. If you system is swapping for performance reasons (this is not a hibernation discussion) it is a blinking light to deploy more RAM.

So, If anyone wants to use swap and you like having less RAM and you like your system thrashing pushing bits from RAM and disk and back, and that is your idea of "good computing", then go for it. I am not telling or advising anyone to use or not to use swap or to enable nor disable it. Everyone has a choice, right? I have posted what I do, and I have been working with Linux on a daily basic in production since Slackware 0.8, for over two decades (nearly three decades).

This means, quite simply, have told you that for me, I find RAM cheap and when a system is swapping, that is generally a very clear sign for me to increase RAM (this is not a discussion about hibernation, and never was, to be frank). However, on all Linux systems I have deployed for the past 10 years, I deploy them with a lot of RAM, so they never need to swap. None of my systems and servers swap, and none of my systems and server hibernate.

If anyone wants to swap and hibernate, then you should do so. Everyone has a choice when they configure their system. Many people advise based on "theory". I am telling you what I do based on 27 years of hands on production experience with Linux servers deployed. Most of my systems tend to have a lot of RAM. If I have a Linux system with a small amount of RAM deployed (like a VM slice), and it gets busy because the app grows and it starts to swap, I will deploy more RAM. I never configure hibernation.

As a final thought (hopefully), I can recall many people here at unix.com who were not happy when I gave Linux and Unix "equal status" at unix.com many years ago. There were a lot of "hard core" UNIX users (back then) who were really negative about Linux (and they did not use Linux back then either). I find it interesting that, now, so many of those same Unix-diehards of "yester-years" are now Linux experts today.

There is a big difference between "computing in theory" and "operational system deployment, administration and maintenance" (real-life operations).

A lot of people "talk to walk" but very few people actually "walk the talk". This is especially true today, in my view. We have a lot of "arm chair" experts in computer science and IT security (bloggers, writers, YT video makers), who have never really ran an operational servers in a busy production environment, fought hackers and DDOS attacks "in the real world" or been forced to make data center change in a day or two when a hosting business goes belly up.

There is a huge different between "theory" and "practice" and in server operations, the same is true, for sure! The world today is "pregnant" with arm-chair IT experts, bloggers, commenters, influencers, YT video makers, forum posters, who have never actually ran a production server application.

Moderator's Comments:
Mod Comment Thread closed since it is moving far off topic. This was not a discussion about hibernation when it started. If you want to discuss hibernation, please start a new thread.
 

10 More Discussions You Might Find Interesting

1. Programming

memory layout in C on linux

Hi, Does any one know what tool to use to visualize how is memory layed out for C on linux systems. I mean how much stack portion is used in functional call. Where exactly does the argument to function sit in memory ? I have written small program pasted below. But I am not able to infer... (3 Replies)
Discussion started by: parasa
3 Replies

2. Programming

Determining free(available) memory in MV linux

HI I'm a rookie in C programming and I'm working in Monta Vista Linux. I have to write a program that displays free memory. I have memtester(allready written by someone else) and now I have to type how much amount of memory tester will test and I want that memtester finds out himself how much of... (11 Replies)
Discussion started by: trancedeejay
11 Replies

3. Red Hat

Linux memory usage

What's the best way to find out how much memory is being used/available? I tried using free, but I didn't quite understand the output. Can someone explain it? $ free total used free shared buffers cached Mem: 16304536 16256376 48160 0 ... (6 Replies)
Discussion started by: junkmail426
6 Replies

4. UNIX for Advanced & Expert Users

Memory managment - linux

Hi, I having problem with my linux machine it have 6Gb physical memory and somehow it always almost coming to the bottom neck and than it start writing to the swap memory you can see that there is more than 4G in cahce, is there any way to clean the cache or to limit it to 2Gb? host1... (6 Replies)
Discussion started by: Igal Malka
6 Replies

5. Red Hat

share memory on linux

how to list the orphaned shared memory? how to kill them so that shared mem is free again. thanks (9 Replies)
Discussion started by: melanie_pfefer
9 Replies

6. Linux

Linux Memory Track

Hi All, We are using the linux servers and need to track the memory utilization of the box. Could anyone advice how the same can be achived. :) (1 Reply)
Discussion started by: haitorajesh
1 Replies

7. Programming

Memory sniffing in linux

I am trying to create an application that will be able to sniff memory of other applications. I am not completely new to systems programming but I am not sure how to go about this task. I understand that accomplishing this mainly require these steps. 1: Get a list of processes 2: Find the... (2 Replies)
Discussion started by: mosey
2 Replies

8. Linux

Memory Usage on Linux server

Hi , As I am new to Linux server, I am facing some doubts like: On linux server virtual memory usage goes to 99%, but I have Threshold limit of 95%. So it crossed the threshold limit and alarmd. Yesterday I moniterd the server using TOP command, and found some of Tibco process was consuming... (4 Replies)
Discussion started by: Jaywantmm
4 Replies

9. Red Hat

about shared memory space in Linux !

Dear Friends , I am confused about shared memory in Linux . plz look @ the below output : $ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 126G 61G 59G 52% / tmpfs 1.7G 0 1.7G 0% /dev/shm Here , I see that every time... (1 Reply)
Discussion started by: shipon_97
1 Replies

10. Red Hat

Shared memory in linux

Hello, I am using Linux os. $ df -k /dev/shm Filesystem 1K-blocks Used Available Use% Mounted on tmpfs 2023256 1065000 958256 53% /dev/shm $ Based on my google this, it is shared memory. What is this shared memory and where exactly it is used? Can you... (5 Replies)
Discussion started by: govindts
5 Replies
All times are GMT -4. The time now is 08:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy