On Tue, 2009-02-10 at 22:12 +0100, Heinz Diehl wrote:
On 10.02.2009, Randall R Schulz wrote:
% rpm -q --whatrequires libpthread.so.0 |wc -l 410
# Library pthreads dependencies: %rpm -q --whatrequires libpthread.so.0 |egrep lib |wc -l 138
# Non-library pthreads dependencies: % rpm -q --whatrequires libpthread.so.0 |egrep -v lib |wc -l 272
This is my opensuse 11.0:
liesel:~ # rpm -q --whatrequires libpthread.so.0 |wc -l 42
liesel:~ # rpm -q --whatrequires libpthread.so.0 |egrep lib |wc -l 16
liesel:~ # rpm -q --whatrequires libpthread.so.0 |egrep -v lib |wc -l 26
The numbers above and your comment below are really unrelated.
It seems my quadcore cpu has not enough workload to even exploit one core, and the other three are just there to consume (a lot of) power. I'll downgrade to an energy efficient 45W Athlon soon.
A threaded app is one where a single app can possibly run in different cores/CPUs, perhaps even concurrently. The presence of this library indicates that the app is perhaps creating threads directly, and at least considering this possible concurrency. For threading to have any effect, the OS must support multiple cores/CPUs. So threading builds on and requires multiprocessing. A multiprocessor system, on the other hand, is managed by the OS. It can put processes to run in different core/CPU. The applications themselves need know nothing about this. They do not need to do any threading or call anything in a thread library. So, vi could run in one core at the same time as some unrelated process runs in another. And vi need not do anything to allow this unrelated process to do so. No libpthread is needed. It is the OS that manages this. If vi wanted to get fancy and do more than one thing at the same time, it would involve libpthread. So, the presence of libpthread does not indicate how busy your CPU cores are. Try 'ps -efLmP' to list all threads. Those listed with the same PID are all threads of that PID. The PSR column tells which CPU the process is assigned to. I think that is the column you are interested in. You will note that processes with one thread still run in different CPUs. Hope this helps. top also has some thread viewing options. I have a compute-intensive multithreaded app that tracks the time spent in each thread. On a 2 CPU processor, I am always happy to see it report that in 30 minutes it used almost 60 minutes of CPU time. Luckily, this app can be divided into two threads. Adding more CPUs would probably not help it much. So, YMWV. Of course, if the system is not busy, there is always the address below. Anyone finding themselves in possession of a needlessly fast computer can ship them there. No questions asked. :) -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 8-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org