Home » Web Hosting » How to Unlock Frequency Limits on CentOS Servers?
Blog
Hosting News & Trends

Web Hosting

How to Unlock Frequency Limits on CentOS Servers?

Unlocking frequency limits on CentOS servers enhances CPU performance significantly. Typically, CPUs operate within a range of 1.2GHz to 3.6GHz, but unlocking frequency limits ensures a stable speed of 2.2GHz. Tools like cpupower make it simple to adjust CPU settings, while optimizing BIOS settings further boosts performance. This approach is particularly beneficial for handling demanding workloads on a Hong Kong Dedicated Server.

Key Takeaways

  • Removing CPU speed limits on CentOS servers can boost performance.

  • Use the cpupower tool to view and change CPU settings.

  • Change BIOS settings to turn off power-saving modes. This helps the CPU run faster.

Understanding CPU Frequency Scaling and Limits

What Is CPU Frequency Scaling?

CPU frequency scaling means changing the processor’s speed based on tasks. It helps balance power use and performance. For light tasks, the CPU slows down to save energy. For heavy tasks, it speeds up to work faster.

There are two main ways to scale CPU frequency: Dynamic Frequency Scaling (DFS) and Dynamic Voltage and Frequency Scaling (DVFS). The table below explains these terms:

Term

Definition

Dynamic Frequency Scaling (DFS)

A method that changes the processor’s speed automatically to save energy and reduce heat.

Dynamic Voltage and Frequency Scaling (DVFS)

A way to adjust power and speed settings to save energy and use resources better.

The CPU’s power use is calculated with this formula:
C·V²·A·f, where:

  • C = how much charge is used per cycle

  • V = voltage

  • A = how often switches happen per cycle

  • f = clock speed

This scaling saves energy and stops overheating, especially during heavy use.

Why Do Frequency Limits Exist on CentOS Servers?

CentOS servers set frequency limits to keep the system safe. These limits stop the CPU from overheating or using too much power. The CentOS system uses tools like “powersave” or “ondemand” to control these limits. These tools save energy but may slow the CPU during tough tasks.

Removing these limits lets the CPU run at full speed all the time. But you need good cooling and hardware to avoid overheating or problems.

Identifying and Changing CPU Speed Settings

Checking Current CPU Speed and Governor Settings

To unlock CPU speed limits, first check current settings. These settings control how the CPU adjusts speed for tasks. Use the cpupower tool to see details about your CPU’s speed and governors.

Run these commands to check your CPU’s speed and settings:

cpupower frequency-info --freq  cpupower frequency-info --governors  cpupower frequency-info --policy  

The first command shows the CPU’s speed in kilohertz (KHz). The second lists governors like “powersave” or “performance.” The third shows the active governor and policy. These commands help you see if your system saves energy or runs at full power.

Here’s a table of helpful cpupower commands:

Command

What It Does

cpupower frequency-info --freq

Shows the current CPU speed in KHz.

cpupower frequency-info --governors

Lists governors for managing CPU speed.

cpupower frequency-info --policy

Shows the active governor and CPU policy.

cpupower frequency-info --driver

Displays the CPU driver in use.

cpupower frequency-info --hwfreq

Shows hardware-reported CPU speed in KHz (needs root).

Knowing these settings helps improve server performance. For example, a study showed IBM servers with the same CPU as Intel performed better. This was due to better BIOS settings for power management. This proves how important proper configuration is for CPU speed.

Switching the CPU Governor to ‘Performance’

Changing the CPU governor to “performance” makes the CPU run at top speed. This setting stops speed changes and keeps the CPU at its highest level. It’s great for tasks needing steady power.

Follow these steps to set the governor to “performance”:

  1. Load the right CPU driver with this command:

    modprobe intel_pstate  
  2. Install cpupowerutils if it’s missing:

    yum install cpupowerutils  
  3. Check available governors to find “performance”:

    cpupower frequency-info --governors  
  4. Set the governor to “performance”:

    cpupower frequency-set --governor performance  
  5. Confirm the change with:

    cpupower frequency-info  

These steps make sure your CPU runs at full speed. But this uses more power and creates more heat. Make sure your system has good cooling to avoid problems.

Automating CPU Speed Settings on CentOS 7

Manually setting the CPU governor every time is tiring. Automating this ensures your server always runs at full speed. On CentOS 7, you can automate this with a systemd service.

Here’s how to automate it:

  1. Create a new systemd service file:

    sudo nano /etc/systemd/system/cpufreq.service  
  2. Add this content to the file:

    [Unit]  Description=Set CPU governor to performance  After=multi-user.target    [Service]  Type=oneshot  ExecStart=/usr/bin/cpupower frequency-set --governor performance    [Install]  WantedBy=multi-user.target  
  3. Save and close the file.

  4. Enable the service to start at boot:

    sudo systemctl enable cpufreq.service  
  5. Start the service now:

    sudo systemctl start cpufreq.service  

This setup ensures the “performance” governor is always active. It’s a simple way to keep your server running at its best without extra work.

Below is a chart showing how CPU speed settings affect performance:

By automating CPU settings, you can unlock speed limits and keep your CentOS 7 server running at full power.

