Announcement

Collapse
No announcement yet.

ULatencyD Enters The Linux World

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

  • #16
    I'd like to make two points.
    Point one:
    Guys, what are you talking about? Do you even realise a bunch of students can't write an OS scheduler! It's Operating System Science, a lot of research has been put into it, it's a highly theoretical and a very complex matter. It's not done overnight or in any way fast.
    Point two:
    Desktop latency is a very complex issue, spawning across numerous subsystems, and the disorganised approach we have now in Linux, with new scheduler variants appearing every day, a few control daemons, and now this ULatencyD daemon being developed without necessary synchronisation and unified planning. Take a look at the Windows approach, for example:there the scheduler talks to the window manager and to some other subsystems, such as I/O and don't remember what else, dynamically adjusting itself and the process timeslice to the current situation. However, it is desktop-oriented, and this is where the window manager ties and the general quantum calculation and distribution algorithms originate. So we need to tackle this issue in a more broad and integrated way (not to be messed up with generic, that's another thing), and less UNIX/Linux (distributed/independent development) way, if you want.

    This is what I mean:imagine some guy comes and says, "I want to introduce a mechanism for providing window manager feedback into the kernel a la Windows scheduler." Imagine the flame that comes right next to this? "It's not generic enough! We can't rely on a window manager in the kernel! We chanbge window managers every day! You're making too many assumptions, and this s not how Linux and UNIX in general is developed! Go go go develop your non-generic code somewhere else but not here! Never will it be included in the kernel!" And so on and so forth. We're too generic, and that's our problem. Sometimes you need to make compromises and develop something less generic and more exact, but solving some certain problem well instead of trying to be a jack of all trades and not succeeding in any of the problems you're trying to solve.

    Comment


    • #17
      Originally posted by Yfrwlf View Post
      Seriously, before all this, Linux had much worse multitasking capabilities than Windows 2000 did. Very happy to see this getting fixed.
      I like Windows 2K, a-lot. It was the last Windows OS on my workstation.
      .... However,
      You seem to mix "multi-tasking" and "interactive performance".

      Linux is -very- good at juggling huge amount of process on large amount of processing cores, In fact, it's -far- better than Windows Server 2K8 (Let alone Windows 2K).
      However, as a desktop OS, Linux, at least out-of-the-box, is less optimized for interactive performance. (What is usually called responsiveness)

      On the other hand, I spent parts of the weekend working (including gaming...) on my Xeon workstation while 16 out of the 24 (hyper)threads were busy compressing a 1.5TB storage into an external USB drive using tar+pbzip, so I guess Linux is not that bad when it comes to interactive performance....

      - Gilboa
      DEV: Intel S2600C0, 2xE52658V2, 32GB, 4x2TB + 2x3TB, GTX780, F21/x86_64, Dell U2711.
      SRV: Intel S5520SC, 2xX5680, 36GB, 4x2TB, GTX550, F21/x86_64, Dell U2412..
      BACK: Tyan Tempest i5400XT, 2xE5335, 8GB, 3x1.5TB, 9800GTX, F21/x86-64.
      LAP: ASUS N56VJ, i7-3630QM, 16GB, 1TB, 635M, F21/x86_64.

      Comment


      • #18
        I just wanted to inform, that i made a real release 0.3.1

        It got a lot of features since the project announcement. This release contains a plugin that detects the process of the active x window and gives those more cpu shares. And much more...

        https://github.com/poelzi/ulatencyd/downloads

        There is now a ubuntu PPA.

        Comment


        • #19
          Originally posted by poelzi View Post
          I just wanted to inform, that i made a real release 0.3.1

          It got a lot of features since the project announcement. This release contains a plugin that detects the process of the active x window and gives those more cpu shares. And much more...

          https://github.com/poelzi/ulatencyd/downloads

          There is now a ubuntu PPA.
          When you browse menus the active window doesn't lose focus, at least not in Gnome. All of GTK, the entire interface, needs to have responsiveness above what any running program gets. I assume for this to happen you would need to make sure Xorg gets top priority, and perhaps some other things like gnome-panel for Gnome and similar for KDE.

          Xorg sure does use a lot of CPU. I wonder just how CPU-hungry Wayland will be in comparison. :P

          Comment


          • #20
            Originally posted by Yfrwlf View Post
            When you browse menus the active window doesn't lose focus, at least not in Gnome. All of GTK, the entire interface, needs to have responsiveness above what any running program gets. I assume for this to happen you would need to make sure Xorg gets top priority, and perhaps some other things like gnome-panel for Gnome and similar for KDE.

            Xorg sure does use a lot of CPU. I wonder just how CPU-hungry Wayland will be in comparison. :P
            First: the system does not work with the active window pid itself. it has a active processes list which contains the last n processes active. default config is 5, so when you switch between two programs which is very common, these two will both be in the active group.

            so, even when x will not set the property on the menu windows, the focus information is not lost.

            there are already rules that add ui apps of kde and gnome to a ui group that has more priority then any other running program, so switching desktops etc always feels fast.

            xserver itself is placed in the group system.essential which gets lots of cpu shares.

            Comment


            • #21
              Originally posted by poelzi View Post
              First: the system does not work with the active window pid itself. it has a active processes list which contains the last n processes active. default config is 5, so when you switch between two programs which is very common, these two will both be in the active group.

              so, even when x will not set the property on the menu windows, the focus information is not lost.

              there are already rules that add ui apps of kde and gnome to a ui group that has more priority then any other running program, so switching desktops etc always feels fast.

              xserver itself is placed in the group system.essential which gets lots of cpu shares.
              Sounds like a pretty good set-up. Have something to make the focused process get the most attention, something to give other recently-active processes a lot of attention, and something to give all of the core UI processes high priority. I think tweaking that basic structure would be pretty much most all that is needed as far as process priority.

              Rest of the improvements for desktop responsiveness I'd think would be in anticipation of app launching by pre-loading, memory pre-allocation, hard disk data structuring to become more readily available (grouping most often used apps close together), and general app speed-ups utilizing multi-threading/parallelization and removing bloat and such.

              Comment


              • #22
                few questions

                Hi, I just run into your project and installed it immediately... It looks very interesting...

                I have few questions:

                1. First time I run it it crashed my box, xserver hangt, I had to reboot the box. Second time I run it from virtual text terminal, this time without problems. Was it just coincidence?

                2. I run ulatencyd with -vv, but it printed messages only after start and no message since. Is it correct behavior? If it is, how can I know it is doing anything?

                3. Is common user supposed to edit any config file or anything?

                OK, that is all I have for now, take care

                Tibor

                Comment


                • #23
                  Originally posted by TiborB View Post
                  Hi, I just run into your project and installed it immediately... It looks very interesting...

                  I have few questions:

                  1. First time I run it it crashed my box, xserver hangt, I had to reboot the box. Second time I run it from virtual text terminal, this time without problems. Was it just coincidence?
                  That is extremely strange. Most likely the x server crashed when the xwatch plugin
                  connected to the xserver, but I really don't see why. The worst thing that can happen is that some garbage cookie would be send, but the x server really should not crash there.

                  Originally posted by TiborB View Post
                  2. I run ulatencyd with -vv, but it printed messages only after start and no message since. Is it correct behavior? If it is, how can I know it is doing anything?
                  I added some checks for the system capabilities on trunk. could you test there again. The debug levels changed, so -vv will print debug output now, and then at least every interval which is 10 secs default you should see some output.

                  Originally posted by TiborB View Post
                  3. Is common user supposed to edit any config file or anything?
                  If you don't have cgroups mounted on some special place, there is nothing to do.
                  See the Faq.

                  Comment


                  • #24
                    linux-containers conflicts?

                    Hi, I would like to try ULatencyD, but on the FAQ I read "You will not be able to run a different cgroups agent in parallel." Does this mean I will have problems with the linux-containers I'm using?
                    Thanks

                    Comment


                    • #25
                      Originally posted by kbios View Post
                      Hi, I would like to try ULatencyD, but on the FAQ I read "You will not be able to run a different cgroups agent in parallel." Does this mean I will have problems with the linux-containers I'm using?
                      Thanks
                      That depends. If you are running it inside a container und the container system allows you to use cgroups, that should be fine.
                      If it is run on the host, you surely need a new scheduler configuration that takes into account that a process never ever gets moved outside the container it was created. I never looked into the namespace stuff, so i can honestly say: i don't know.
                      In general, it can work, at least it can be configured that way :-)

                      Comment


                      • #26
                        Originally posted by poelzi View Post
                        That depends. If you are running it inside a container und the container system allows you to use cgroups, that should be fine.
                        If it is run on the host, you surely need a new scheduler configuration that takes into account that a process never ever gets moved outside the container it was created. I never looked into the namespace stuff, so i can honestly say: i don't know.
                        In general, it can work, at least it can be configured that way :-)
                        Thanks for your reply! I checked my setup and I found that all container processes are children of lxc-start. So would it be possible to write a rule (is it this what you mean with "new scheduler configuration"?) that prevents process that are child of lxc-start from being manipulated by ulatencyd? I searched the docs but I couldn't find anything like this. Thanks

                        Comment


                        • #27
                          Hi Poelzi,
                          thanks for you prompt respond.

                          I installed today's version and indeed it is more verbose. Also, I started it from within Xserver and no crash this time.

                          I have another questions ...

                          1) What if I start (by mistake or by chance) second instance of ulatencyd?

                          2) what if there are two Xservers run on one box?

                          3) I must admit I'm not much familiar with cgroups and even what exactly your tool is doing. So I dont understand how your tool knows which application is "good" and which is "bad". For example, how it distinguishes opera from linuxdcpp or from some mp3 playing program... The active windows is not allways the right test, because mp3 player might not be in active window yet it needs some preference. Or do you have some list of applications split into some groups?

                          4) Do you trust ulatencyd that it would not do any serious harm? In other words, can I put it in the list of services started after boot of my box?

                          5) Is it possible to measure effect of ulatencyd? Probably not I think...

                          So these are my questions that accumulated in my head during the day

                          For your information - perhaps you can mentioned it somewhere - I found that for Arch Linux two PKGBUILDS were created in AUR (arch linux users will understand what it means) - ulatencyd and ulatencyd-git (http://aur.archlinux.org/packages.php)

                          That is all I have , thanks

                          Tibor

                          Comment


                          • #28
                            Hi Poelzi,

                            thanks for you prompt respond.

                            I installed today's version and indeed it is more verbose. Also, I started it from within Xserver and no crash this time.

                            I have another questions ...

                            1) What if I start (by mistake or by chance) second instance of ulatencyd?

                            2) what if there are two Xservers run on one box?

                            3) I must admit I'm not much familiar with cgroups and even what exactly your tool is doing. So I dont understand how your tool knows which application is "good" and which is "bad". For example, how it distinguishes opera from linuxdcpp or from some mp3 playing program... The active windows is not allways the right test, because mp3 player might not be in active window yet it needs some preference. Or do you have some list of applications split into some groups?

                            4) Do you trust ulatencyd that it would not do any serious harm? In other words, can I put it in the list of services started after boot of my box?

                            5) Is it possible to measure effect of ulatencyd? Probably not I think...

                            So these are my questions that accumulated in my head during the day

                            For your information - perhaps you can mentioned it somewhere - I found that for Arch Linux two PKGBUILDS were created in AUR (arch linux users will understand what it means) - ulatencyd and ulatencyd-git (http://aur.archlinux.org/packages.php)

                            That is all I have , thanks

                            Tibor

                            Comment


                            • #29
                              sorry for double post, it was confused because the first one did not show up immediately after I posted it..

                              I have small comment to your FAQ 1.1. Your command returns here

                              ERROR: Unknown user-defined format specifier "cgroup".

                              Probably my ps is not new enough, ps -V returns:

                              procps version 3.2.8

                              This is neither your problem nor big problem, but some users can also run into this.... I just note that I have up-to-date arch linux

                              Comment


                              • #30
                                Originally posted by TiborB View Post
                                ERROR: Unknown user-defined format specifier "cgroup".

                                Probably my ps is not new enough, ps -V returns:

                                procps version 3.2.8

                                This is neither your problem nor big problem, but some users can also run into this.... I just note that I have up-to-date arch linux
                                It seems that debian has patches for cgroups support that are not official.
                                Once i get time to write user programs i will add something that shows that :-)

                                Comment

                                Working...
                                X