作者ggcip0514 (汪汪)
看板PHP
标题[请益] 读档对於disk i/o 的影响
时间Mon Apr 3 22:47:23 2017
小弟最近想利用php 中的读档去测试 server dis i/o的状况 (apache centos7)
会先写档後读档再架上某个数值後再写档 (write -> read -> write again)
找了其中两种方法去开启档案:
$myfile = fopen("log.json", "r");
$file=file_get_contents("log.json");
在网页上都可以顺利显现读档出来的数值
iotop 与 glances 都观测不到read disk i/o
https://i.stack.imgur.com/hTswN.jpg
https://i.stack.imgur.com/9bZYz.jpg
有大大可以开释一下吗? 感谢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 111.253.5.194
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/PHP/M.1491230846.A.7D8.html
1F:→ MOONRAKER: 推测: 档案太小 读写都还在cache里面 04/04 04:27