Optimising Ubuntu performance on amd64 architecture - eviltoast
  • Fizz@lemmy.nz
    link
    fedilink
    arrow-up
    10
    arrow-down
    4
    ·
    11 months ago

    I cant put my finger on it but linux does not feel as snappy as windows. I use Linux 100% now but when I am fixing something on a windows machine I notice a certain smoothness that I don’t notice on linux.

    • d3Xt3r@lemmy.nzM
      link
      fedilink
      arrow-up
      13
      arrow-down
      1
      ·
      edit-2
      11 months ago

      I’d wager that it’s your scheduler. Prior to the latest kernel release (v6.6), Linux used the CFS scheduler which is outdated and not really optimal for desktop usage. As a result, many third-party alternate schedulers were developed to fix this issue, with the most recent popular ones being the System76 scheduler (used in Pop!_OS), and BORE (used in CachyOS). But this issue has been solved officially now, with the EEVDF scheduler (earliest eligible virtual deadline first scheduling), which has finally replaced CFS.

      So if you’re not on 6.6, upgrade to it, or use the System76 scheduler. Also switch to Wayland if you haven’t already and you’ll notice your Linux desktop just as smooth, if not smoother, than Windows.

      I have an M1 MacBook Air and a Thinkpad Z13 G1 (running Bazzite KDE with kernel 6.6.3 + System76 scheduler), and comparing the touchpad gestures and window animations side-by-side - especially the gestures and animation to switch workspaces - it’s just as smooth as macOS (at least to my eyes), and that’s quite the feat given that macOS has been the king of smooth animations and responsiveness for a long time.

      • uis@lemmy.world
        link
        fedilink
        arrow-up
        2
        arrow-down
        4
        ·
        11 months ago

        I’d wager that it’s your scheduler.

        How did you know??

        Linux used the CFS scheduler which is outdated and not really optimal for desktop usage.

        And Linux kernel is full of outdated math. Like outdated addtion, outdated subtraction. /s

        If you want “like on windows”, then you need dynamic priority, not another scheduling algorithm. Basically you want your compositor to set lower priority value(which means higher priority) to process whoose window now is focused.

    • Bulletdust@lemmy.ml
      link
      fedilink
      arrow-up
      12
      ·
      11 months ago

      I find the opposite running KDE Neon. In fact File Explorer ‘lag’ is a widely expressed issue regarding Windows 11.

      • Fizz@lemmy.nz
        link
        fedilink
        arrow-up
        6
        ·
        11 months ago

        Windows file explorer is such a piece of shit. It crashes and lags so often. Linux definitely is smoother in that department.

    • lemmy_user_838586@lemmy.ml
      link
      fedilink
      arrow-up
      10
      arrow-down
      1
      ·
      11 months ago

      Interesting because I’ve had the opposite problem historically. Windows always seemed to be doing random shit in the background, doing what? I can’t tell you but it always seemed to be using the disk or CPU to do some background process, and it always happened, every day at random times oops disk churn. You’ll notice it the most with a regular hard drive because it’s slow and makes noise when its being accessed (vs. an ssd which is silent)

      • Fizz@lemmy.nz
        link
        fedilink
        arrow-up
        5
        ·
        11 months ago

        Windows 10 used 10-30% of my pc’s resources and linux uses around 1%. There is plenty more ram/cpu/gpu if linux wants it.

    • sebsch@discuss.tchncs.de
      link
      fedilink
      arrow-up
      5
      ·
      11 months ago

      I guess that’s your DE you’ll hardly every feel any snappyness from your kernel.

      Linux distributions are not the same. A Suse with KDE looks and feels 100% different than a gnome Ubuntu.

    • SapphironZA@lemmings.world
      link
      fedilink
      arrow-up
      5
      ·
      11 months ago

      I found a lot of the same. For me I resolved this by changing a few things.

      1. Abandon KDE plasma and Gnome.
      2. Avoid Snaps like the plague.

      Linux mint Cinnamon draws 5w on idle only laptop. Ubuntu stock draws 8w. Manjaro plasma uses around 7w.

      • people_are_cute@lemmy.sdf.org
        link
        fedilink
        arrow-up
        6
        ·
        11 months ago

        Isn’t vanilla KDE Plasma faster and less resource-intensive than Cinnamon?

        The Mint devs present the XFCE option as a “more lightweight” alternative to the Cinnamon option, and Plasma has been more efficient than XFCE for over three years now.

          • SapphironZA@lemmings.world
            link
            fedilink
            arrow-up
            5
            ·
            11 months ago

            I think power draw is a better measurement for efficiency.

            Making it more practical. Most people have more RAM than they need, but everyone is limited by battery capacity on laptops.

        • SapphironZA@lemmings.world
          link
          fedilink
          arrow-up
          2
          ·
          11 months ago

          I suspect that packaging has a lot to do with it. I also value power draw as a better metric for determining efficiency compared to RAM usage.

      • Fizz@lemmy.nz
        link
        fedilink
        arrow-up
        2
        ·
        11 months ago

        I cant abandon KDE because I like it way to much. I have a powerful computer and I feel like linux is to optimized. Sometimes I just want programs to use as much resources as they need to run perfectly.

        I think once I move over to wayland I will feel that snappiness.

    • uis@lemmy.world
      link
      fedilink
      arrow-up
      5
      arrow-down
      1
      ·
      11 months ago

      Depending on what you perceive as snappiness, it is because of misconfiguration.

      If you perceive response time of desktop enviroment snappiness, you need to configure desktop server(xorg-server, kwin_wayland, xwayland) and compositor(or disable it) to run in real-time mode. Maybe there is also “prefer smoothness” option in you desktop enviroment settings like on KDE.

      If you play games, then migrate to X11. Games don’t know how to enable tearing on wayland. And in general X11 seems to work better with games.

      • Chewy@discuss.tchncs.deOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        11 months ago

        What do you mean with real-time mode?

        I only know of real-time kernels, which allow to measure/calculate the maximum response time of an application. This is important for critical processes, like braking in your car, but decreases performance slightly rather than increase responsiveness.

        • uis@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          11 months ago

          I mean real-time scheduler, not real-time kernel. Found an article that says kwin_wayland uses SCHED_FIFO.

          man 7 sched says:

          SCHED_FIFO can be used only with static priorities higher than 0, which means that when a SCHED_FIFO thread becomes runnable, it will always immediately preempt any currently running SCHED_OTHER, SCHED_BATCH, or SCHED_IDLE thread.

          but decreases performance slightly rather than increase responsiveness.

          Responsiveness is not performance. There are 3 main performance metrics: throughput, latency and jitter. Responsiveness is mostly latency, but sometimes jitter. You can for example run game in 30fps with 0.01s lag or in 60 fps with 1s lag. In second case FPS is higher, but, player will feel game unresponsive because of time it takes between pressing button and game showing the result.

          • Chewy@discuss.tchncs.deOP
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            11 months ago

            Thanks for the link, real-time mode definitely makes sense and should be implemented for all compositors imo.

            Responsiveness is not performance.

            True, I miswrote. What I wanted to write was

            but decreases performance slightly rather than in return for an increase in responsiveness.

    • Pantherina@feddit.de
      link
      fedilink
      arrow-up
      3
      ·
      11 months ago

      Windows preloads the entire desktop it seems, before logging in. That is pretty great. Apps starting is the same, just more bloat often. Flatpaks make it more equal though. Firefox does some nice UI-preloading too, and FF on Windows is actually more secure than on Linux ironically.

      So there are things to fix, but comparing breaking windows updates to never breaking and way faster immutable rpm-ostree updates, while you use the system normally, its worlds.

    • Cycloprolene@lemm.ee
      link
      fedilink
      arrow-up
      2
      ·
      11 months ago

      Smoothness is mildly better on gnome than windows on my set up, though windows generally wins with apps start up times. Not sure why.

    • people_are_cute@lemmy.sdf.org
      link
      fedilink
      arrow-up
      4
      arrow-down
      4
      ·
      11 months ago

      It’s the UI setup. All DE/WM combinations are, and have been, factually inferior to Windows Explorer in terms of optimization, clarity and animation.

      Which may or may not be because of their excessively modular structure and fractured development. Each layer has its own opinionated dev team unlike in Microsoft or Apple, where it’s all synchronised and everyone across the board have (at least at the time of development) a clear vision of the product they want to make.

      • Fizz@lemmy.nz
        link
        fedilink
        arrow-up
        3
        ·
        11 months ago

        I think windows may win in the little animations but clarity fuck no. Windows is a mess. Opening the start menu on windows feels like a popup ad. Apple though does have good animations and ui clarity so I can’t knock them.