APM: running at 100% processor

Mike Stok mike at stok.co.uk
Tue Apr 1 12:24:34 CST 2003


On Tue, 1 Apr 2003, Goldilox wrote:

> I guess I figured out that Perl doesn't handle NULL cells in a database at all
> (other than spewing warnings everywhere). Does anybody have a clue why this
> would be?

What sort of warnings?  Look for the string NULL in the DBI man page then
you too might have a place to start looking...
 
> My next question is in regards to running one of my scripts. I run one script
> (or plan to run it) every ten minutes to create a cache of database output for
> web users (since this server could easily be getting a lot of traffic during
> bad weather). On my machine here it runs at 100% processor power for the entire
> time it runs (couple minutes). I haven't tried it yet on the more powerful web
> server (Windows 2000 server), but I am curious if there is anything I need to
> do to make the script run at less than 100% to allow the server to accomplish
> its other tasks without being bogged down my my script running in the
> background? I guess this is probably a sysadmin question rather than a Perl
> question - but I figured someone here might have run into the same problem?

What system are you running on?  What is the nature of the task?

One way to go at it might beIt may be to run the cache creation task at a
lower priority (it would still use 100% of the CPU, but would give it up
more easily if another task came along.)  Alternatively you could cache
results as you generate them (if generating an individual result isn't too
costly) and expire them after a while.  There are modules on CPAN which
can help out here.  

That is just some arm-waving, so feel free to torch it!

Mike

-- 
mike at stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       | GPG PGP Key      1024D/059913DA 
mike at exegenix.com                  | Fingerprint      0570 71CD 6790 7C28 3D60
http://www.exegenix.com/           |                  75D2 9EC4 C1C0 0599 13DA




More information about the Austin mailing list