Solaris Live Transcripts Index November 16, 2000Chat Title: Getting the Most Out of Compilers (CC) in a Multi-Threaded Environment This is a moderated forum LizA: Hello, and welcome to Solaris Live Online Chat. Our guest is Krishna Ramachandran, Ph.D, a staff engineer at Sun. Krishna has several years experience in porting and tuning apps to Solaris and SPARC. He has developed algorithms for multi-threading and parallel processing for Solaris and other UNIX platforms. LizA: Krishna, let me open the Chat by asking, "What are the recommended strategies for tackling C++ compile/run time performance problems?" Krishna: LizA, It is best to use Sun's latest set of compilers/tools (forte6_update1). Let me address the compile time issue first, try adding +d flag. This turns off front end inlining. In some extreme cases inlining can cause huge code bloats ... Krishna: If your template instantiation model can bypass the use of template repositoryit will be helpful. All instances of template instantiations are placed inSunWS_cache directory. Repository management takes bulk of compilation. Krishna: Krishna: Also, for applications that make heavy use of iostreams can take advantage of gil: What is compat mode in Workshop/Forte 6 for C++? Krishna: Gil, CraigD: I need an STL. Where do I get it? Is there one for Krishna: Sun officially, supports STL only in standard mode that is LizA: Krishna, what is compat mode in WorkShop/Forte6? and what is alternate libthread and how does it help applications? Krishna: Solaris 8 and higher versions supports/will support a second threads library in addition to the conventional /usr/lib/libthread.so. This alternate model is available on Solaris 8 under /usr/lib/lwp and one can invoke this version simply by setting the environment variable Krishna: As for performance benefits?It is very application dependent. We have seen huge performance increments for certain applications that show a lot of contention on schedlock it is hard to accurately say which one is better and when. gil: How can I figure out which patches exist and what problems are solved in the current patches? Krishna: Gil, for the most up-to-date information check, www.sun.com/workshop/users/ws.html. They can also be downloaded from http://sunsolve.sun.com gil: Do I need to have patches to libC.so.5 and libCrun.so.1? Krishna: Gil, Typically, Solaris versions ship with the recent versions of these libraries. But whenever a bug fix or a performance fix occurs these libraries are patched.So it is good idea to grab the latest patch for these libraries. The package is called SUNWlibCx and SUNWlibC. There are 32 and 64 bitversions of these patches CraigD: How do I get a stdlib that is fully compliant? Or, what functionality does the current libCstd not support? Krishna: CriagD, The current libCstd, is compatible with the one that was shipped originally with workshop 5. Some of the functionality that are not supported are mainly in container classes that have conmstructor templates allowing implicit type conversion. LizA: Thanks, Krishna. We've reached the end of our time. Are there anycomments you want to make in conclusion? Krishna: In conclusion, I would highly recommend migrating to Solaris 8 and use most recent of oru workshop tools (forte6_update1). Identify if the bottleneck is on the user code or the time spent in the kernel using simple and less intrusive utilities like vmstat and mpstat. If bulk of the time is in the user functions, use the collector/analyzer tool to identify "hot" functions and explore if multi-threading can be explored... Krishna: If the bulk of the time is spent in kernel, contending on a resource like file IO or a lock identify the lock via lockstat, dbx and explore if using alternate libthread would help for lock contention related bottlenecks.Otherwise look into other IO possibilities like mt IO, async. io or direct IO Thanks again!!! LizA: Thank you.... November 2000 | ||||||||
|
| ||||||||||||