> You got me interested.  Evidently a process can use multiple cores when 
> doing threading. A separate process is created with fork(), but not with 
> threads ( pthread_create() ).  So depending on the number of threads, a 
> single process can use multiple cpus (cores) and top will show that as a 
> process with %CPU > 100.
> 
>    -- Bruce
> 
> 
> Like Bruce, you seem to mis-parse what I was saying.  Maybe you say
> things differently in your country.

"Two countries separated by a common language," eh?  But no, I don't think I 
misparsed it.

> 
> With rust (and also with mprime) I've been seeing up to 400% for one
> process.

I would expect so.  But I always expected what Bruce found and mentioned above, 
that a forked subprocess was a separately dispatchable unit.  How would you 
expect top to attribute the CPU usage in a multiprocessing system?  Showing 
more than 100%, makes sense to me.  Imagine what you could see during systemd 
startup.  I've never used it, but I believe I've read about an argument to have 
top show all the subprocess a particular command may have spawned.


-- 
Paul Rogers
paulgrog...@fastmail.fm
Rogers' Second Law: "Everything you do communicates."
(I do not personally endorse any additions after this line. TANSTAAFL :-)
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to