LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 03-07-2005, 04:27 AM   #1
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
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?

Last edited by JZL240I-U; 03-07-2005 at 04:31 AM.
 
Old 03-07-2005, 06:54 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
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.

Two things you can read:
http://www.samspublishing.com/articl...?p=101760&rl=1
http://www.tldp.org/HOWTO/KernelAnalysis-HOWTO-6.html

Quote:
What about niceing and renice?
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?
Not stupid, for sure. Rather advanced.
 
Old 03-07-2005, 08:34 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
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...

Quote:
Originally posted by Mara
Two things you can read:
http://www.samspublishing.com/articl...?p=101760&rl=1...
Thanks. This answers my question about niceing nicely .
It also gives some real values for MIN_TIMESLICE, timeslice and MAX_TIMESLICE. Nice

Quote:
Originally posted by Mara
...http://www.tldp.org/HOWTO/KernelAnalysis-HOWTO-6.html
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 .

Last edited by JZL240I-U; 03-08-2005 at 03:52 AM.
 
Old 03-08-2005, 04:59 AM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
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.
 
Old 03-08-2005, 07:13 AM   #5
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Original Poster
Rep: Reputation: Disabled
Hi Mara, look at this reference, now I understand at last

http://tech.dupnica.net/understandin...rnel/ch5b.html

In case you didn't know it already it's perhaps a nice addition to your collection of bookmarks .

Thanks for all your help .
 
Old 03-09-2005, 11:44 AM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
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.
 
Old 05-04-2005, 04:58 PM   #7
cttran
LQ Newbie
 
Registered: May 2005
Posts: 4

Rep: Reputation: 0
Well, any one know how change/modify the timeslice of a thread or process during run-time ?

Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration