Results 1 to 4 of 4

Thread: Fix for laggy servers [will also increase your penis size by a factor 100000]

  1. #1
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts

    Fix for laggy servers [will also increase your penis size by a factor 100000]

    This might apply to all hetzner dedicated servers running ubuntu 14.04 (probably) and maybe more (just post your results)

    My server has been lagging like crazy for a few months now, ever since the reinstall of ubuntu. Turns out, it was running in powersaving mode.

    How to check:
    Code:
    sudo cpufreq-info
    Output should look like:
    Code:
    cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
    Report errors and bugs to cpufreq@vger.kernel.org, please.
    analyzing CPU 0:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 0
      CPUs which need to have their frequency coordinated by software: 0
      maximum transition latency: 0.97 ms.
      hardware limits: 1.60 GHz - 3.90 GHz
      available cpufreq governors: performance, powersave
      current policy: frequency should be within 1.60 GHz and 3.90 GHz.
                      The governor "powersave" may decide which speed to use
                      within this range.
      current CPU frequency is 1.63 GHz (asserted by call to hardware).
    analyzing CPU 1:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 1
      CPUs which need to have their frequency coordinated by software: 1
      maximum transition latency: 0.97 ms.
      hardware limits: 1.60 GHz - 3.90 GHz
      available cpufreq governors: performance, powersave
      current policy: frequency should be within 1.60 GHz and 3.90 GHz.
                      The governor "powersave" may decide which speed to use
                      within this range.
      current CPU frequency is 1.68 GHz (asserted by call to hardware).
    analyzing CPU 2:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 2
      CPUs which need to have their frequency coordinated by software: 2
      maximum transition latency: 0.97 ms.
      hardware limits: 1.60 GHz - 3.90 GHz
      available cpufreq governors: performance, powersave
      current policy: frequency should be within 1.60 GHz and 3.90 GHz.
                      The governor "powersave" may decide which speed to use
                      within this range.
      current CPU frequency is 1.68 GHz (asserted by call to hardware).
    analyzing CPU 3:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 3
      CPUs which need to have their frequency coordinated by software: 3
      maximum transition latency: 0.97 ms.
      hardware limits: 1.60 GHz - 3.90 GHz
      available cpufreq governors: performance, powersave
      current policy: frequency should be within 1.60 GHz and 3.90 GHz.
                      The governor "powersave" may decide which speed to use
                      within this range.
      current CPU frequency is 1.63 GHz (asserted by call to hardware).
    analyzing CPU 4:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 4
      CPUs which need to have their frequency coordinated by software: 4
      maximum transition latency: 0.97 ms.
      hardware limits: 1.60 GHz - 3.90 GHz
      available cpufreq governors: performance, powersave
      current policy: frequency should be within 1.60 GHz and 3.90 GHz.
                      The governor "powersave" may decide which speed to use
                      within this range.
      current CPU frequency is 1.68 GHz (asserted by call to hardware).
    analyzing CPU 5:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 5
      CPUs which need to have their frequency coordinated by software: 5
      maximum transition latency: 0.97 ms.
      hardware limits: 1.60 GHz - 3.90 GHz
      available cpufreq governors: performance, powersave
      current policy: frequency should be within 1.60 GHz and 3.90 GHz.
                      The governor "powersave" may decide which speed to use
                      within this range.
      current CPU frequency is 1.68 GHz (asserted by call to hardware).
    analyzing CPU 6:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 6
      CPUs which need to have their frequency coordinated by software: 6
      maximum transition latency: 0.97 ms.
      hardware limits: 1.60 GHz - 3.90 GHz
      available cpufreq governors: performance, powersave
      current policy: frequency should be within 1.60 GHz and 3.90 GHz.
                      The governor "powersave" may decide which speed to use
                      within this range.
      current CPU frequency is 1.63 GHz (asserted by call to hardware).
    analyzing CPU 7:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 7
      CPUs which need to have their frequency coordinated by software: 7
      maximum transition latency: 0.97 ms.
      hardware limits: 1.60 GHz - 3.90 GHz
      available cpufreq governors: performance, powersave
      current policy: frequency should be within 1.60 GHz and 3.90 GHz.
                      The governor "powersave" may decide which speed to use
                      within this range.
      current CPU frequency is 1.63 GHz (asserted by call to hardware).
    As you can see, all the cores are being throttled and run with the powersave governor.

    How to fix this:
    Code:
    sudo cpufreq-set -c 0 -g performance
    sudo cpufreq-set -c 1 -g performance
    sudo cpufreq-set -c 2 -g performance
    sudo cpufreq-set -c 3 -g performance
    sudo cpufreq-set -c 4 -g performance
    sudo cpufreq-set -c 5 -g performance
    sudo cpufreq-set -c 6 -g performance
    This will change the governor from powersave to performance, making the cpu throttle as little as possible. You could go on and change the minimum frequency, but this fix above is the main part. (make sure to run said command for all cores, in my case 0-7)

    Load has dropped from 80% of a single core for a bot serv to 25% of that same server, under the same conditions.

    Edit: this is after the fix:
    Code:
    cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
    Report errors and bugs to cpufreq@vger.kernel.org, please.
    analyzing CPU 0:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 0
      CPUs which need to have their frequency coordinated by software: 0
      maximum transition latency: 0.97 ms.
      hardware limits: 1.60 GHz - 3.90 GHz
      available cpufreq governors: performance, powersave
      current policy: frequency should be within 1.60 GHz and 3.90 GHz.
                      The governor "performance" may decide which speed to use
                      within this range.
      current CPU frequency is 3.70 GHz (asserted by call to hardware).
    analyzing CPU 1:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 1
      CPUs which need to have their frequency coordinated by software: 1
      maximum transition latency: 0.97 ms.
      hardware limits: 1.60 GHz - 3.90 GHz
      available cpufreq governors: performance, powersave
      current policy: frequency should be within 1.60 GHz and 3.90 GHz.
                      The governor "performance" may decide which speed to use
                      within this range.
      current CPU frequency is 3.54 GHz (asserted by call to hardware).
    analyzing CPU 2:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 2
      CPUs which need to have their frequency coordinated by software: 2
      maximum transition latency: 0.97 ms.
      hardware limits: 1.60 GHz - 3.90 GHz
      available cpufreq governors: performance, powersave
      current policy: frequency should be within 1.60 GHz and 3.90 GHz.
                      The governor "performance" may decide which speed to use
                      within this range.
      current CPU frequency is 3.43 GHz (asserted by call to hardware).
    analyzing CPU 3:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 3
      CPUs which need to have their frequency coordinated by software: 3
      maximum transition latency: 0.97 ms.
      hardware limits: 1.60 GHz - 3.90 GHz
      available cpufreq governors: performance, powersave
      current policy: frequency should be within 1.60 GHz and 3.90 GHz.
                      The governor "performance" may decide which speed to use
                      within this range.
      current CPU frequency is 3.81 GHz (asserted by call to hardware).
    analyzing CPU 4:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 4
      CPUs which need to have their frequency coordinated by software: 4
      maximum transition latency: 0.97 ms.
      hardware limits: 1.60 GHz - 3.90 GHz
      available cpufreq governors: performance, powersave
      current policy: frequency should be within 1.60 GHz and 3.90 GHz.
                      The governor "performance" may decide which speed to use
                      within this range.
      current CPU frequency is 3.17 GHz (asserted by call to hardware).
    analyzing CPU 5:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 5
      CPUs which need to have their frequency coordinated by software: 5
      maximum transition latency: 0.97 ms.
      hardware limits: 1.60 GHz - 3.90 GHz
      available cpufreq governors: performance, powersave
      current policy: frequency should be within 1.60 GHz and 3.90 GHz.
                      The governor "performance" may decide which speed to use
                      within this range.
      current CPU frequency is 3.12 GHz (asserted by call to hardware).
    analyzing CPU 6:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 6
      CPUs which need to have their frequency coordinated by software: 6
      maximum transition latency: 0.97 ms.
      hardware limits: 1.60 GHz - 3.90 GHz
      available cpufreq governors: performance, powersave
      current policy: frequency should be within 1.60 GHz and 3.90 GHz.
                      The governor "performance" may decide which speed to use
                      within this range.
      current CPU frequency is 3.22 GHz (asserted by call to hardware).
    analyzing CPU 7:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 7
      CPUs which need to have their frequency coordinated by software: 7
      maximum transition latency: 0.97 ms.
      hardware limits: 1.60 GHz - 3.90 GHz
      available cpufreq governors: performance, powersave
      current policy: frequency should be within 1.60 GHz and 3.90 GHz.
                      The governor "performance" may decide which speed to use
                      within this range.
      current CPU frequency is 3.81 GHz (asserted by call to hardware).
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  2. The Following 2 Users Say Thank You to IzNoGoD For This Useful Post:

    kung foo man (20th June 2015),Mitch (20th June 2015)

  3. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    PHP Code:
    apt-get install cpufrequtils 
    Click image for larger version. 

Name:	If-you-know-what-i-mean.png 
Views:	116 
Size:	57.6 KB 
ID:	868

    Just told someone to try it on a Server4You root, but it doesn't work out of the box (or not at all). It neither can read the CPU settings nor set them.
    timescale 0.01

  4. #3
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    When i try to install that i'm getting this:
    PHP Code:
    Setting up cpufrequtils (008-1) ...
     * 
    Loading cpufreq kernel modules...                                     [fail]
     * 
    disabledgovernor not available...                                          
     * 
    CPUFreq UtilitiesSetting ondemand CPUFreq governor...               [ OK ]
    Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
    Processing triggers for ureadahead (0.100.0-16) ... 
    But i'm using a VPS so it doesn't apply.
    Last edited by Mitch; 20th June 2015 at 12:51.

  5. #4
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    By default cpufrequtils tries to set the ondemand governor, which is not available on most systems. It might auto-switch to another. Just try to continue with the rest of the tutorial
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •