Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 06-14-2006, 02:40 PM   #1
Registered: Apr 2004
Posts: 34

Rep: Reputation: 15
Increasing Kernel timer (2.4)

Hey guys,, runnin slack 10.2 with kernel 2.4

machine is P4 3.2 1G Ram

I run game servers for hl2. My servers only get 50fps and its supposed to be getting at least 100 with my settings. Below are some instuctins on raising Kernel timer. I tried looking for include/asm-<arch>/param.h.
but there are so many close looking files I dont wanna touch if im not sure. Also if I open param.h all lines are commented out.

Can anone help?/

Linux Kernel Timer Instructions

Thanks to triphammer in the STEAM Linux SRCDS Forum

You need to do a custom (re)compile of the linux kernel in order to change kernel interruptability / timer.

Since Kernel 2.6.14 you change the HZ with "make menuconfig", just go to: "Processor type and features" > "Timer frequency (XXXXX HZ)". The default HZ for 2.4 Kernels is 100. You can also change the HZ via the "USER_HZ" variable located in: include/asm-<arch>/param.h.


define USER_HZ 100 /* .. some user interfaces are in "ticks" */

More along the lines of your question, you can also set the kernel timer frequency by chaning the HZ variable in the same file

define HZ 1000 /* Internal kernel timer frequency */


+ config HZ
+ int "Frequency of the Timer Interrupt (1000 or 100)"
+ range 100 1000
+ default 1000
+ help
+ Allows the configuration of the timer frequency. It is customary
+ to have the timer interrupt run at 1000 HZ but 100 HZ may be more
+ beneficial for servers and NUMA systems that do not need to have
+ a fast response for user interaction and that may experience bus
+ contention and cacheline bounces as a result of timer interrupts.
+ Note that the timer interrupt occurs on each processor in an SMP
+ environment leading to NR_CPUS * HZ number of timer interrupts
+ per second.

For a server fps to cater for you high tickrate under Linux, you either need to recompile your 2.4 Kernel, with its Kernel timer resolution changed, but the easiest and probably best course of action is to use the 2.6 Kernel and change the "USER_HZ" variable, (I would suggest starting at 500 and seeing what happens before experimenting with other numbers) which will enable higher server fps on your Linux server.
Old 06-14-2006, 03:43 PM   #2
Senior Member
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
I am not sure if this is in the 2.4 kernel, but I think all you have to do is enable "Enhanced Real Time Clock Support" (It's under Charecter devices in the 2.6 kernel) then as root, run the following command
echo 1024 > /proc/sys/dev/rtc/max-user-freq
Sorry if this doesn't apply to what you are asking.


you will need to add this to your rc.local if you want it to keep when you reboot.

Last edited by drkstr; 06-14-2006 at 03:45 PM.
Old 06-14-2006, 03:46 PM   #3
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 377Reputation: 377Reputation: 377Reputation: 377
Originally Posted by john_d13
I tried looking for include/asm-<arch>/param.h.
but there are so many close looking files I dont wanna touch if im not sure.
the one you want is:


because Pentium 4 CPUs are part of the x86 family...

Also if I open param.h all lines are commented out.
yeah, my guess is you'd just have to uncomment the lines which you want to work with... in your case, it would be these three:
#ifndef HZ
#define HZ 100
of course, you'd change the 100 to the value you want...

Last edited by win32sux; 06-14-2006 at 03:57 PM.
Old 06-16-2006, 02:00 AM   #4
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,881

Rep: Reputation: 563Reputation: 563Reputation: 563Reputation: 563Reputation: 563Reputation: 563
These two sites may have a patchset that will help you achieve what you want:


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Increasing Kernel stack size to 8k without recompiling the Kernel deathman Linux - Software 2 04-08-2006 05:39 AM
Posts not increasing? /hme/usr LQ Suggestions & Feedback 4 11-18-2005 03:41 PM
Kernel Timer koby *BSD 1 07-19-2005 06:37 AM
Increasing bandwidth FuzzBall Linux - Networking 6 11-28-2004 12:40 PM
what means a bug: kernel timer added twice... baronlynx Linux - Newbie 0 02-08-2004 09:03 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:20 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration