In Linux system operation, in order to improve the efficiency of disk read and write, you need to use the sync command. Many people don't know the usage of the sync command. The following small series will introduce you how to use the sync command.
first look at the buffer and cache:
buffer, in order to solve the efficiency of disk write;
cache, in order to solve the efficiency of disk read.
In order to improve the efficiency of reading and writing disks, Linux systems first put data in a buffer.
When writing a disk, the data is not immediately written to the disk, but is written to the buffer first.
If you restart your system at this time, you may lose data.
The sync command is used to flush the file system buffer so that the data is actually written to the disk and the buffer can be released.
flush is used to empty the buffer.
The sync command forces the data to be written to disk and releases the buffer corresponding to the data.
So often after writing the disk, enter the sync command to actually write the data to disk.
If you do not manually enter the sync command to actually write the disk, the Linux system will have two kinds of disk write time:
1. The kflush kernel thread periodically writes to the disk. ;
2. The buffer is full and has to be written.
The above is the way to use the sync command in Linux. With the sync command, you can release the buffer in the data and speed up the reading and writing of the Linux disk to improve the efficiency of disk reading and writing.
Sublime Text is a code editor that supports Linux and other operating systems. In L
curl is an open source file transfer tool that can be used in Linux systems. If you
When you use the X11 forwarding option of SSH to connect to the remote connection,
On Linux systems, it is often necessary to clean up some of the larger files to exp
How to use the backup-manager tool to back up the Linux system
Detailed examples of Linux dynamic library generation
How to change the jenkins port number on Ubuntu
Linux iis can not run asp file how to solve
Linux vim shows utf-8 document garbled how to do?
Linux uses the cat command to display hidden characters
How to install vsftpd server under Linux
Linux command shutdown restart command usage summary
How does Ubuntu replace the login window background
Genuine Win7 problem recorder is not afraid of system failure
Microsoft claims 64-bit version of Win 7 defect hacker can remote control system
How to open voice recognition system in WinXP
Sun drying those new features in Windows 10
Windows XP can not install USB 2.0 driver problem solving
Win10 Mobile/PC first anniversary update quick version 14393.3 update content summary
How to solve the problem of Win7 playing League of Legends invalid?
Win7 firewall how to close the firewall shutdown command execution step
How to download video with Baidu video
Small fish one-button reloading system tool Computer white can also be installed machine master