Kernel Timeslice

Steve West steve at cyglan.com
Mon Nov 17 20:19:32 UTC 2008


>> >> > Steve West wrote:
>> >> >> I am running Fedora 9 x86 64 bit. What is the kernel timetick per
>> >> >> thread? How many threads per second does the kernel run?
>> >> > Probably not quite what you are asking but here goes:
>> >> > http://kerneltrap.org/node/464
>> >> >
>> >> > run for a few seconds:
>> >> > $ vmstat 1
>> >> >
>> >> > look at system|in = interrupts per second.
>> >> > this is approximately the interupts per second or timer Hz value.
>> >> >
>> >> > from the kernel config parameter HZ_1000 etc:
>> >> > getconf CLK_TCK
>> >> >
>> >> > DaveT.
>> >> Is there ay way to set the ticks without rebuilding the kernel?
>> >
>> > Perhaps if you explained what you are trying to achieve people might be
>> > able to help you get there.
>> >
>> > poc
>> I have an application/service that has 1000 or so threads. Most of these 
>> are
>> TCPIP socket accept and connect. I want to be able to run all the threads 
>> in
>> a second or so to achieve a reasonable throughput. I would like the 
>> kernel
>> to run 1000 threads per second. Right now I think it is set for 100 ticks
>> per second in f9 x86 64bit.
>
> The ticks matter when the threads are competing for cpu, but it looks
> like in your case they'll mostly be waiting for socket calls (during
> which the schedular will hand off to another thread anyway), so
> increasing the timeslice frequency is probably not going to make a
> difference. Hard to know without testing of course.
>
> poc
Yes you are correct under "NORMAL" circumstances 100 ticks per second
 would be ok. But if I design for worst case where all threads are running
I need 1000 ticks per second, or response will not be good. I did not want
 to build a custom kernel, but it looks like I may have to to achieve the
design goal.

Steve

Steve 




More information about the users mailing list