TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Linux & Opensource > Suse Linux

Notices

Reply
 
Thread Tools Display Modes
Old 27-11-2007, 09:30 PM   #1
Xiaochuan Shen
Guest
 
Posts: n/a
what's the timer resolution in Linux

Hi all,

I am just wondering what's the timer (any timer, I mean) resolution under
Linux. I got a vague idea that the timer resolution under Linux is high than
BSD, but what's the exactly value of it?

Thanks in advance.

Regards,
Xiaochuan


  Reply With Quote
Old 27-11-2007, 11:31 PM   #2
Michael Soibelman
Guest
 
Posts: n/a
Re: what's the timer resolution in Linux

Xiaochuan Shen wrote:

> Hi all,
>
> I am just wondering what's the timer (any timer, I mean) resolution under
> Linux. I got a vague idea that the timer resolution under Linux is high
> than BSD, but what's the exactly value of it?
>
> Thanks in advance.
>
> Regards,
> Xiaochuan


This may help:

http://www.freescale.com/files/soft_...WLNXRTOSWP.pdf
  Reply With Quote
Old 28-11-2007, 01:31 AM   #3
linuxadmin@yandex.ru
Guest
 
Posts: n/a
Re: what's the timer resolution in Linux

On Nov 27, 4:54 pm, "Xiaochuan Shen" <xs...@cam.ac.uk> wrote:
> Hi all,
>
> I am just wondering what's the timer (any timer, I mean) resolution under
> Linux. I got a vague idea that the timer resolution under Linux is high than
> BSD, but what's the exactly value of it?
>
> Thanks in advance.
>
> Regards,
> Xiaochuan


The default kernel in opensuse has the value 250 HZ.
I know that all newer kernels allow to choose between 100, 250, 300,
1000

just find the kernel config file to look up your HZ value:
.config inside the kernel build directory, or (as in my opensuse
installation):
/boot/config-[someKernelVersion]

search inside the config file for CONFIG_HZ_
  Reply With Quote
Old 28-11-2007, 01:31 AM   #4
Mark South
Guest
 
Posts: n/a
Re: what's the timer resolution in Linux

On Tue, 27 Nov 2007 11:17:21 -0800, linuxadmin wrote:

> The default kernel in opensuse has the value 250 HZ.
> I know that all newer kernels allow to choose between 100, 250, 300,
> 1000


Or to have the kernel run tickless.
  Reply With Quote
Old 28-11-2007, 04:30 AM   #5
Peter Terpstra
Guest
 
Posts: n/a
Re: what's the timer resolution in Linux

linuxadmin@yandex.ru in
<321338d7-2628-46f4-b2c3-47bcc27feb5b@e25g2000prg.googlegroups.com> :


> just find the kernel config file to look up your HZ value:
> .config inside the kernel build directory, or (as in my opensuse
> installation):
> /boot/config-[someKernelVersion]
>
> search inside the config file for CONFIG_HZ


peter@dharma:~:0>zgrep CONFIG_HZ /proc/config.gz

# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250

P.


--
mailtoeter@dharma.dyn-o-saur.com
  Reply With Quote
Old 28-11-2007, 02:27 PM   #6
Peter Terpstra
Guest
 
Posts: n/a
Re: what's the timer resolution in Linux

linuxadmin@yandex.ru in
<321338d7-2628-46f4-b2c3-47bcc27feb5b@e25g2000prg.googlegroups.com> :


> The default kernel in opensuse has the value 250 HZ.
> I know that all newer kernels allow to choose between 100, 250, 300,
> 1000


But i'm wandering what kind off difference it should make.
What kind of response could we expect if the resolution would be set to 100
or 1000? What does this CONFIG_HZ/resolution value do to a machine?

Kind Regards,

Peter

--
mailtoeter@dharma.dyn-o-saur.com
  Reply With Quote
Old 28-11-2007, 06:28 PM   #7
Nikos Chantziaras
Guest
 
Posts: n/a
Re: what's the timer resolution in Linux

