Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Rep:
Timeslices. What do they do? Why?
I wanted to accelerate booting. I found a message saying
Code:
boot.sched ... skipped
On manual attempts to start it I got the message:
Code:
timeslices not configured in /etc/sysconfig/kernel
I looked into that. Here a MIN_TIMESLICE and MAX_TIMESLICE and other things can be defined. Okay, so far so good, but:
My system runs stable without this. What's it good for then? I googled, searched SuSE / Novell and came up with no explanation. Does it concern threading? Anybody a link or infos?
P.S.: And then there are sysctl and sysctl.conf. Don't these already allow to set these parameters as desired?
P.P.S.: What about niceing and renice?
P.P.P.S.: Are these stupid questions, i.e. did I overlook something?
Timeslice length is parameter for Linux scheduler - the part of the kernel that switches processes. Long timeslice is good if you run long calculations and you don't mind if your machine needs some time to answer when you press a key etc. Short timeslice is good if you want your system to respond fast, but it spends much time switching processes (so overall performance not as good as with long slice). If you want to chage the parameters you need to know exactly why and how to change. Bad aprameters may cause really poor performance.
You can use tehm too, but they affect the scheduler in a slightly different way. You can experiment with them in 'top'. I guess it's the best way to see how it works.
Quote:
Are these stupid questions, i.e. did I overlook something?
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629
Original Poster
Rep:
Quote:
Originally posted by Mara ... If you want to chage the parameters you need to know exactly why and how to change. Bad aprameters may cause really poor performance.
Yes, I didn't dare to touch anything, but still I wanted to know...
From this I gather, that timeslices have mixed points of reference; one being the tuneable software parameter "timeslice" to determine a new length if desired, the other the hardware like PIT 8253 (Programmable Interval Timer). How, then, do the distributions find out what kind of hardware the customers use or is there only the PIT 8253 with a clock of 1.19318 MHz "in the wild"?
Quote:
Originally posted by Mara ... Not stupid, for sure. Rather advanced.
*blush* Thank you, I like learning. And thanks also for your time, effort and the links .
Originally posted by JZL240I-U From this I gather, that timeslices have mixed points of reference; one being the tuneable software parameter "timeslice" to determine a new length if desired, the other the hardware like PIT 8253 (Programmable Interval Timer). How, then, do the distributions find out what kind of hardware the customers use or is there only the PIT 8253 with a clock of 1.19318 MHz "in the wild"?
Here you've got two meanings - second one is the time between two clock interrupts (which is constant). The parameter HZ can be changed, however, and is different in different architectures. This understanding of a timeslice is more low-level than the previous one.
It's a from the book "Understanding the Linux Kernel" - good one, in fact. Note that, if the online text is not upgraded, it refers mostly to 2.2 and sometimes to 2.4. 2.6 made a number of improvements, so it's a good thing to see what changed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.