i have only one internal ssd and no external drives are connected

  • bad1080@piefed.socialOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 hours ago

    thanks for the reply! does that mean it occupies 7.7gib of the 9.57gib RAM currently being used? or just the 218mib?

    • Eager Eagle@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      7 hours ago

      it can use up to that number, but it won’t allocate that much when not needed, which is the case here. tmpfs can also use swap, so the maximum space available is system RAM + swap

    • dennajort@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      7 hours ago

      As you can see, it is using 218 MiB at the moment, it is not pre-allocating the whole available space. the 7.70 GiB is the max limit of how much can be used. It is usually mounted in the /tmp folder. This is a standard practice, since this is destined for temporary files, it will allow fast access, reduce disk wear, and also wipe itself on reboot.

        • dennajort@sh.itjust.works
          link
          fedilink
          arrow-up
          5
          ·
          edit-2
          6 hours ago

          If I wanted to use some analogies, I would imagine RAM is the space on your desk and disk is the drawers behind you.

          Everytime the computer shutdown, the desk is totally cleared.

          When you work, you have stuff on your desk space, files that you need temporarly are also on your desk because you want to keep them and clear them on shutdown, this is what /tmp is for.

          Swap is when you desk is starting to be full, but you still need the data to work, so you have a special part in the drawer behind you that you move stuff that you don’t need right away but want to make some space on your desk. It is slightly slower to access since you need to move from your chair to get it.

          It is not uncommon for Linux to eagerly move things in swap when you are not actively using them in RAM. This allows the system to be ready if you need more space. Linux is mart enough to handle moving all of this around (RAM, swap, tmp) as efficiently as possible so that it doesn’t impact your usage of the computer. Usually tuning these things is only necessary if you have some very specific issues with your system.

          Also, since your disk is an SSD, you probably will not see a very big impact on performance. Swapping was really an issue in the past with spinning disks. SSD is not as fast as RAM, but magnitude faster and snappier than spinning disk.