priclass_example.txt revision 1.1.1.1 1 1.1 christos The following is a demonstration of the priclass.d script.
2 1.1 christos
3 1.1 christos
4 1.1 christos The script was run for several seconds then Ctrl-C was hit. During
5 1.1 christos this time, other processes in different scheduling classes were
6 1.1 christos running.
7 1.1 christos
8 1.1 christos # ./priclass.d
9 1.1 christos Sampling... Hit Ctrl-C to end.
10 1.1 christos ^C
11 1.1 christos
12 1.1 christos IA
13 1.1 christos value ------------- Distribution ------------- count
14 1.1 christos 40 | 0
15 1.1 christos 50 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 30
16 1.1 christos 60 | 0
17 1.1 christos
18 1.1 christos SYS
19 1.1 christos value ------------- Distribution ------------- count
20 1.1 christos < 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 4959
21 1.1 christos 0 | 0
22 1.1 christos 10 | 0
23 1.1 christos 20 | 0
24 1.1 christos 30 | 0
25 1.1 christos 40 | 0
26 1.1 christos 50 | 0
27 1.1 christos 60 | 30
28 1.1 christos 70 | 0
29 1.1 christos 80 | 0
30 1.1 christos 90 | 0
31 1.1 christos 100 | 0
32 1.1 christos 110 | 0
33 1.1 christos 120 | 0
34 1.1 christos 130 | 0
35 1.1 christos 140 | 0
36 1.1 christos 150 | 0
37 1.1 christos 160 | 50
38 1.1 christos >= 170 | 0
39 1.1 christos
40 1.1 christos RT
41 1.1 christos value ------------- Distribution ------------- count
42 1.1 christos 90 | 0
43 1.1 christos 100 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 110
44 1.1 christos 110 | 0
45 1.1 christos
46 1.1 christos TS
47 1.1 christos value ------------- Distribution ------------- count
48 1.1 christos < 0 | 0
49 1.1 christos 0 |@@@@@@@@@@@@@@@ 2880
50 1.1 christos 10 |@@@@@@@ 1280
51 1.1 christos 20 |@@@@@ 990
52 1.1 christos 30 |@@@@@ 920
53 1.1 christos 40 |@@@@ 670
54 1.1 christos 50 |@@@@ 730
55 1.1 christos 60 | 0
56 1.1 christos
57 1.1 christos The output is quite interesting, and illustrates neatly the behaviour
58 1.1 christos of different scheduling classes.
59 1.1 christos
60 1.1 christos The IA interactive class had 30 samples of a 50 to 59 priority, a fairly
61 1.1 christos high priority. This class is used for interactive processes, such as
62 1.1 christos the windowing system. I had clicked on a few windows to create this
63 1.1 christos activity.
64 1.1 christos
65 1.1 christos The SYS system class has had 4959 samples at a < 0 priority - the lowest,
66 1.1 christos which was for the idle thread. There are a few samples at higher
67 1.1 christos priorities, including some in the 160 to 169 range (the highest), which
68 1.1 christos are for interrupt threads. The system class is used by the kernel.
69 1.1 christos
70 1.1 christos The RT real time class had 110 samples in the 100 to 109 priority range.
71 1.1 christos This class is designed for real-time applications, those that must have
72 1.1 christos a consistant response time regardless of other process activity. For that
73 1.1 christos reason, the RT class trumps both TS and IA. I created these events by
74 1.1 christos running "prstat -R" as root, which runs prstat in the real time class.
75 1.1 christos
76 1.1 christos The TS time sharing class is the default scheduling class for the processes
77 1.1 christos on a Solaris system. I ran an infinite shell loop to create heavy activity,
78 1.1 christos "while :; do :; done", which shows a profile that leans towards lower
79 1.1 christos priorities. This is deliberate behaivour from the time sharing class, which
80 1.1 christos reduces the priority of CPU bound processes so that they interefere less
81 1.1 christos with I/O bound processes. The result is more samples in the lower priority
82 1.1 christos ranges.
83