|
Adrian Cockcroft and Jim Mauro take on questions about threads, and readers praise security wizard Carole Fennelly's series on sendmail |
Mail this article to a friend |
Needed: Cache profiling tool
Adrian,
I have been following your SunWorld columns with interest.
We are heavy Solaris users and need a cache profiling tool that will reveal the cache behavior of our processes. We are running mostly Ultra 2 boxes with Solaris 2.5 and Solaris 7.
Is there any available tool that supports the above OS/arch?
Thanks for your time,
Sandeep Joshi
Sandeep,
To profile CPU cache usage in detail (line by line) you need to use
a simulator like SimICS (http://www.virtutech.se/); if you
want to look at the cache hit rates for each process, we are working
on tools to be included in Solaris 8. In the meantime, there are some
unsupported tools, so ask your local Sun SE to lookup
Adrian
hstat
. Local
policy varies on what internal tools can be provided and whether a
nondisclosure agreement must be signed first.
Measuring threads' CPU usage
Adrian,
I am writing a multithreaded C application using pthreads
. The target
architecture is Solaris 7. Can you advise me on how I can measure the CPU usage
of threads?
Thanks,
Sam Murray-Smith
Sam,
Check out
One day, I'd like to add this properly to SE.
Adrian
ps -L
and proc(4)
:
% ps -Lp 540
PID LWP TTY LTIME CMD
540 20 ? 0:03 dtmail
540 2 ? 0:00 dtmail
540 3 ? 0:00 dtmail
540 22 ? 0:03 dtmail
540 5 ? 0:00 dtmail
540 30 ? 0:00 dtmail
540 8 ? 0:00 dtmail
540 28 ? 0:03 dtmail
540 29 ? 0:00 dtmail
Adrian,
We read your book (Sun Performance and Tuning: Java and the Internet, Second Edition,) but we didn't find anything about filesystem priority access. The question is: Is there any way to set filesystem access priority on Solaris? For example, suppose that we have two filesystems, A and B. When concurrent requests for blocks are made, we want those in A to be processed first.
Thanks,
Rogerio Pelloso Gelamo
Rogerio,
There is no way to do this. Priority for CPU time and network packets
can be established using the Solaris Resource Manager and Bandwidth
Manager products, but there is no disk or filesystem priority scheme in
any of the Unix systems as far as I know.
Adrian
|
|
|
|
What's with the third thread?
Jim,
This month's Inside Solaris is too informative.
Congratulations! In your series of articles about multithreading you
mentioned the creation of three threads for a non-multithreaded
process when compiled with -lthread
. I would like to get more
details about the reason for creating the third thread (1-main
thread,2-aslwp
). I would be very much grateful for your assistance.
Ravindra Babu
Ravindra,
The third thread is a scheduler or dispatcher thread. User-level threads
are scheduled separately from kernel threads. Kernel threads are
scheduled based on scheduling class and priority by the kernel
dispatcher, and a kernel thread is placed on a processor for execution.
User threads are scheduled by a thread in the thread's library
(scheduled based on priority), and are linked to an LWP
(lightweight process) when scheduled for execution.
Jim
Thanks for the series
Carole,
I've been maintaining sendmail on firewalls and mail hubs for five or six years and find your sendmail columns nicely done! They are informative but not verbose. I really appreciate the way you laid out the new features in 8.9.3. I hope to see more sendmail columns from you in the future.
Doug Nomura
More kudos for Carole
Hi Carole,
I just wanted to send an e-mail of thanks for yet another excellent article. I found the "Audits from Hell" article to be extremely interesting (and humorous), and this most recent article to be really useful. One of my coworkers has just been given the responsibility of maintaining sendmail for NCSU, so he'll be very grateful too I'm sure.
Your work is very much appreciated!
Regards,
Ken Williams
|
If you have technical problems with this magazine, contact webmaster@sunworld.com
URL: http://www.sunworld.com/swol-07-1999/swol-07-letters.html
Last modified: