Home > Article > System Tutorial > Steps to disable Centos disk writing
A Linux file has 3 times by default.
atime: The access time to this file.
ctime: The time when the inode of this file changed.
mtime: The modification time of this file.
If there are multiple small files (for example, there are multiple small pictures on the web server page), it is usually not necessary to record the access time of the file, which can reduce the I/O of writing to disk. How to configure this?
First, modify the file system configuration file: vim /etc/fstab. Then, use the noatime and nodiratime commands on a partition that contains a large number of small files.
For example: /dev/sda5 /data/pics ext3 noatime,nodiratime 0 0 In this way, when the file is accessed, no I/O will be written to the disk.
The above is the detailed content of Steps to disable Centos disk writing. For more information, please follow other related articles on the PHP Chinese website!