Hi folks -

I'm working on a project to embed Perl in one
of my servers (ala mod_perl). As part of my 
test suite I have a 'stress test'. Under Linux
this test works fine - it has been run continually
for up to 4 days without problems. The _same_
test under Windows (I'm using Windows 2000 Pro
with the latest patches and ActivePerl 5.8 - 806
3/31/2003) has yet to last 2 hours before rebooting
the system.

Scratching my head, I decided to uncouple my
embedding project from the test: I run a batch
file loop executing the same stress perl script.
Yep, Windows reboots within 2 hours while Linux
runs forever!

I am asking for some of you (who have a Windows
box and nothing better to do :) ) to confirm
my findings.

WARNING: THIS TEST _MAY_ BE DANGEROUS!
DO NOT RUN ON A PRODUCTION MACHINE.
DO NOT RUN IT IF YOU HAVE _ANY_ MISGIVINGS
ABOUT IT!

Also note: the machines on which I have
tested, other than the reboot, have suffered
no ill effects.

If you deceide you can help:

1) Make a scratch directory for this test.

2) The test script below copies a file twice:
once with Perl commands, and once using
File::Copy. It appends the epoch time to a
log file: 'stress_test.log'.

Copy and save this script as 'stress_test.pl'

#!/usr/bin/perl

-----------------begin--------------------
use strict;
use warnings;
use File::Copy;

my $in = 'stress_test.in';
my $out1 = 'stress_test.out1';
my $out2 = 'stress_test.out2';
my $log = 'stress_test.log';

open (IN, $in) or die "$in open: $!\n";
open (OUT1, "> $out1") or die "$out1 open: $!\n";
print OUT1 $_ while (<IN>);
close OUT1;
close IN;

copy ($in, $out2);

my $now = time();
open (LOG, "+>> $log") or die "$log open: $!\n";
print LOG "$now\n";
close LOG;

exit 0;
------------------cut---------------------

3) Copy and save this as 'stress.bat'

-----------------begin--------------------
@echo off
erase stress_test.log
:loop
perl stress_test.pl
goto loop
------------------cut---------------------

4) Copy a ~50Kb text file to your scratch
directory and rename it 'stress_test.in'

5) Execute the script; this will put a heavy
load on your CPU.

6) Please let me know what happens. I have
tried this on three different Windows machines
and it has always failed. If it fails, please
let me know how many tests ran (line count
of the log file) and the elapsed time
(elapsed time in seconds = last log entry -
first log entry).

Sorry to ask so much of you, and feel free to
pass on this, but I am going crazy trying
to understand what is happening.

Aloha => Beau;



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to