摘要 |
<p>The present invention is applicable to the field of data processing, and provides a data cache method, device, and system in a multi-node system. The method includes: dividing a cache area of a cache medium into multiple sub-areas, where each sub-area is corresponding to a node in the system; dividing each of the sub-areas into a thread cache area and a global cache area, where there is a mapping established between the thread cache area and a disk array by adopting an associative manner, and there is a mapping established between the global cache area and the disk array by adopting a set-associative mapping manner; when a process reads a file, detecting a read frequency of the file; when the read frequency of the file is greater than a first threshold and the size of the file does not exceed a second threshold, caching the file in the thread cache area; or when the read frequency of the file is greater than the first threshold and the size of the file exceeds the second threshold, caching the file in the global cache area. According to the present invention, the problem in the prior art that a single cache area cannot identify an affinity node may be effectively solved; overheads of remote access of a system are reduced, and I/O performance of the system is improved.</p> |