1 |
On Thu, 15 May 2008 19:45:17 +0100 |
2 |
Mick <michaelkintzios@×××××.com> wrote: |
3 |
|
4 |
> On Thursday 15 May 2008, Alan McKinnon wrote: |
5 |
> > On Thursday 15 May 2008, Abraham Gyorgy wrote: |
6 |
> > > I know X runs always as root. But setting the X server process' |
7 |
> > > priority to for example -10 makes graphical software response |
8 |
> > > faster. |
9 |
> |
10 |
> Setting the X server to -10 may make the X more responsive to client |
11 |
> requests - theoretically that is. However, since this is a zero sum |
12 |
> game, some other processes will be short changed. So they may |
13 |
> (theoretically again) run slower. It could well be that your KDE |
14 |
> session becomes slower as a result, ha! Anyway, just looking at the |
15 |
> info page I read: =================================== |
16 |
> " A niceness should not be confused with a scheduling priority, which |
17 |
> lets applications determine the order in which threads are scheduled |
18 |
> to run. Unlike a priority, a niceness is merely advice to the |
19 |
> scheduler, which the scheduler is free to ignore." |
20 |
> =================================== |
21 |
> |
22 |
> Perhaps this is the reason why Linus has uttered his particular words |
23 |
> of wisdom on this matter. |
24 |
> |
25 |
> > > It works for me!! (no matter the system hangs sometimes :). |
26 |
> > > I think you have a fast machine, try it with a very slow computer |
27 |
> > > (sempron processor and radeon xpress200m+fglrx). |
28 |
> |
29 |
> I have slow machine(s) and I tried your suggestion, but have not run |
30 |
> any benchmarks. I cannot sense a difference. |
31 |
> |
32 |
> > You'll probably get better results with X by selecting a suitable |
33 |
> > process scheduler and configuring your HZ to 1000 |
34 |
> |
35 |
> Now, this I have noticed making a difference. Not all schedulers are |
36 |
> born the same. I have found that (the current version of) CFQ is |
37 |
> better than others. |
38 |
> |
39 |
|
40 |
Please, correct me if I'm wrong. |
41 |
|
42 |
I believe you're mixing the block device I/O SCHEDULERS (CFQ, deadline, |
43 |
anticipatory) with the process scheduling PLOCIES (Real time, BATCH, |
44 |
FIFO...). While the first are used to reorder the I/O requests to |
45 |
optimise the head movements in HDDs, the latter define how the kernel |
46 |
should divide the CPU time between processes and their threads. |
47 |
Choosing one I/O scheduler over another may have some effect on the way |
48 |
the X sessions behaves, but it would be indirect. Choosing one |
49 |
scheduling policy over another for a given application has a direct |
50 |
impact on its performance. |
51 |
|
52 |
|
53 |
> As a matter of interest, I remember reading somewhere that squeezing |
54 |
> 1000Hz out of an old machine may have the opposite effect to that |
55 |
> intended. Is this pub talk, or have you experienced something that |
56 |
> confirms this? |
57 |
|
58 |
|
59 |
There's a logic behind this claim. The timer frequency (as I understand |
60 |
it) defines how many times per second a process can be interrupted |
61 |
(making the CPU work on something else). The higher the frequency, the |
62 |
smoother the experience, but at the cost of the time it takes a process |
63 |
to finish. |
64 |
|
65 |
Let's see what happens if for example you had a massive tar job (e.g. |
66 |
archiving your $HOME) and wanted to use the system as usual at the same |
67 |
time. |
68 |
|
69 |
Case 1 - timer freq. = 1000Hz |
70 |
|
71 |
Working with the system is (almost) as normal - fast responses, no delay |
72 |
in switching windows and so on. Tar finishes its job for 30min. |
73 |
|
74 |
Case 2 - timer freq. = 100Hz |
75 |
|
76 |
The system is almost unusable. Switching windows takes several (tens |
77 |
of) seconds, responses are extremely slow. The tar job is done after |
78 |
10min. |
79 |
|
80 |
So, too many interrupts in a saturated system (or slow CPU) would make |
81 |
the CPU work a little on each job and start another w/o finishing |
82 |
anything "in time". |
83 |
|
84 |
(Again, please, correct me if I'm wrong) |
85 |
|
86 |
|
87 |
-- |
88 |
Best regards, |
89 |
Daniel |
90 |
-- |
91 |
gentoo-user@l.g.o mailing list |