<NME> test_disk.php
<BEF> <?php

function check_permission($file_name)
{
	$fp = @fopen($file_name, 'w');
}
header('Content-type: application/json');
check_password();

$file_name = 'disk_speedtest' . md5(time());

if (!check_permission($file_name)) {
?>
{
	"status": false,
	"message": "chown -R www ./",
	"result": {
		"disk_write_512k" :"×",
		"disk_read_512k" :"×",
		"disk_write_4k" :"×",
		"disk_read_4k" :"×"
	}
}
<?php
} else {
	ob_start();
	// Write 1 GiB
<?php
} else {
	ob_start();
	$disk_write_512k = trim(system('dd if=/dev/zero of=' . $file_name . ' bs=524288 count=512 conv=fdatasync 2>&1 |awk \'/copied/ {print $8 " "  $9}\''));
	$disk_read_512k = trim(system('dd if=' . $file_name . ' of=/dev/null ibs=524288 2>&1 |awk \'/copied/ {print $8 " "  $9}\''));
	unlink($file_name);
	$disk_write_4k = trim(system('dd if=/dev/zero of=' . $file_name . ' bs=4096 count=262144 conv=fdatasync 2>&1 |awk \'/copied/ {print $8 " "  $9}\''));
	$disk_read_4k = trim(system('dd if=' . $file_name . ' of=/dev/null ibs=4096 2>&1 |awk \'/copied/ {print $8 " "  $9}\''));
	unlink($file_name);
	ob_end_clean();
?>
	"message": "",
	"result": {
		"disk_write_512k" :"<?php echo $disk_write_512k; ?>",
		"disk_read_512k" :"<?php echo $disk_read_512k; ?>",
		"disk_write_4k" :"<?php echo $disk_write_4k; ?>",
		"disk_read_4k" :"<?php echo $disk_read_4k; ?>"
	}
}
<?php
}
?>
<MSG> Disable cache in disk test.

<DFF> @@ -1,5 +1,5 @@
 <?php
-
+set_time_limit(0);
 function check_permission($file_name)
 {
 	$fp = @fopen($file_name, 'w');
@@ -28,11 +28,11 @@ if (!check_permission($file_name)) {
 <?php
 } else {
 	ob_start();
-	$disk_write_512k = trim(system('dd if=/dev/zero of=' . $file_name . ' bs=524288 count=512 conv=fdatasync 2>&1 |awk \'/copied/ {print $8 " "  $9}\''));
-	$disk_read_512k = trim(system('dd if=' . $file_name . ' of=/dev/null ibs=524288 2>&1 |awk \'/copied/ {print $8 " "  $9}\''));
+	$disk_write_512k = trim(system('dd if=/dev/zero of=' . $file_name . ' bs=524288 count=512 conv=fdatasync  oflag=direct,nonblock 2>&1 |awk \'/copied/ {print $8 " "  $9}\''));
+	$disk_read_512k = trim(system('dd if=' . $file_name . ' of=/dev/null bs=524288 iflag=direct,nonblock 2>&1 |awk \'/copied/ {print $8 " "  $9}\''));
 	unlink($file_name);
-	$disk_write_4k = trim(system('dd if=/dev/zero of=' . $file_name . ' bs=4096 count=262144 conv=fdatasync 2>&1 |awk \'/copied/ {print $8 " "  $9}\''));
-	$disk_read_4k = trim(system('dd if=' . $file_name . ' of=/dev/null ibs=4096 2>&1 |awk \'/copied/ {print $8 " "  $9}\''));
+	$disk_write_4k = trim(system('dd if=/dev/zero of=' . $file_name . ' bs=4096 count=262144 conv=fdatasync oflag=direct,nonblock  2>&1 |awk \'/copied/ {print $8 " "  $9}\''));
+	$disk_read_4k = trim(system('dd if=' . $file_name . ' of=/dev/null bs=4096 iflag=direct,nonblock  2>&1 |awk \'/copied/ {print $8 " "  $9}\''));
 	unlink($file_name);
 	ob_end_clean();
 ?>

Disable cache in disk test.