Peter Terpstra wrote:
> linuxadmin@yandex.ru in
> <321338d7-2628-46f4-b2c3-47bcc27feb5b@e25g2000prg.googlegroups.com> :
>
>
>> The default kernel in opensuse has the value 250 HZ.
>> I know that all newer kernels allow to choose between 100, 250, 300,
>> 1000

>
> But i'm wandering what kind off difference it should make.
> What kind of response could we expect if the resolution would be set to 100
> or 1000? What does this CONFIG_HZ/resolution value do to a machine?


Higher values provide finer-grained time measurement to applications.
3D games benefit from this, since they have times that fire off multiple
times even before the monitor finished drawing a single frame.
Multimedia authoring applications are said to also benefit from this
(can someone explain why though?)

For a non-gaming PC, even 100Hz is good enough. On 32-bit systems it
doesn't matter much though, since the kernel is "tickless" by default
(that is the interrupt timer is effectively disabled when not needed).
On x86_64 tickless doesn't work (yet), so it matters a bit. The general
rule is, if you're playing modern 3D games, 1000Hz is better. If not,
choose 250 (or even 100 to save a bit of battery life on laptops).
  Reply With Quote
Old 28-11-2007, 11:32 PM   #8
Unruh
Guest
 
Posts: n/a
Re: what's the timer resolution in Linux

Peter Terpstra <peter@dharma.dyn-o-saur.com> writes:

>linuxadmin@yandex.ru in
><321338d7-2628-46f4-b2c3-47bcc27feb5b@e25g2000prg.googlegroups.com> :



>> The default kernel in opensuse has the value 250 HZ.
>> I know that all newer kernels allow to choose between 100, 250, 300,
>> 1000


>But i'm wandering what kind off difference it should make.
>What kind of response could we expect if the resolution would be set to 100
>or 1000? What does this CONFIG_HZ/resolution value do to a machine?


That is not the timer resolution, since the timing routines also use the
cpu ticks to interpolate between the timer interrupt ticks. The timing
resolution under Linux is about 1usec ( one millionth of a second), not the
10 or 4 of 2 or 1 milli sec that the above would indicate.

>Kind Regards,


>Peter


>--
>mailtoeter@dharma.dyn-o-saur.com

  Reply With Quote
Old 29-11-2007, 11:30 AM   #9
Peter Terpstra
Guest
 
Posts: n/a
Re: what's the timer resolution in Linux

Nikos Chantziaras in <fijljh$i8n$1@volcano1.grnet.gr> :

> Higher values provide finer-grained time measurement to applications.
> 3D games benefit from this, since they have times that fire off multiple
> times even before the monitor finished drawing a single frame.
> Multimedia authoring applications are said to also benefit from this
> (can someone explain why though?)
>
> For a non-gaming PC, even 100Hz is good enough. *On 32-bit systems it
> doesn't matter much though, since the kernel is "tickless" by default
> (that is the interrupt timer is effectively disabled when not needed).
> On x86_64 tickless doesn't work (yet), so it matters a bit. *The general
> rule is, if you're playing modern 3D games, 1000Hz is better. *If not,
> choose 250 (or even 100 to save a bit of battery life on laptops).


Ah thanks for this info, i get the idea to compile different kernels to
experiment with this.

P.

--
mailtoeter@dharma.dyn-o-saur.com
  Reply With Quote
Old 29-11-2007, 11:30 AM   #10
Peter Terpstra
Guest
 
Posts: n/a
Re: what's the timer resolution in Linux

Unruh in <wjh3j.10945$HH2.3355@edtnps82> :

> That is not the timer resolution, since the timing routines also use the
> cpu ticks to interpolate between the timer interrupt ticks. The timing
> resolution under Linux is about 1usec ( one millionth of a second), not
> the 10 or 4 of 2 or 1 milli sec that the above would indicate.


I believe you :-)

P.

--
mailtoeter@dharma.dyn-o-saur.com
  Reply With Quote
Reply

Thread Tools
Display Modes


Google
 


All times are GMT +5.5. The time now is 09:46 AM.


vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2008, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional