* [KJ] timeslice calculation
@ 2006-08-15 11:23 Tharindu Rukshan Bamunuarachchi
2006-08-15 19:17 ` Andreas Mohr
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Tharindu Rukshan Bamunuarachchi @ 2006-08-15 11:23 UTC (permalink / raw)
To: kernel-janitors
Are there anyway to get timeslice of currenlty running process. Or are
there anyway to calculate timeslice ??
Because, our system hosting firm said they have recomplied kernel with
setting default timeslice to 1ms. IS this possible?? If so how can I
calculate this from user space program ??
In linux kernel source, is it possible to change default timelice ??
and timer fire period ??
Thankx in advance!
Tharindu
--
Tharindu Rukshan Bamunuarachchi
all fabrications are subject to decay
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [KJ] timeslice calculation
2006-08-15 11:23 [KJ] timeslice calculation Tharindu Rukshan Bamunuarachchi
@ 2006-08-15 19:17 ` Andreas Mohr
2006-08-16 12:32 ` Tharindu Rukshan Bamunuarachchi
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Andreas Mohr @ 2006-08-15 19:17 UTC (permalink / raw)
To: kernel-janitors
Hi,
On Tue, Aug 15, 2006 at 12:00:25PM -0700, kernel-janitors-request@lists.osdl.org wrote:
> Message: 11
> Date: Tue, 15 Aug 2006 16:41:28 +0530
> From: "Tharindu Rukshan Bamunuarachchi" <tharindunix@gmail.com>
> Subject: [KJ] timeslice calculation
> To: Kernel-janitors@lists.osdl.org
> Message-ID:
> <c49434130608150411i1a1c3597h18f3d7dfa1e093ff@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Are there anyway to get timeslice of currenlty running process. Or are
> there anyway to calculate timeslice ??
I cannot tell you of any method off-hand, but there could be one.
> Because, our system hosting firm said they have recomplied kernel with
> setting default timeslice to 1ms. IS this possible?? If so how can I
> calculate this from user space program ??
>
> In linux kernel source, is it possible to change default timelice ??
> and timer fire period ??
See *TIMESLICE defines at the top of linux/kernel/sched.c
Timer tick rate is the CONFIG_HZ setting, usually at HZ\x100
(100 timer ticks per second), as used for servers, but other common
values are 250 (moderately bad for desktop and not good for servers,
IOW somewhat useless ;-) and 1000 (desktop). So they most likely just set
CONFIG_HZ\x1000.
If you want quite different (much better? ;-) scheduling behaviour,
then you may have luck with Con Kolivas kernels (e.g. 2.6.17-ck1).
--
No programming skills!? Why not help translate many Linux applications!
https://launchpad.ubuntu.com/rosetta
(or alternatively buy nicely packaged Linux distros/OSS software to help
support Linux developers creating shiny new things for you?)
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [KJ] timeslice calculation
2006-08-15 11:23 [KJ] timeslice calculation Tharindu Rukshan Bamunuarachchi
2006-08-15 19:17 ` Andreas Mohr
@ 2006-08-16 12:32 ` Tharindu Rukshan Bamunuarachchi
2006-08-16 12:57 ` Andreas Mohr
2006-08-16 14:12 ` walter harms
3 siblings, 0 replies; 5+ messages in thread
From: Tharindu Rukshan Bamunuarachchi @ 2006-08-16 12:32 UTC (permalink / raw)
To: kernel-janitors
Dear All,
They have changed HZ value. So, they says my timer interrupt occures
at 1ms interval. IS it true??
Anyway, is it impossible to calculate HZ value in running linux system.
Because, we wanted to have highly interactive system. So they have
suggested change of timer interval fire. What about decrease of
minimum time slice.
Looking forward for your comments.
Tharindu
On 8/16/06, Andreas Mohr <andi@rhlx01.fht-esslingen.de> wrote:
> Hi,
>
> On Tue, Aug 15, 2006 at 12:00:25PM -0700, kernel-janitors-request@lists.osdl.org wrote:
> > Message: 11
> > Date: Tue, 15 Aug 2006 16:41:28 +0530
> > From: "Tharindu Rukshan Bamunuarachchi" <tharindunix@gmail.com>
> > Subject: [KJ] timeslice calculation
> > To: Kernel-janitors@lists.osdl.org
> > Message-ID:
> > <c49434130608150411i1a1c3597h18f3d7dfa1e093ff@mail.gmail.com>
> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> >
> > Are there anyway to get timeslice of currenlty running process. Or are
> > there anyway to calculate timeslice ??
>
> I cannot tell you of any method off-hand, but there could be one.
>
> > Because, our system hosting firm said they have recomplied kernel with
> > setting default timeslice to 1ms. IS this possible?? If so how can I
> > calculate this from user space program ??
> >
> > In linux kernel source, is it possible to change default timelice ??
> > and timer fire period ??
>
> See *TIMESLICE defines at the top of linux/kernel/sched.c
> Timer tick rate is the CONFIG_HZ setting, usually at HZ\x100
> (100 timer ticks per second), as used for servers, but other common
> values are 250 (moderately bad for desktop and not good for servers,
> IOW somewhat useless ;-) and 1000 (desktop). So they most likely just set
> CONFIG_HZ\x1000.
>
> If you want quite different (much better? ;-) scheduling behaviour,
> then you may have luck with Con Kolivas kernels (e.g. 2.6.17-ck1).
>
> --
> No programming skills!? Why not help translate many Linux applications!
> https://launchpad.ubuntu.com/rosetta
> (or alternatively buy nicely packaged Linux distros/OSS software to help
> support Linux developers creating shiny new things for you?)
>
--
Tharindu Rukshan Bamunuarachchi
all fabrications are subject to decay
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [KJ] timeslice calculation
2006-08-15 11:23 [KJ] timeslice calculation Tharindu Rukshan Bamunuarachchi
2006-08-15 19:17 ` Andreas Mohr
2006-08-16 12:32 ` Tharindu Rukshan Bamunuarachchi
@ 2006-08-16 12:57 ` Andreas Mohr
2006-08-16 14:12 ` walter harms
3 siblings, 0 replies; 5+ messages in thread
From: Andreas Mohr @ 2006-08-16 12:57 UTC (permalink / raw)
To: kernel-janitors
Hi,
On Wed, Aug 16, 2006 at 05:50:20PM +0530, Tharindu Rukshan Bamunuarachchi wrote:
> Dear All,
>
> They have changed HZ value. So, they says my timer interrupt occures
> at 1ms interval. IS it true??
>
> Anyway, is it impossible to calculate HZ value in running linux system.
>
> Because, we wanted to have highly interactive system. So they have
> suggested change of timer interval fire. What about decrease of
> minimum time slice.
Wanting a highly interactive system is precisely the very best reason
to go with a -ck kernel, I guess.
From what I see CONFIG_HZ doesn't influence timeslice length, however.
This is because timeslice length is NOT directly related to timer tick rate.
The TIMESLICE defines in sched.c indicate the standard (*average*)
timeslice values for processes, regardless how often the timer interrupt
(which is a process rescheduling point) fires (this might be much more often
than process rescheduling actually takes place).
If you have definite need for a lower timeslice, then I believe there's
no way around modifying those sched.c defines and recompiling.
Note that lowering timeslice values will deteriorate your cache-hot
efficiency due to too frequently swapped processes/memory sets (IIRC the
usual time to get a cache really hot was more than 3ms on a P3 or so).
As such you might want to tend to replacing the entire scheduler instead
of doing some timeslice tweaks...
Andreas Mohr
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [KJ] timeslice calculation
2006-08-15 11:23 [KJ] timeslice calculation Tharindu Rukshan Bamunuarachchi
` (2 preceding siblings ...)
2006-08-16 12:57 ` Andreas Mohr
@ 2006-08-16 14:12 ` walter harms
3 siblings, 0 replies; 5+ messages in thread
From: walter harms @ 2006-08-16 14:12 UTC (permalink / raw)
To: kernel-janitors
there is also a high resolution timer patch with dynamic ticks that
promisses a better response time.
http://lwn.net/Articles/152363/
re,
walter
Andreas Mohr wrote:
> Hi,
>
> On Wed, Aug 16, 2006 at 05:50:20PM +0530, Tharindu Rukshan Bamunuarachchi wrote:
>> Dear All,
>>
>> They have changed HZ value. So, they says my timer interrupt occures
>> at 1ms interval. IS it true??
>>
>> Anyway, is it impossible to calculate HZ value in running linux system.
>>
>> Because, we wanted to have highly interactive system. So they have
>> suggested change of timer interval fire. What about decrease of
>> minimum time slice.
>
> Wanting a highly interactive system is precisely the very best reason
> to go with a -ck kernel, I guess.
>
>>From what I see CONFIG_HZ doesn't influence timeslice length, however.
> This is because timeslice length is NOT directly related to timer tick rate.
> The TIMESLICE defines in sched.c indicate the standard (*average*)
> timeslice values for processes, regardless how often the timer interrupt
> (which is a process rescheduling point) fires (this might be much more often
> than process rescheduling actually takes place).
>
> If you have definite need for a lower timeslice, then I believe there's
> no way around modifying those sched.c defines and recompiling.
>
> Note that lowering timeslice values will deteriorate your cache-hot
> efficiency due to too frequently swapped processes/memory sets (IIRC the
> usual time to get a cache really hot was more than 3ms on a P3 or so).
> As such you might want to tend to replacing the entire scheduler instead
> of doing some timeslice tweaks...
>
> Andreas Mohr
> _______________________________________________
> Kernel-janitors mailing list
> Kernel-janitors@lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/kernel-janitors
>
>
>
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-08-16 14:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-15 11:23 [KJ] timeslice calculation Tharindu Rukshan Bamunuarachchi
2006-08-15 19:17 ` Andreas Mohr
2006-08-16 12:32 ` Tharindu Rukshan Bamunuarachchi
2006-08-16 12:57 ` Andreas Mohr
2006-08-16 14:12 ` walter harms
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.