Set Up a Default Scheduling Class to Fully Use Resources on Multithreaded SystemsVictor Feng, April 2008 The Sun Fire T2000 server uses the UltraSPARC T1 processor, which handles multithreaded processes well. For example, the Sun Fire T2000 server is good for Oracle databases and web applications that are multithreaded applications. When some of the applications on a box are single-threaded, you might still be able to fully utilize the computing resources. The test box I used for this tech tip is an 8-core Sun Fire T2000 server (running the Solaris 10 OS). Since each core has 4 threads, we have 32 CPUs, and Without a Default Scheduling ClassWithout a default scheduling class, the system can handle only 12 single-threaded processes: # dispadmin -d dispadmin: Default scheduling class is not set Let's run 32 single-threaded processes:
# perl -e 'while (--$ARGV[0] and fork) {}; while () {}' 32 &
Then we'll use # vmstat 3 3 kthr memory page disk faults cpu r b w swap free re mf pi po fr de sr s1 s2 s3 s4 in sy cs us sy id 0 0 0 38799496 15164936 1 4 4 1 1 0 1 1 -0 -0 0 497 208 442 0 0 100 20 0 0 39127104 15498368 0 3 0 0 0 0 0 0 0 0 0 575 197 401 37 0 63 20 0 0 39126848 15498104 0 1 2 2 2 0 0 0 0 0 0 578 186 416 37 0 62
With a Default Scheduling ClassWith a default scheduling class, the system can handle 32 single-threaded processes. The
# dispadmin -d
FSS (Fair Share)
# perl -e 'while (--$ARGV[0] and fork) {}; while () {}' 32 &
# vmstat 3 3
kthr memory page disk faults
cpu
r b w swap free re mf pi po fr de sr s1 s2 s3 s4 in sy
cs us sy id
0 0 0 37673528 15247408 90 276 355 1 1 0 84 12 -0 -0 19 796 5710
2370 37 1 62
0 0 0 38753928 15163160 0 4 0 0 0 0 0 0 0 0 0 760 176
356 100 0 0
0 0 0 38753672 15162904 0 1 0 0 0 0 0 0 0 0 0 729 256
362 100 0 0
I also tried the TS (Time Sharing) class, and the system can handle 32 single-threaded processes. As you can see, when you have a server with a multithreaded processor (for example, the UltraSPARC T1 or T2 processor), it is better to set up a default scheduling class so that you can fully utilize the server's computing resources.
Comments (latest comments first)Discuss and comment on this resource in the BigAdmin Wiki
Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License. |
BigAdmin SubscriptionsBigAdmin Areas
BigAdmin Sun Center
BigAdmin Topics | ||||||||||