Configuring BIOS to Unlock Frequency Limits

Changing BIOS settings is key to improving CPU performance. The BIOS connects your hardware to the operating system. It controls how the CPU and other parts work. Adjusting these settings removes limits and helps the CPU handle tough tasks better.

Turning Off Power-Saving Features in BIOS

Power-saving features in BIOS save energy but slow the CPU. Turning them off lets the CPU run at full speed. Below is a table of important BIOS settings to change:

Setting

Description

System Profile

Sets the system for top performance, ignoring power saving.

C-States

Manages CPU idle power; can be on, auto, or off.

Turbo Mode

Temporarily boosts CPU speed above its normal limit.

Power/Performance Bias

Balances power use and performance with different control options.

To turn off these features, open BIOS during startup (press F2, F10, or DEL). Go to “Power Management” or “Advanced” settings. Turn off C-States and set System Profile to “Performance.” Turn on Turbo Mode to let the CPU go faster when needed. These changes unlock limits and improve performance.

Tip: Check your motherboard manual for exact steps to change BIOS settings.

Using Performance Modes for Better CPU Speed

Modern BIOS versions have performance modes for faster CPU speeds. These modes focus on speed, not saving energy. Look for “Performance Mode” or “Intel Turbo Boost Technology” in BIOS. These settings help the CPU adjust speed based on workload.

Steps to enable performance modes:

  1. Open BIOS during startup.

  2. Find the “Performance” or “CPU Configuration” section.

  3. Turn on Intel Turbo Boost Technology and set performance mode to “Maximum Performance.”

  4. Save changes and exit BIOS.

These settings help the CPU handle heavy tasks without limits. But they may use more power and create more heat. Make sure your cooling system works well to avoid problems.

Checking Hardware Compatibility for BIOS Changes

Before changing BIOS, check if your hardware supports these settings. Some CPUs or motherboards don’t support Turbo Mode or Intel Turbo Boost Technology. Look at your CPU and motherboard specs to confirm.

Also, make sure your CentOS kernel version supports these changes. Older kernels might not use the unlocked CPU features fully. Update to the latest CentOS kernel for better results. If your hardware doesn’t support these features, consider upgrading it.

Note: Back up your BIOS settings before making changes. This way, you can restore them if needed.

By setting up your BIOS correctly, you can unlock CPU limits and boost server performance. With good cooling and compatible hardware, your CentOS server will run at its best.

Testing and Checking Changes

After removing frequency limits, test your CentOS server. This ensures the changes work well and the system stays stable. Testing confirms the settings are applied and the server runs efficiently.

Checking CPU Frequency with cpupower

Use cpupower to check if the CPU changes worked. This tool shows details like the CPU governor and clock speeds. Below is a table explaining how to verify settings:

Method

What It Does

cat command

Checks CPU governor settings on RHEL 6 and 7.

cpupower command

Shows CPU governor settings and clock speeds.

Check clock speed per core

Verifies the speed of each CPU core.

Run this command to see the active governor and frequency:

cpupower frequency-info  

This command shows the current speed and if “performance” mode is active. Use it to confirm your CPU is running at the right speed.

Watching System Performance and Stability

Keep an eye on your system after making changes. Tools like htop or sar help monitor CPU use, memory, and disk activity. Set goals like checking CPU speeds and temperatures. Key things to watch include:

  • Real-time resource usage tracking.

  • Alerts for quick problem-solving.

  • Long-term performance tracking for better optimization.

You can also use benchmarking tools to measure improvements. Test your server before and after changes to see the difference. This helps you understand how much better your server performs.

Fixing Problems After Changes

Sometimes, problems happen after changing CPU settings. These might include overheating, crashes, or errors. Here are some ways to fix common issues:

  • Check error logs if the server crashes or won’t start.

  • Make sure your cooling system can handle extra heat.

  • Restart the cpufreq service if it’s not working:

    sudo systemctl restart cpufreq.service  
  • If the governor switches back to “ondemand,” reset it to “performance” and automate it with a systemd service.

For bigger problems like kernel crashes, use server tools to find the issue. Logs can help you figure out what’s wrong and fix it.

By testing and checking your changes, you can make sure your CentOS server runs fast and stays stable.

To unlock CPU frequency limits on CentOS servers, you need to check settings, change to the “performance” governor, automate tasks, and adjust BIOS options. It’s important to balance speed with cooling and stability.

Tip: Keep an eye on your server’s temperature and performance. This helps avoid overheating and keeps it running smoothly.

FAQ

What happens if you don’t turn off power-saving features in BIOS?

Power-saving features slow down the CPU. If left on, your server might perform poorly during heavy tasks. This lowers efficiency and slows down important work.

Can unlocking CPU frequency limits harm your hardware?

Unlocking limits makes the CPU use more power and heat up. Without good cooling, your hardware could overheat or wear out faster. Always check if your cooling system can handle the extra heat.

How do you reset CPU settings to default?

Use this command to reset the CPU:

cpupower frequency-set --governor ondemand  

You can also reset BIOS by choosing “Load Default Settings” in the BIOS menu.

Tip: Save your BIOS settings before making any changes.