Announcement

Collapse
No announcement yet.

Why does GIMP use xorg so much?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Why does GIMP use xorg so much?

    When using the GIMP perspective tool, I see that xorg uses up to 45-50% of the CPU. This is during the time
    when you pull the corners of the image around to pick the shape you want. Afterwards, when you click to
    do it, then the CPU is used principally by Gimp.

    I thought xorg was just for displaying things, that the calculation for the perspective changing would be
    attributed to Gimp by the system monitor.

    So what is happening?

    The result is that the Perspective Tool is unusably slow.

    Help, please.

    I have an Intel DC 5400 with 4GB RAM, using Kubuntu 10.04, 64-bit.

    Edited to shorten lines --GreyGeek
    'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

    #2
    Re: Why does GIMP use xorg so much?

    Yes, I just tried it on my new rig, which is an i7-950 overclocked to 4.2GHz, 6GB of RAM, and a big Nvidia
    GPU. Even with all that hardware, the visual deformation, on a 2560x1707 photo, is fairly laggy.

    Few computing tasks are as CPU-intensive as graphics manipulation - think of CAD workstations and so
    forth. This tool is obviously using mathmatical algorithms to translate your inputs to a visual re-display of
    the deformed image. That's going to hog your CPU, similar to other large image manipulations, video
    encoding, etc. You are right -- Xorg is just the display function, but behind it the CPU is working hard to do
    a zillion calculations to determine what Xorg should be showing you. This is not really a "fixable" situation
    -- assuming plenty of memory is installed, the CPU clock rate is pretty much going to determine the speed. I
    don't know how much gimp (and its tools) are opimized to take advantage of multi-core CPUs and
    hyperthreading -- those could help, potentially.

    To do the best you can with your existing hardware, about all you could do is install some minimalist
    desktop like Xfce, shut down all non-needed packages, and then run gimp that way. KDE 4 is not helping
    your CPU handle the gimp workload, in this case .... :P

    Comment


      #3
      Re: Why does GIMP use xorg so much?

      Thanks for your analysis, Dibl. What slays me tho is that the perspective tool works better with Gimp under
      Windows 7 on the same hardware. Nobody is going to claim that Windows is a light-weight. Is KDE 4 actually
      heavier than Windows?

      I see xfce is in the Kubuntu repos. If I install it, then will I have a chance to choose it at logon time?

      If you run lscpu, what do you see for your CPU MHz? I see 1200.000, but the chip is sold as a 2.7GHz cpu.

      Could I have a problem here?

      Thanks again ... again.
      'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

      Comment


        #4
        Re: Why does GIMP use xorg so much?

        Depending on how Windows is driving your CPU and graphics (i.e. how well and complete the driver
        software was written), there could be some differences -- it's a different OS.

        Here's the output of /proc/cpuinfo for the first of 4 cores:


        Code:
        don@aptosidbox:~$ cat /proc/cpuinfo
        processor    : 0
        vendor_id    : GenuineIntel
        cpu family   : 6
        model      : 26
        model name   : Intel(R) Core(TM) i7 CPU     950 @ 3.07GHz
        stepping    : 5
        cpu MHz     : 4217.632
        cache size   : 8192 KB
        physical id   : 0
        siblings    : 4
        core id     : 0
        cpu cores    : 4
        apicid     : 0
        initial apicid : 0
        fpu       : yes
        fpu_exception  : yes
        cpuid level   : 11
        wp       : yes
        flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx
         fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology 
        nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt 
        lahf_lm dts tpr_shadow vnmi flexpriority ept vpid
        bogomips    : 8435.26
        clflush size  : 64
        cache_alignment : 64
        address sizes  : 36 bits physical, 48 bits virtual
        power management:
        As I have seen on other Intel CPUs, the default frequency is part of the model name, but the actual running
        frequency is shown two lines down.

        If yours is not showing the frequency that you thought it was running, and the BIOS is supporting
        overclocking, you might want to take a look at this: http://www.linux-magazine.com/Online/Blogs
        /Productivity-Sauce/Power-Management-with-cpufrequtils

        Comment


          #5
          Re: Why does GIMP use xorg so much?

          My Sony VAIO is a 64bit dual core with CPU speeds of 1.6Ghz each. lscpu give:
          Code:
          $ lscpu
          Architecture:     x86_64
          CPU op-mode(s):    32-bit, 64-bit
          CPU(s):        2
          Thread(s) per core:  1
          Core(s) per socket:  2
          CPU socket(s):     1
          NUMA node(s):     1
          Vendor ID:       GenuineIntel
          CPU family:      6
          Model:         23
          Stepping:       6
          CPU MHz:        2266.000
          Virtualization:    VT-x
          L1d cache:       32K
          L1i cache:       32K
          L2 cache:       3072K
          $
          "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
          – John F. Kennedy, February 26, 1962.

          Comment


            #6
            Re: Why does GIMP use xorg so much?

            This is amazing! lscpu says my cpu is running at 1200 MHz and

            cat /proc/cpuinfo
            processor : 0
            vendor_id : GenuineIntel
            cpu family : 6
            model : 23
            model name : Pentium(R) Dual-Core CPU E5400 @ 2.70GHz
            stepping : 10
            cpu MHz : 1200.000
            cache size : 2048 KB

            says 1200 also. Yet the cpu is sold for 2700 MHz! What in the world is going on here? Is each core running half of the 2.7GHz? I do not understand. Any ideas, anyone?

            And GreyGeek's result,of 2266MHz for 2 cpus at 1600MHz apiece is quite odd too?

            I see in 'man lscpu' that it says

            BUGS
            The program at the moment does not handle the system installed with different types of physical processors.

            What in the world does that mean? GreyGeek, could you look at /proc/cpuinfo? And dibl, could you run lscpu? Thanks.
            'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

            Comment


              #7
              Re: Why does GIMP use xorg so much?

              I have been scrounging around in Google for dual-core clock articles. Altho nobody quite says so, it seems like each core of a dual-core cpu uses slightly less than half the stated frequency of the cpu. So a 2.4GHz machine will have two 1.2GHz cores. This is different from a multi-pro, where each processor has access to all clock ticks. Agreed so far?

              So why does GreyGeek see 2266MHz in /proc/cpuinfo for dual cores each at 1.6GHz? 1.6*2 = at least 3.2, not 2.3. And my cpuinfo shows 1.2, the same as for each core, if my interpretation of lscpu is correct, that it gives the max speed of one core.

              On dibl's implied suggestion, I installed cpufrequtils. This gives

              $ cpufreq-info
              cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 2004-2009
              Report errors and bugs to cpufreq@vger.kernel.org, please.
              analyzing CPU 0:
              driver: acpi-cpufreq
              CPUs which run at the same hardware frequency: 0
              CPUs which need to have their frequency coordinated by software: 0
              maximum transition latency: 160 us.
              hardware limits: 1.20 GHz - 1.90 GHz
              available frequency steps: 1.90 GHz, 1.20 GHz
              available cpufreq governors: conservative, ondemand, userspace, powersave, performance
              current policy: frequency should be within 1.20 GHz and 1.90 GHz.
              The governor "ondemand" may decide which speed to use
              within this range.
              current CPU frequency is 1.20 GHz.
              cpufreq stats: 1.90 GHz:1.10%, 1.20 GHz:98.90% (1)
              analyzing CPU 1:
              driver: acpi-cpufreq
              CPUs which run at the same hardware frequency: 1
              CPUs which need to have their frequency coordinated by software: 1
              maximum transition latency: 160 us.
              hardware limits: 1.20 GHz - 1.90 GHz
              available frequency steps: 1.90 GHz, 1.20 GHz
              available cpufreq governors: conservative, ondemand, userspace, powersave, performance
              current policy: frequency should be within 1.20 GHz and 1.90 GHz.
              The governor "ondemand" may decide which speed to use
              within this range.
              current CPU frequency is 1.20 GHz.
              cpufreq stats: 1.90 GHz:1.10%, 1.20 GHz:98.90% (1)

              This seems to allow each core to go up to 1.9GHz, tho I am ~90% (whatever that means) at 1.2GHz. I don't see where it says which governor is serving at the moment.

              As far as Gimp goes, it seems to use only one core, so it turns at 1.2GHz. Maybe the Windows version uses both, I have no idea how to see this sort of thing in Windows.

              If that's the case, I'm better off running Gimp under Windows. How sad...
              'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

              Comment


                #8
                Re: Why does GIMP use xorg so much?

                Code:
                root@aptosidbox:/home/don# lscpu
                Architecture:     x86_64
                CPU op-mode(s):    32-bit, 64-bit
                CPU(s):        4
                Thread(s) per core:  1
                Core(s) per socket:  4
                CPU socket(s):     1
                NUMA node(s):     1
                Vendor ID:       GenuineIntel
                CPU family:      6
                Model:         26
                Stepping:       5
                CPU MHz:        4217.632
                Virtualization:    VT-x
                L1d cache:       32K
                L1i cache:       32K
                L2 cache:       256K
                L3 cache:       8192K
                For cpufreq settings, "ondemand" is what it usually defaults to. That works well on my Intel X6800 CPU, which is on an Intel mobo. This i7-950, on an Asus P6X58D-E mobo, does not slow down (BIOS overclocking overrides cpufreq settings), so it stays at the high frequency. Although "ondemand" should allow the CPU to speed up to handle gimp work, you might try setting "performance" and see if it makes any difference. Yes, gimp is probably written for single-threaded operation so only one core (at a time) is going to do the work. The only app I've run lately that was obviously coded to use multiple cores is Devede.

                Comment


                  #9
                  Re: Why does GIMP use xorg so much?

                  The reason why GreyGeek's says "2266" is because GreyGeek's memory isn't what it used to be.
                  He "thought" his CPUs were 1.6GHz, but where he recalled that from he does not know. A "cat /proc/cpuinfo" shows:
                  Code:
                  $ cat /proc/cpuinfo 
                  processor    : 0
                  vendor_id    : GenuineIntel
                  cpu family   : 6
                  model      : 23
                  model name   : Intel(R) Core(TM)2 Duo CPU   P8400 @ 2.26GHz
                  stepping    : 6
                  cpu MHz     : 800.000
                  cache size   : 3072 KB
                  physical id   : 0
                  siblings    : 2
                  core id     : 0
                  cpu cores    : 2
                  apicid     : 0
                  initial apicid : 0
                  fpu       : yes
                  fpu_exception  : yes
                  cpuid level   : 10
                  wp       : yes
                  flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx
                   fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 
                  monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm tpr_shadow vnmi flexpriority
                  bogomips    : 4517.82
                  clflush size  : 64
                  cache_alignment : 64
                  address sizes  : 36 bits physical, 48 bits virtual
                  power management:
                  
                  processor    : 1
                  vendor_id    : GenuineIntel
                  cpu family   : 6
                  model      : 23
                  model name   : Intel(R) Core(TM)2 Duo CPU   P8400 @ 2.26GHz
                  stepping    : 6
                  cpu MHz     : 800.000
                  cache size   : 3072 KB
                  physical id   : 0
                  siblings    : 2
                  core id     : 1
                  cpu cores    : 2
                  apicid     : 1
                  initial apicid : 1
                  fpu       : yes
                  fpu_exception  : yes
                  cpuid level   : 10
                  wp       : yes
                  flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx 
                  fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64
                   monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 lahf_lm tpr_shadow vnmi flexpriority
                  bogomips    : 4518.71
                  clflush size  : 64
                  cache_alignment : 64
                  address sizes  : 36 bits physical, 48 bits virtual
                  power management:
                  $
                  Sorry about that. So much for "off the top of my head"...
                  "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                  – John F. Kennedy, February 26, 1962.

                  Comment


                    #10
                    Re: Why does GIMP use xorg so much?

                    I finally contacted a former collegue, who put me onto cpuburn. It can be installed from the Kubuntu repos and will give a cpu a run for its money. The program in my case is burnP6. Running it once made one of my cpus jump to 1.9GHz; twice, both of them.

                    So I did what I had been putting off, because I was a little afraid of it, and updated the BIOS on my motherboard. Lo, behold, now with burnP6, the CPU runs at 2.7GHz like it's supposed to. And running two burnP6 processes makes both processors run at 2.7HGHz.

                    The bad news is that Gimp is still slow. Running the perspective tool can push the CPU frequency up to 2.7GHz, but that does not seem to be enough for Gimp. Guess I do need a faster CPU.
                    'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

                    Comment

                    Working...
                    X