Prefetching and multithreading for improved file read performance
First Claim
1. In a file server having a cache memory and storage containing a file, a method of responding to a request for reading an extent of data from the file, the extent of data spanning a first series of multiple blocks of file data, the file also spanning a second series of multiple blocks of file data following the first series of multiple blocks of file data, the method comprising:
- (a) activating a respective read thread for reading each of the multiple blocks of file data in the first series of multiple blocks of file data so that the read threads are concurrently reading the multiple blocks of file data in the first series of multiple blocks of file data; and
(b) prefetching the second series of multiple blocks of file data by reading from the storage and writing to the cache memory each block of file data in the second series of multiple blocks of file data that is not found in the cache memory.
9 Assignments
0 Petitions
Accused Products
Abstract
A problem of latency during a read of a file is solved by activating multiple concurrent read threads and also by prefetching blocks of file data from storage to a file system cache. Prefetching ensures that by the time that a client or application needs more file data, the file data will already have been read from storage and written to the cache as a background operation. For example, a file server responds to a request to read an extent of file data consisting of eight consecutive file blocks by activating concurrent block read threads for reading the file blocks and by prefetching from the storage to the cache eight more consecutive blocks of data from the file.
-
Citations
46 Claims
-
1. In a file server having a cache memory and storage containing a file, a method of responding to a request for reading an extent of data from the file, the extent of data spanning a first series of multiple blocks of file data, the file also spanning a second series of multiple blocks of file data following the first series of multiple blocks of file data, the method comprising:
-
(a) activating a respective read thread for reading each of the multiple blocks of file data in the first series of multiple blocks of file data so that the read threads are concurrently reading the multiple blocks of file data in the first series of multiple blocks of file data; and (b) prefetching the second series of multiple blocks of file data by reading from the storage and writing to the cache memory each block of file data in the second series of multiple blocks of file data that is not found in the cache memory. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. In a file server having a cache memory and storage containing a file, a method of responding to a request for reading an extent of data from the file, the extent of data spanning a first series of multiple blocks of file data, the file also spanning a second series of multiple blocks of file data following the first series of multiple blocks of file data, the method comprising:
-
executing a main thread for responding to the request for reading the extent of data from the file, the main thread activating block read threads for reading at least some of the blocks of file data in the first series of multiple blocks of file data so that the block read threads are concurrently reading said at least some of the blocks of file data in the first series of multiple blocks of file data, and then the main thread activating a prefetch thread for prefetching the second series of multiple blocks of file data by reading from the storage and writing to the cache memory each block of file data in the second series of multiple blocks of file data that is not found in the cache memory; and
thensuspending the main thread, and then activating the main thread once the block read threads have finished reading said at least some of the blocks of file data in the first series of multiple blocks of file data. - View Dependent Claims (12, 13, 14, 15, 16)
-
-
17. In a file server having a file system cache memory and storage containing a file, a method of responding to a request for reading an extent of data from the file, the extent of data including a first series of multiple blocks of file data, the file including a second series of multiple blocks of file data immediately following the first series of multiple blocks of file data, the method comprising:
activating concurrent read operations, each of the concurrent read operations reading a respective one of the multiple blocks of file data, and prefetching from the storage to the file system cache memory the second series of multiple blocks of file data immediately following the first series of multiple blocks of file data. - View Dependent Claims (18, 19, 20, 21, 22, 23)
-
24. A file server comprising a cache memory and storage containing a file, the file server being programmed for responding to a request for reading an extent of data from the file, the extent of data spanning a first series of multiple blocks of file data, the file also spanning a second series of multiple blocks of file data following the first series of multiple blocks of file data, the file server being programmed for responding to the request for reading the extent of data from the file by:
-
(a) activating a respective read thread for reading each of the multiple blocks of file data in the first series of multiple blocks of file data so that the read threads are concurrently reading the multiple blocks of file data in the first series of multiple blocks of file data; and (b) prefetching the second series of multiple blocks of file data by reading from the storage and writing to the cache memory each block of file data in the second series of multiple blocks of file data that is not found in the cache memory. - View Dependent Claims (25, 26, 27, 28, 29, 30, 31, 32, 33)
-
-
34. A file server comprising a cache memory and storage containing a file, the file server being programmed for responding to a request for reading an extent of data from the file, the extent of data spanning a first series of multiple blocks of file data, the file also spanning a second series of multiple blocks of file data following the first series of multiple blocks of file data, the file server being programmed for responding to the request for reading the extent of data from the file by executing a main thread for responding to the request for reading the extent of data from the file,
the main thread being programmed for activating block read threads for reading at least some of the blocks of file data in the first series of multiple blocks of file data so that the block read threads are concurrently reading said at least some of the blocks of file data in the first series of multiple blocks of file data, and then activating a prefetch thread for prefetching the second series of multiple blocks of file data, the prefetching of the second series of multiple blocks of file data reading from the storage and writing to the cache memory each block of file data in the second series of multiple blocks of file data that is not found in the cache memory, and then suspending the main thread, and then activating the main thread once the block read threads have finished reading the number of blocks of file data in the first series of multiple blocks of file data.
- 40. A file server comprising a file system cache memory and storage containing a file, the file server being programmed for responding to a request for reading an extent of data from the file, the extent of data spanning a first series of multiple blocks of file data, the file also spanning a second series of multiple blocks of file data following the first series of multiple blocks of file data, the file server being programmed for responding to the request for reading the extent of data from the file by activating concurrent read operations, each of the concurrent read operations reading a respective one of the multiple blocks of file data, and prefetching from the storage to the file system cache memory a second series of multiple blocks of file data immediately following the first series of multiple blocks of file data.
Specification