Announcement

Collapse
No announcement yet.

New Low-Memory-Monitor Project Can Help With Linux's RAM/Responsiveness Problem

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

  • #21
    The matter is that this problem affects the linux operating systems since longer than a decade... It seems that developers are really incompetents.
    Last edited by Azrael5; 25 August 2019, 12:51 PM.

    Comment


    • #22
      Originally posted by polarathene View Post
      Unless you want hybrid-sleep/hibernation?
      The subject at hand is regarding OOM. I'm not suggesting people go swapless, I'm just saying swap isn't a modern solution to OOM situations.

      Comment


      • #23
        Originally posted by birdie View Post
        • SWAP does not solve this issue.
        True problem is swap does not effect only 1 issue.

        Originally posted by birdie View Post
        • In many cases a system can run without SWAP perfectly. I've been running without SWAP for over 15 years now. 100% of my servers (over a hundred high load machines) run without SWAP.
        • In many cases SWAP significantly decreases performance and responsiveness.
        • In many cases SWAP causes minutes-long stalls.
        birdie there is a documented reason for swap it was covered in Linux Conference Australia video that I have not been able to find right now. In many cases points here lack of swap can also cause all the same effects but not in low memory events where the system stalls/under perform massively.



        When you look into how the structure defrag system for LInux kernel for structures so items like transhuge pages can work effectively you will find swap usage. Push section of structure to swap work on modify structure not to need what was pushed to swap if that section pulled out of swap and modified while doing change abort and try again latter because the data has changed while modification was in fly..

        zram or just a https://www.kernel.org/doc/html/late...v/ramdisk.html plain old ramdisk with a swap-partition on it will have the Linux kernel structure defragmentation system happy. 4meg swap partition in ram uncompressed. In fact high load systems I am highly likely to use a old school ramdisk due to reduced cpu usage. Compression of zram is kind of a pain.

        System without swap will still run but items like transhuge pages will be in fall back mode and you will not be getting the performance gains from them and other equal problems. Run long enough you can be running out of memory due to structure fragmentation.

        It some ways I think there need to be a patch that creates a non disabled ram swap space for kernel structure defraging independent to the general swap system and then turning off the general swap system would not have adverse effects.

        This fragmentation is the first problem.

        Ram based swap does not wear SSD. Ram based swap is dealing with a different problem set of problems.

        Originally posted by birdie View Post
        If people also stopped repeating the nonsense that a system cannot run without SWAP, I'd be happy.
        Really I wish people would stop saying the system can run without swap without understanding the side effects. Like the disruption to linux kernel structure defragmentation. Now if someone does up patches that fixes up the defragmentation system in the kernel so it works perfectly without swap then I would have no issue having swap disabled. While the bug exists that some structures in fact need swap to defragment completely running with no swap is wrong. 4 megs of swap on a ramdisk is about the lowest swap value you should have so the Linux kernel can in fact function properly at this stage.

        Those who say I run systems without swap and it fine are missing the areas where there systems are in fact under performing due to fragmentation of structures over time. Yes normally ignoring mirror issues from time to time causing system restarts that are also happening due to fragmentation at random times.

        Memory management is a complex beast.



        Comment


        • #24
          Originally posted by polarathene View Post
          ...
          Sure, but this is a bad Idea to think in the problem as the RAM profile of a desktop user was like a server profile, or that a user interactive process will be handled as a headless service. Mostly you will face non idle processes handling big files and programs where user interacting to close it will just hit more pages. Swap is of great use in many cases but it map somewhat bad to common desktop scenarios.

          Comment


          • #25
            Swap used to be unheard of on embedded computers before zram. Managed flash memory like emmc (as opposed to relying in ubifs for wear leveling) hasn't always been common.

            Comment


            • #26
              Originally posted by alpha_one_x86 View Post
              Firstly correct critical bug should be good: https://bugzilla.kernel.org/show_bug.cgi?id=204315 (my bug)
              Not sure that is a good bug running zswap at 80 percent memory allowed is massively above the 20 percent default. Please had a swap partition. If you read the zswap documentation it not design to work without another swap device to use and that error on that bug looks like zswap without a swap device other than itself to use..

              zswap has a basic flaw in it design that means when you run out of memory completely it makes matters worse not better.

              zswap to evict pages in zswap out to a different swap the zswap compressed pages have to be decompressed. So this increases cpu usage at the very time you don't want to increase it. zswap compression does not bring any disc io bandwidth reduction.

              Comment


              • #27
                Originally posted by elatllat View Post
                file file systems can reserve a percentage for root maybe RAM should to.
                Isn't that what min_free_kbytes is for?

                Comment


                • #28
                  I may be in the minority but I perceive an improvement in Ubuntu 18.04.3. I have a machine with 32 gbs of RAM and the same amount of SWAP, and a AMD 1700. I haven't run out of both, but I routinely run out of RAM when doing text analysis. I those situations I have been able to play CSGO while my models consume all the RAM and 80% of the CPU mostly fine, with few frame drops here and there.

                  Comment


                  • #29
                    Originally posted by andreano View Post
                    Swap used to be unheard of on embedded computers before zram. Managed flash memory like emmc (as opposed to relying in ubifs for wear leveling) hasn't always been common.
                    Embedded systems did use swap in ramdisk before zram existed. Different linux kernel structures using swap in their defragmentation process appeared before zram did. zram appeared fairly soon after swap become required by some of the internal kernel operations.

                    Comment


                    • #30
                      The Low-Memory-Monitor daemon monitors the amount of free physical memory and will signal other user-space applications when such pressure occurs. This can alert session managers and other key programs to the situation so they can in turn either free some memory themselves, trigger applications to quit/pause, or other behavior of their choosing.
                      There already was something like that https://lwn.net/Articles/267013/ Does anyone know why its not in use?

                      Comment

                      Working...
                      X