Hello,
I have a BeagleBone A.5 board running on external power. I've been having some trouble with intermittent slowdowns when writing to the disk or to a database. I have tested it with C++ file io and a php script and the same issue arises regardless of implementation. Out of frustration, I did a completely fresh install as instructed on the Archlinux BeagleBone install guide page: http://archlinuxarm.org/platforms/armv7/beaglebone
Then I installed lighttpd, fcgi, php, and php-cgi per the instructions here: https://wiki.archlinux.org/index.php/Lighttpd
Back to the problem. When I run this script:
$this->bbcode_second_pass_code('', '<?php
$f = fopen("file.txt", 'w') or die("can't open file");;
echo "<html><body>\n";
for($i = 0; $i < 30; $i++){
$time = microtime(true);
$data = "$time" . "\n";
fwrite($f, $data);
echo "Wrote data at $time.<br />\n";
usleep(1000000);
}
fclose($con);
echo "</body></html>\n";
?>')
It gives an output of:
$this->bbcode_second_pass_code('', 'Wrote data at 943938238.09175.
Wrote data at 943938239.09346.
Wrote data at 943938240.09383.
Wrote data at 943938241.09412.
Wrote data at 943938242.09443.
Wrote data at 943938243.09481.
Wrote data at 943938245.44852.
Wrote data at 943938246.44894.
Wrote data at 943938247.44933.
Wrote data at 943938248.44971.
Wrote data at 943938249.45018.
Wrote data at 943938250.4506.
Wrote data at 943938251.45099.
Wrote data at 943938252.45143.
Wrote data at 943938253.45182.
Wrote data at 943938254.45224.
Wrote data at 943938255.45276.
Wrote data at 943938256.45318.
Wrote data at 943938257.45375.
Wrote data at 943938258.45414.
Wrote data at 943938259.45452.
Wrote data at 943938260.45496.
Wrote data at 943938261.45542.
Wrote data at 943938262.4558.
Wrote data at 943938263.45615.
Wrote data at 943938264.45649.
Wrote data at 943938265.45687.
Wrote data at 943938266.45726.
Wrote data at 943938267.45773.
Wrote data at 943938268.45812.')
Notice the slow down between
$this->bbcode_second_pass_code('', 'Wrote data at 943938243.09481.')
and
$this->bbcode_second_pass_code('', 'Wrote data at 943938245.44852.')
For the applications I'm writing this is not an acceptable latency. Any clues as to what might cause the slowdown? I would really appreciate the help. Thanks!
Edit: I just did a fresh install of Ubuntu on the BeagleBone with apache, then installed php5. Same exact issue. I'm really grasping at the air here.