Announcement

Collapse
No announcement yet.

Ubuntu To Begin Making Use Of Swapfiles In Place Of SWAP Partitions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Originally posted by jpp650 View Post
    Fantastic idiotic movement from Ubuntu. If for whatever reason I need to page-out because of memory shortage, now I know that it will crawl even more if I use Ubuntu, thanks to having to cross the filesystem layer to reach the storage. They should call the distribution Microsoft-Linux and recommend it only to desktops.
    Here's a quarter, kid. Get an SSD.

    Comment


    • #22
      Originally posted by starshipeleven View Post
      If you resize it you get storage space back
      usual resize direction will require additional storage space instead

      Comment


      • #23
        Originally posted by darkbasic View Post
        Meanwhile, on btrfs...
        there is zero need for this shit, since btrfs supports online resize

        Comment


        • #24
          Originally posted by Serafean View Post

          Even though you read my mind for arguments, I don't have time for benchmarks do you? Does anyone?

          LOL
          Not too much time for benchmarks, true. At least I hope that they allow to choose which kind of swap do you like DURING the installation program, and not AFTER it is installed.

          Comment


          • #25
            Originally posted by jpp650 View Post
            If for whatever reason I need to page-out because of memory shortage, now I know that it will crawl even more if I use Ubuntu, thanks to having to cross the filesystem layer to reach the storage.
            No, it won't. When the swap file is activated, the kernel asks the filesystem: "which hdd sectors does this file map to?". Then, when it needs to read or write the swap file, the kernel never asks the filesystem layer and writes directly to those sectors.

            Comment


            • #26
              Originally posted by patrakov View Post

              No, it won't. When the swap file is activated, the kernel asks the filesystem: "which hdd sectors does this file map to?". Then, when it needs to read or write the swap file, the kernel never asks the filesystem layer and writes directly to those sectors.
              Are you fully sure of that? I didn't check the kernel source code from one year ago or so, but I think that it crosses all FS logic (vnode, etc.). Probably I can check it with ftrace.

              Comment


              • #27
                Originally posted by pal666 View Post
                there is zero need for this shit, since btrfs supports online resize
                No there is, because hypernation with full disk encryption is a pain in the ass ATM.
                ## VGA ##
                AMD: X1950XTX, HD3870, HD5870
                Intel: GMA45, HD3000 (Core i5 2500K)

                Comment


                • #28
                  I see pros and cons to both sides. For those who like to micro-manage, a swap partition guarantees the position of the data on the disk. Being a separate partition, users can't tamper with it, and I'm assuming it runs as smoothly as possible; swap files could be hindered by the filesystem, but a partition dedicated toward swapping I'm sure is highly optimized. Meanwhile, a swap file is great because it's generally more user-friendly. You can more easily enable, disable, and resize it whenever you want.

                  Overall, I'm not a fan of swap/paging. Both Windows and Linux are crappy at dealing with it, for different reasons. In Linux, I like how the system won't use swap space unless you're out of RAM, but, doing this can seriously kill performance. If you happen to run out of both RAM and swap, Linux is rendered nearly useless. Meanwhile in Windows, you can have several GB of un-committed RAM and if your paging file is too small, it'll complain that you don't have enough memory. It'll utilize the swap whether you want it to or not. This is generally good if you happen to run out of RAM, but if you don't then it just needlessly slows things down and if you have an SSD, puts unnecessary write cycles on it. If you run out of RAM+swap space in Windows, applications just simply crash. That gets really annoying in terms of lost progress, but, I suppose it's better than losing everything.
                  Last edited by schmidtbag; 16 December 2016, 01:27 PM.

                  Comment


                  • #29
                    Originally posted by schmidtbag View Post
                    Overall, I'm not a fan of swap/paging. Both Windows and Linux are crappy at dealing with it, for different reasons. In Linux, I like how the system won't use swap space unless you're out of RAM, but, doing this can seriously kill performance. If you happen to run out of both RAM and swap, Linux is rendered nearly useless. Meanwhile in Windows, you can have several GB of un-committed RAM and if your paging file is too small, it'll complain that you don't have enough memory. It'll utilize the swap whether you want it to or not. This is generally good if you happen to run out of RAM, but if you don't then it just needlessly slows things down and if you have an SSD, puts unnecessary write cycles on it. If you run out of RAM+swap space in Windows, applications just simply crash. That gets really annoying in terms of lost progress, but, I suppose it's better than losing everything.
                    Linux has a "swappiness" setting which helps weight how much it will write into swap. Daemons which don't get used often can get written out to swap and their memory used for file cache.

                    Window's swap method works a whole lot better if you need the swap. Even before it needs swap it starts writing pages to swap without removing them from RAM, just in case it needs to swap them. This way when it comes down to a swap crunch it's already written to disk. It also swaps in hard drive friendly sequential multi-megabyte chunks. By contrast Linux has to sit there writing a few pages to swap, loading new programs to RAM, rinse repeat. On an old laptop that had a hard drive Linux would swap for minutes while Windows on the same machine, with about the same RAM load, actually ran really well but with a very painful application switch time. You didn't want to Alt-Tab. I'm not sure of the details but it felt like background GUI apps were being entirely written out to swap and their event queues just suspended. That was probably a great thing back in Windows 95 days, and it seemed to still work well for Windows XP. It probably can't be done in Linux without a lot more coordination between the kernel and the GUI. Android does a similar thing to Windows by forcing background apps to save state and exit.

                    And for the RAM+swap limit, you can run Linux that way too. It's one of the overcommit settings in /proc/sys. It's good for servers because instead of running out of memory in the middle of an operation and randomly killing something with the OOM killer, the software gets a failed memory allocation. Well-written server software handles this and just keeps running while rejecting new connections or queuing them up for later. Or it might decide to shut down, but it does it gracefully instead of dropping locks and half-written files everywhere.

                    Comment


                    • #30
                      Originally posted by starshipeleven View Post
                      I'm wondering if now swapfiles can handle hybernation too. I thought only swap partitions could handle that.
                      I also wonder especially about a statement like this:
                      Sizing of the swap file will be to no more than 5% of the free disk space or 2GB, whichever is less.
                      For hibernation/suspend to disk size should be at least equal to the physical memory size as I don't think there's is any compression used.

                      Comment

                      Working...
                      X