Caches

CBFS Connect lets you use several caches, described below.
All of the described caches are created and maintained by CBFS Connect itself. CBFS Connect does not use Windows cache and disables it for the drives created by CBFS Connect.

File data cache

Each CBFS Connect storage can use either "kernel cache" or "user cache" for file data. Also the cache can be disabled by setting the FileCacheEnabled property to false. The cache is the set of memory pages, where each page contains a block of file data.

By default the cache is enabled and the kernel cache is used. Highs and lows of both cache types are:

Kernel cache:
+ It is allocated in the nonpaged (non-swappable) memory. So access to it will be maximally fast.
- Shared between all CBFS Connect storages and has maximum size (usually about 300Mb, it depends on how many memory the computer has). In the case the maximum size is reached the least used page data is freed. Also if page data isnít used quite a long of time (currently it is 120 sec) then it is also freed.

User cache:
+ The cache can be really large. Its size is specified by the CacheSize property.
+ It is shared only between CBFS Connect storages that the current process creates and handles.
- Memory is pageable (swappable). So the operation system can swap any page data to the pagefile and the next access to this page will be slow. Although CBFS Connect locks recently used pages from swapping, but the size of locked pages is fixed (it is about 300Mb) and the memory space used by locked pages is shared between all CBFS Connect storages with operating user mode cache that the CBFS Connect driver handles.

Metadata cache

The metadata cache is used to keep information about directory contents, i.e. file names, times, attributes.

Cache of non-existent files

This cache is used to keep information about the files, which have been queried by the processes but have not been found. The purpose is to reduce the number of requests to the user mode in the cases when certain process repeatedly requests certain file, which is known to be not present.