Nuxified

FOSS technologies explained

  • Useful Articles
  • Blogs
  • Images
  • Tips
  • Archives

June 22, 2009

Suspend to disk – does it still make sense?

I just ran into this question and thought I’ll post it here to see what others think.
My personal opinion is that it doesn’t, and here’s why:

I have 8GB of RAM, and although most of it usually is free (or just used by the cache and thus free-able in case of suspension) I have situations where I actually use a lot of my memory for stuff I’m doing. May it be rendering with Blender or virtualization, there are things which really can eat up my memory.
Now having so much memory is a nice thing, for several reasons. One reason is reduced swapping. I have 4GB of swap-space. Right now the Linux-kernel for some reason thinks that it should occupy 2MB of that space, although I still have 45MB free RAM (plus roughly 5.2GB which are currently used for cache and buffers).

The problem I have now is that in case I have to suspend to disk (for whatever reason) under full memory load (and I mean one of those really rare cases where memory is actually occupied, not by cache and buffers) my swap-space, which is half the size of my physical memory, would not be big enough to hold all the data.

Now this all still made sense in times where we used to say “have twice as much swap-space as you have physical RAM”, but those were times where 1GB of memory was a lot! And back then swapping was a lot more common than it is now, with lots of RAM in our boxes. But seriously, why should I now have 16GB or even just 8GB (to match my physical RAM) of swap-space when I hardly ever see any mentionable amount used. As said, 2MB are in use right now. Wow!

So the problem is that with the amount of physical RAM growing people see less reason for huge swap-space, as it usually isn’t needed. But then you are at risk that in situations where all your memory actually is in use you will not be able to suspend to disk.

Now does that mean we should kill that possibility? No, certainly not. One reason clearly is that Linux, due to it’s flexibility, can run on machines with fewer resources than a recent desktop-/gaming-machine. For those boxes suspend to disk still is a possibility. The other reason is that, although people now have lots of RAM, most of it is not really in use most of the time. Also I think it is quite unlikely somebody would want to suspend their box while rendering and running 2 VMs. 😉

So, in conclusion I want to say that although there are situations where on a box with lots of RAM suspend to disk may fail, those situations still are quite unlikely to come by.
But although those situations are unlikely, they are not impossible to encounter, thus suspend to disk always has to be handled with care. And you never know what may happen that you suddenly have no option other than sending your PC to sleep.

What do you guys think?

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)

Related

Article by reptiler / Community Blogs

Learn Unix

I run Unix Tutorial website and help anyone interested to pick up Unix skills. If you have questions or just want to share your ideas – please join the Unix Tutorial on Facebook.

Tech Stack Solutions

Tech Stack Solutions is my company that provides Unix support. Sign up or simply get in touch to find out how I can help!

Search this Website

You May Also Like

Recent Posts

  • Advice on using SUDO
  • FFmpeg 4.0
  • KDE Plasma 5.9.0 Release
  • How to Install Ubuntu Linux without a DVD or USB
  • How to Securely Save All Your Passwords with Keepass
  • 9 Signs You Should Use Linux on Your Computer
  • The Easiest Way to Optimize Your MySQL Database Performance
  • Setting up a Linux Web Development Environment in Windows
  • Hunting Down Disk Space Hogs on Linux Command Line
  • 6 Simple Android Apps for Monitoring and Managing Your Linux Server

Archives

Categories

  • Community Blogs
  • Images and Screenshots
  • News
  • Technical Topics
  • Useful Articles

Basic Unix Commands

Basic Unix Commands
  • ls command
  • mkdir command
  • man command in unix
  • cd command - change directory
  • uname command

Advanced Unix Commands

Advanced Unix Commands
  • ln command - symlinks
  • tune2fs unix command - filesystem parameters
  • du command - disk usage
  • lsb_release command
  • find unix command

Unix Reference

Unix Reference
  • SSH port forwarding
  • unix commands
  • visudo tutorial
  • mtime unix
  • lrwxrwxrwx
  • Unix Tutorial digest

Unix Books

Unix Tutorials

Unix How-Tos
  • check raspbian version
  • autostart in KVM
  • List files in Ubuntu package
  • check CentOS version
  • create bootable USB in MacOS
  • Useful Articles
  • Blogs
  • Images
  • Tips
  • Archives

Copyright © 2023 · Education Pro Theme on Genesis Framework · WordPress · Log in