Re: Re: time slice calculation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello...


> > 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 ??
>
> Are you sure they mean timeslice and not HZ? This sounds a bit like
> they've just changed the timer interrupt frequency to 1000/s.

I believe this is the correct interpretation. 1ms time slice? Euwww :) 
That would make the CPU so busy just to switch between processes :)

> On a suse 10.1 kernel the current HZ value is displayed in
> /proc/sys/kernel/HZ . You can change it at kernel build time (grep
> for CONFIG_HZ in .config).
Wow neat, exporting to /proc! Maybe at least somebody could make a 
simple printk patch to show HZ value in boot stage...

> The scheduling timeslice is dynamic and can't be changed, IIRC.

But still, from user space, you can run nice/renice to "intervent" how 
the time slice is calculated. remember that one of the variable that 
determines time slice is dynamic priority and dynamic priority is 
derived from nice value. So, changing nice value does bring impact to 
process time slice.

Also remember that even a process is given a large time slice, it 
doesn't need to spend it all in one turn. It depends on the process 
behaviour, does it sleep a lot, CPU hogger, or somewhere between those 
two.


As always, CMIIW...

regards,

Mulyadi

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux