Announcement

Collapse
No announcement yet.

Linux's "Ondemand" Governor Is No Longer Fit

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

  • #46
    Originally posted by Ericg View Post
    I'm just reading off the number from htop at the top, so if it automatically pulls out cache & buffers-- then yes. As good with linux as I have gotten over the years...I have yet to figure out how exactly memory reporting works to get a "real" answer ><.

    Whats a good utility that will print out either the ram minus the cache and buffers, or that will print them side by side so I know what to subtract from the readout?
    its a bit complicated to get the actual memory usage, as described here
    http://www.halobates.de/memorywaste.pdf

    i got 4gigs and no swap
    computer starts struggling around 3.6 and freezes or kills a process around 3.7, as reported by htop

    Comment


    • #47
      Originally posted by ChrisXY View Post
      Code:
       $ free -m
                   total       used       free     shared    buffers     cached
      Mem:         32070      30045       2025          0        154      25945
      -/+ buffers/cache:       3945      28125
      Swap:            0          0          0
      Some ~4 GB are buffers and some ~26 GB are cached files. I think (used - cached + free ~= actual free) and that buffers is stuff that needs to be written somewhere before it can be cleared?
      When I took this measure, htop was reporting about ~812mb of RAM used, of 3277 total, so it was saying about 2,465mb free.

      Code:
      [eric@eric-laptop ~]$ free -m
                   total       used       free     shared    buffers     cached
      Mem:          3277       1849       1428          0          0       1033
      -/+ buffers/cache:        815       2462
      Swap:         3906          0       3906
      So used - cache + free equals actual free? 1849 - 1033 + 1428? 2,244-- about the same that htop was saying, actually a little less free.

      This was fresh-booting to an Arch x64 KDE (4.10.3) desktop and playing around a little bit with Docky, moving items around and the likes. No other programs had been opened (other than htop obviously to check it) since it first booted up.


      EDIT:

      After being in firefox and posting this original post I double checked it just so we'd have a "before and after" snapshot. Htop is currently sitting at 1178mb used, of 3277. and free -m reports...

      Code:
      [eric@eric-laptop ~]$ free -m
                   total       used       free     shared    buffers     cached
      Mem:          3277       2324        953          0          0       1140
      -/+ buffers/cache:       1183       2094
      Swap:         3906          0       3906
      EDIT 2: Btw, this was with ZRAM disabled, so nothing "extra" is purposefully sucking up RAM.
      Last edited by Ericg; 05-23-2013, 02:02 AM.

      Comment


      • #48
        So, what about those power/performance benchmarks, Michael?

        Comment


        • #49
          Originally posted by Ericg View Post
          So used - cache + free equals actual free?
          No, what I wrote is pretty much nonsense. I shouldn't be allowed to post late at night.

          What I meant to say was: cached + free is about the free ram, because cached is that ram that can be free'd quickly when demand is there and it contains stuff like files/directory listings you had opened recently.

          The issue is only that free displays ram as used when it really is "used", even by stuff that can be safely discarded.

          Comment


          • #50
            That's why free displays the "-/+ buffers/cache" line. Those numbers are the "proper" used ones*.

            * Except if you're making use of tmpfs, which is listed as cache, but cannot be freed on demand.

            Comment


            • #51
              Originally posted by curaga View Post
              * Except if you're making use of tmpfs, which is listed as cache, but cannot be freed on demand.
              Hm, a few days ago I had high memory usage that free showed as cache, but I didn't find it anywhere in any of my tmpfs mounts and going to rescue.target cleared it. I just had the thought that maybe there were files in a tmpfs that got marked deleted so I didn't see them... As long as a process has it open / a link in /proc/pid/fd/, it will still be displayed as cached, right?

              Comment


              • #52
                Yes, undead files is another case where the numbers are wonky.

                Comment


                • #53
                  I've disabled cpufreq completely in the kernel and my CPU still clocks down and up as needed according to load (i5 2500K). It also seems to clock in-between. With slight load, it won't go to max, but for example only to 2Ghz.

                  So what's the cpufreq driver good for anyway? Especially with the on-demand governor. The chip seems to do this on its own anyway.

                  Comment


                  • #54
                    You have one or more of
                    a) good BIOS
                    b) the intel-idle driver

                    Those still leave out a lot of cpus.

                    Comment


                    • #55
                      Hmm. Running 3.11 and now that ondemand is not available anymore my cpu is several degrees hotter than before.

                      Comment


                      • #56
                        ^ edit: I mean 3.10, of course.

                        Comment


                        • #57
                          Using the new p-states driver with 3.9.7 here.

                          It actually does a pretty good job for normal multitasking loads, but I want more control for intensive, multi-threaded applications (like video transcoding with HandBrakeCLI). indicator-cpufreq seems capable of interacting with it, and shows two options: powersave and performance (although clicking on one does not remove the selection bullet from the other...).
                          Performance ramps up a little more quickly than powersave, perhaps, but I can't really see much difference between the two. Powersave does not limit the cpu; under load my CPU will (eventually) reach top speed and critical temperatures.

                          The overheating takes more time than with ondemand's "performance" or "conservative" options, but the ondemand driver could limit the cpu to a specific speed so as to continue demanding tasks over a longer time. With the p-states driver, I have to give up on certain tasks or seriously improve my cooling situation.

                          Comment


                          • #58
                            Originally posted by quequotion View Post
                            Using the new p-states driver with 3.9.7 here.

                            It actually does a pretty good job for normal multitasking loads, but I want more control for intensive, multi-threaded applications (like video transcoding with HandBrakeCLI). indicator-cpufreq seems capable of interacting with it, and shows two options: powersave and performance (although clicking on one does not remove the selection bullet from the other...).
                            Performance ramps up a little more quickly than powersave, perhaps, but I can't really see much difference between the two. Powersave does not limit the cpu; under load my CPU will (eventually) reach top speed and critical temperatures.

                            The overheating takes more time than with ondemand's "performance" or "conservative" options, but the ondemand driver could limit the cpu to a specific speed so as to continue demanding tasks over a longer time. With the p-states driver, I have to give up on certain tasks or seriously improve my cooling situation.
                            You should never have to rely on a cpufreq governor to prevent overheating. This is not their purpose.
                            Sounds like you have a serious cooling issue.

                            Comment


                            • #59
                              Originally posted by dalingrin View Post
                              Sounds like you have a serious cooling issue.
                              Yes/No, I have an environment problem. My i2 2700K is overclocked to 4.8Ghz in turbo, which is fine for moderate amounts of time because the system is liquid cooled. Unfortunately, liquid cooling has limitations, like ambient room temperature. I don't have air conditioning, so in the summer my apartment gets up to 40C, at which point cooling fails. On the really hot days, rather than reconfigure overclocking in BIOS, I just set a temporary limit with the governor. This may not be possible with the p-states driver.

                              Comment


                              • #60
                                Its a pity Ubuntu 13.10 disabled pstate due to some complaints on Launchpad but which were not substantiated.Although it can be enabled via kernel adding intel_pstate=enable. Pstate runs far better and the system response is very good, combine that with Thermal Daemon from Intel and the temps are kept very nicely under control. I use this on Manjaro currently with kernel 3.11 on a Intel i7 laptop and I find the system response to be excellent with pstate as compared to ondemand.

                                Comment

                                Working...
                                X