Reputation: 5382
When I do grep on a large local file, it took long time. But when I do it again, now it is much faster. Is this behaviour because of some type of internal cache maintained by Linux systems?
Upvotes: 3
Views: 363
Reputation: 23266
The virtual memory page cache will keep copies of pages from the disk in your RAM which means the access time is faster and the corresponding read/pread
calls will be serviced from memory instead of having to go to disk.
Upvotes: 2
Reputation: 5543
Yes. All free ram is be used to cache data read from your harddisk.
Upvotes: 6