Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Swap - The Age Old Question

  1. #11
    Join Date
    Jan 2020
    Beans
    17

    Re: Swap - The Age Old Question

    My beloved 10 year old MacPro

    Code:
     $ free -mh              total        used        free      shared  buff/cache   available
    Mem:           23Gi       1.7Gi        17Gi       137Mi       4.2Gi        21Gi
    Swap:         2.0Gi          0B       2.0Gi

  2. #12
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    19,316
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Swap - The Age Old Question

    Few people have 24G of RAM and reboot daily.

  3. #13
    Join Date
    Apr 2007
    Location
    NH USA
    Beans
    1,454
    Distro
    Ubuntu Development Release

    Re: Swap - The Age Old Question

    What are the benefits/tradeoffs to having a swap file vs. a swap partition?

  4. #14
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    19,316
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Swap - The Age Old Question

    Quote Originally Posted by sgage View Post
    What are the benefits/tradeoffs to having a swap file vs. a swap partition?
    Swap files are
    * more convenient for users who aren't comfortable w/ partitioning
    * easier for MBR systems that are limited to 4 primary partitions
    * worse for file fragmentation, unless added early
    * backups need to exclude the swap file; snapshots at the partition level would freeze the swap, unnecessarily

    Swap partitions have
    * no chance of fragmentation
    * more hassle to resize

    Systems that use LVM drastically mitigate the negatives of swap partitions, but LVM is not normally used by users new to linux.

    i use LVM **and** swap LVs (like partitions).

  5. #15
    Join Date
    Apr 2007
    Location
    NH USA
    Beans
    1,454
    Distro
    Ubuntu Development Release

    Re: Swap - The Age Old Question

    In the early years, when RAM was expensive and scarce, I always had a swap partition equal to my RAM. A couple of years ago, I got a computer with 12G RAM, and did the same. I monitor things pretty closely, and I noticed that the swap was never touched. So I did away with it - I have not had a single problem. I do NOT do anything like video editing or such. I use my computer a lot, but almost never touch 4G RAM usage.

    I have been away from Ubuntu for a long time - used it from Warty to Natty and the whole Gnome3/Unity thing, when I checked out other options. Nowadays I use MATE, and Ubuntu MATE is quite nice, and I notice that Ubuntu sets up a swap file...

  6. #16
    Join Date
    Aug 2009
    Beans
    Hidden!

    Re: Swap - The Age Old Question

    All I get is this:
    Code:
    $ free -mh
                  total        used        free      shared  buff/cache   available
    Mem:           15Gi       1.2Gi        13Gi       120Mi       1.0Gi        13Gi
    Swap:         4.0Gi          0B       4.0Gi
    I have one computer with many Linux systems on it (9 soon to be 10) and none of them use swap while they all seem to require it.

    Not sure what causes one to use swap and others to see no usage whatsoever.

    While installing some systems you can't point to/use the 1 swap file you have or it will be formatted.
    So, I choose just the root partition and install; it still finds the existing swap and mounts it upon the 1st reboot.
    So, then I add the swap file properly to the fstab file. No big deal as I add a Media partition as well.

  7. #17
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    19,316
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Swap - The Age Old Question

    if you want to see swap used, run 5 instances of chrome and run some batch handbrake transcoding jobs for an hour.
    Or run a geospacial DB w/ 5 VMs as clients.
    Or do some light Android development using the normal android dev tools.

  8. #18
    Join Date
    Aug 2009
    Beans
    Hidden!

    Re: Swap - The Age Old Question

    Put a lot of effort into it eh?

    On Arch I just turned on SimpleScreenRecorder which uses up the most CPU of any app I know of.
    Recording a 3480x2160 video at 60hz with sound and still 0% of swap was used.

    I have used a 1MB swap and it still functioned the same. I just gave it 4GB because I could.

  9. #19
    Join Date
    Jan 2006
    Location
    Sunny Southend-on-Sea
    Beans
    7,455
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: Swap - The Age Old Question

    CPU usage is orthogonal to RAM usage.

    The big one is Java. It gets round to clearing up after itself, mostly, eventually, but in the meantime you'd better have some way of creating new pages.

    Websites running arbitrary code, with unknown provenance, from the lowest bidder, is another prime misbehaver, too, of course.
    None but ourselves can free our minds

  10. #20
    Join Date
    Oct 2019
    Beans
    9

    Re: Swap - The Age Old Question

    My work computer only has 16G of RAM. I've had others that have 32G. I depends on what you need to run. I have home computers running 16.04 LTS. They mostly do web browsing and are barely breathing with 8G of RAM. And they're speedy.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •