For DB Server, deleting large tables is tricky. If you delete a large table, you can create a hard link to the .ibd file of the original table. When multiple file names point to the same Node, deleting any file name is very fast, because the directly connected physical file is not deleted but just deletes a pointer. When the number of Node references is 1, deleting a file requires deleting all the data blocks associated with the file. Today we only discuss, if we use the above method to create a hard link file, then how to avoid IO hang when deleting the large file? The answer is the truncate tool in the coreutils toolset truncate shrinks or expands the file to the specified size Syntax: truncate option ... file ... will be created if the file does not exist. If the size of a file is larger than the specified size, the file will be truncated and lost as part of the data. If the size is smaller than the specified size, then it will be filled with 0 bytes. Option: -c --no-create If there is no such file, it will not be created -o --io-blocks The size of the file is treated as I/O block -r rfile --reference=file Base the size of each File on the size of rfile -s size --size=size Adjust the size of the file according to the options below. ‘KB’ => 1000 (KiloBytes) ‘K’ => 1024 (KibiBytes) ‘MB’ = > 1000*1000 (MegaBytes) ‘M’ => 1024*1024 (MebiBytes) ‘GB’ => 1000*1000*1000 (GigaBytes) ‘G’ => 1024*1024*1024 (GibiBytes Or units such as TPEZ are resized according to their own size according to the following symbols + Extended - Reduced < At most > At least /Rounded down multiples % Up multiples Simple example: touch abc truncate -s + 1KB abc truncate -s +1KB abc ll abc -rwxrwxrwx 1 root root 2000 November 28 05:31 abc
1. /The root partition is a mandatory partition, partitioned according to your actual situation. 2.
Too many open files Errors are common faults in Linux systems. Solutions can be easily found on the
single, enter single-user mode, then change the startup mode to id:3:initdefault: in /etc/inittab (t
When a person is operating under Linux, they may encounter that the file they are doing is accident
The whole process of automatically generating Makefile is detailed.
Method of installing Linux (CentOS) system through the network
Configuration Notes on Strengthening Linux Operating System Security
The problem of creating DBCA error problem under Linux operating system
Visudo precise user empowerment (sudo)
Low-key literary lizard: remember SUSE Linux 20th Anniversary
Linux under the lack of boot space solution
Linux operating system, Advanced Power Management
Linux server system command ac command
Analysis of differences between Unix and Linux operating systems
What are the reasons for the win8 system leading to the blue screen
Thousands of listening to the desktop lyrics show skills
Detailed steps for installing Win10 on Vmware7 virtual machine
How does the Win7 system clear the right mouse button?
Win10 system how to retrieve the resource manager CD-ROM
Php 5.3.9 + apache 2.2.17 installation configuration tutorial
Crack the restore wizard some methods
Some Win7/8 users are forced to upgrade Win10 Microsoft admits to make mistakes