CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
perl threads cpu usage very high

 



tish15
New User

Jul 15, 2010, 11:34 PM

Post #1 of 2 (756 views)
perl threads cpu usage very high Can't Post

Hi,

I need some help with finding the root cause of perl threads high cpu usage.

The high cpu usage started occurring when I used multithreading. And its only the parent and the child threads that are causing the CPU usage of approx 80%. There are few more perl processess running on the system and they don't even appear in the output of 'top'.

I am using the following modules for implementation:

Acme-Damn-0.04

Devel-Symdump-2.08

Sys-SigAction-0.11

forks-0.33

Can anyone guide me through this problem?

Thanks


winfinit
User

Jul 17, 2010, 9:26 PM

Post #2 of 2 (721 views)
Re: [tish15] perl threads cpu usage very high [In reply to] Can't Post

you can always use perl debugger, so you can understand what is happening, usually i just run perl -d app.pl and then set trace flag on ("T"), and then just hitting ("c") for continue.

another steps that i do, when i want to know what process is doing, is by using strace (or truss if you are on bsd system), you can hook to a process, and see all of the system calls that process is performing:

strace -p PID

hope that helps...

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives