in reply to Re: Multithreaded Script CPU Usage
in thread Multithreaded Script CPU Usage
Just a few comments:
1) You should not need 2 scripts. If your initial script did not create threads, but instead began scans using 'system' and putting the process in background, then the same script can monitor the output files and start new FileList executions as previous ones end.
2) There is still the issue of what the 2 mysql functions really do. You might post the 'fix-the-file' function and the 'load data' function code if they are not too large. Either of these could also be taking lots of CPU. Does your mysql_load_data create bulk inserts or individual inserts? bulk inserts are much faster, both for the client and the server
1) You should not need 2 scripts. If your initial script did not create threads, but instead began scans using 'system' and putting the process in background, then the same script can monitor the output files and start new FileList executions as previous ones end.
2) There is still the issue of what the 2 mysql functions really do. You might post the 'fix-the-file' function and the 'load data' function code if they are not too large. Either of these could also be taking lots of CPU. Does your mysql_load_data create bulk inserts or individual inserts? bulk inserts are much faster, both for the client and the server
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Multithreaded Script CPU Usage
by Illuminatus (Curate) on Aug 29, 2008 at 15:34 UTC | |
by Zenshai (Sexton) on Sep 08, 2008 at 13:49 UTC | |
Re^3: Multithreaded Script CPU Usage
by Zenshai (Sexton) on Aug 26, 2008 at 17:38 UTC |
In Section
Seekers of Perl Wisdom