void syncAndDropCache(void)
{
int fd;
ssize_t s;
sync();
fd = open("/proc/sys/vm/drop_caches",O_WRONLY);
if(fd<0){
printf("open vm failed\n");
return;
}
s = write(fd,"3",2);
if(s<0){
printf("write vm failed\n");
close(fd);
return;
}
close(fd);
sleep(2);
}
整個 code 在 github: https://github.com/checko/SDReadWriteSpeed
ubuntu 在 R40e 上 還有 Debian 在 Sempron 2600 上
2011年6月21日 星期二
SD Read Write Test -- force drop cache
只是要寫一個SD Card 讀寫檔案的速度測試。
簡單就是: 寫 100M, 紀錄時間,讀100M 紀錄時間。
結果: read 變成超快(200多MB/s),因為 linux cached 住剛剛用過的檔案。所以不會由 SD card 重新讀取。
follow jserv 這一篇 http://blog.linux.org.tw/~jserv/archives/002039.html
手動把 kernel cache drop 掉,再測就OK 了。
drop 的 function 是:
標籤
- 3g (19)
- 工作的備worklog (93)
- 自言自語 (36)
- 草稿 (1)
- 亂亂寫 (8)
- 翻譯 (3)
- administration (76)
- alsa (7)
- android (299)
- apple (5)
- application (42)
- archlinux (1)
- audio (3)
- avr (6)
- backup_restore (2)
- bluetooth (5)
- bookmark (38)
- bootloader (21)
- browser (5)
- cellphone (28)
- command (8)
- Configuration (27)
- debug (7)
- django (1)
- driver (15)
- earphone (1)
- editor (1)
- EFL (1)
- ffmpeg (18)
- Filesystem (4)
- GCC (8)
- Gentoo (1)
- google (1)
- Graphic (3)
- hardware (40)
- hero (7)
- hibernation (9)
- iMX51 (38)
- Info (3)
- Install (30)
- java (4)
- Kernel (102)
- language (2)
- life (2)
- make (11)
- MantainLog (38)
- MCU_P (9)
- memo (8)
- microcontroller (3)
- MINGW (7)
- network (19)
- OpenCL (1)
- OS (11)
- package (3)
- pad (1)
- ProblemAndSolve (15)
- programming (8)
- Python (7)
- raspberry_pi (23)
- SDL (2)
- sensation (13)
- setup (3)
- software_package (36)
- SQL (1)
- suspend (2)
- ToDo (5)
- tool (3)
- ubuntu (1)
- VersionControl (45)
- Virtualization (15)
- VLC (5)
- wheezy (1)
- wifi (3)
- Windows (16)
- xiaomi (1)
- xperia (1)
網誌存檔
-
▼
2011
(244)
-
▼
6月
(15)
- 提供 camera service 的好像是 /framework/base/service/cam...
- android : hw_get_module
- android - surfaceflinger screenshot example
- Android : call getISurface( )
- 本來要找 vidioc_int_g_parm 找不到,只好找唯一有 vidioc_int_g_par...
- Android - lunch & choosecombo
- SD Read Write Test -- force drop cache
- android - sdcard_perf_test
- code reading - fb_test.c
- Write additional rules on Android.mk
- Android Makefile : findleaves.py
- run shell command in Android.mk
- ADV7180 有3組 Video Input Pin,所以當作為 CVBS input 時,可以提...
- cpu_wp structure: struct cpu_wp { u32 pll_...
- Build Android 2.3 in 32bit OS
-
▼
6月
(15)
沒有留言:
張貼留言