PrimoCache Overview

What Is PrimoCache?

PrimoCache is a software caching solution that cooperates with system memory, solid-state drives (SSDs) and flash drives to accelerate relatively slow storage devices. It transparently stores disk data into faster cache devices such as system memory and SSDs, so that future read requests for those data will be served directly from the cache and be faster. Thus access time will be reduced, showing a great improvement in the system reading performance.

Furthermore, PrimoCache is able to complete write requests very quickly by temporarily writing incoming data to fast cache devices first and writing them back to target disks later. In this manner, cache devices work as writing buffer, greatly improving the system writing performance and making the system able to handle heavy or stream write IOs.

What It Can Do

PrimoCache is powerful and flexible, and able to be easily adopted in a very broad application scenarios and fields. It can solve the problem of read/write performance bottlenecks in personal computers, workstations, and small to large servers. It can help persons who are enthusiastic to improve boot and load times, working performance, gaming experience, system responsiveness, etc. It can also help persons who want to reduce writes and wear on SSDs and extend their lifespan.

The following is a simple list of scenarios for which you may use PrimoCache, but not limited to these scenarios.

  • You installed Windows on a mechanical hard disk, and you don't want to reinstall anything, but want to get SSD-like performance.
  • You need large-capacity storage but don't have enough budgets for expensive large-capacity and high-performance SSDs. You are looking for a cost-effective solution.
  • You frequently download lots of files from the Internet and want to protect your drives against too many writes.
  • You installed 32-bit Windows and 4GB or more physical memory, and want to utilize memory that is hidden in Windows.
  • Your games or applications create and write lots of temporary files to drives during running, causing lags and bad experience.
  • Your servers are not able to process heavy IO requests in time and become slow, even unresponsive.
  • Your servers use traditional storage, and major infrastructure cannot be changed or data cannot be migrated. You want to enhance servers' performance.

PrimoCache in Detail

PrimoCache implements a two-level caching architecture consisting of level-1 cache and level-2 cache. Level-1 cache, also called RAM cache, is composed of physical memory. Level-2 cache, also known as SSD cache, is a secondary cache which typically resides on a solid-state drive, a flash drive or other fast persistent storage device. Obviously level-1 cache runs much faster than level-2 cache, although it is usually much smaller. PrimoCache allows a single level cache configuration using either level-1 cache or level-2 cache, as well as a two-level cache configuration using both levels of cache.

Unlike level-1 cache which cannot keep cache contents on reboot, level-2 cache is able to retain its cache contents across computer reboots because of the persistent nature of storage devices. This avoids fetching often-accessed data again from slow disks each time computer boots up. Thus level-2 cache will remarkably reduce boot-up time and speed up applications for those computers which install mechanical hard disks.

PrimoCache also supports write-deferred caching mode, which executes write requests on the cache first and synchronizes data from the cache to the disk after custom delays. Therefore write requests can be responded and completed very fast, greatly improving the disk write performance.

In addition, PrimoCache implements the Unified Invisible Memory Management Interface (UIMMI), which can use Invisible Memory as level-1 cache. Invisible Memory, also known as Unmanaged Memory, usually exists on 32-bit desktop Windows where 4GB or more physical memory is installed. This feature helps to overcome the Windows limits on amount of system memory and fully utilize all installed physical memory.

PrimoCache fulfills an intelligent cache replacement algorithm which optimally determines cache blocks needed to be discarded to make room for new data when cache space is full. This cache algorithm combines two normal algorithms which are Least Frequently Used (LFU) and Least Recently Used (LRU), and provides a better cache hit ratio. It is self-tuning and requires no user-specified parameters.

PrimoCache allows multiple cache strategies and flexible configurations. It is implemented in Windows kernel level and is transparent to other applications. Therefore no application or system changes are required for this caching solution. With PrimoCache, you can easily setup caches for local disks and speed up your computers.

How It Works

One of the PrimoCache core components is a storage class filter driver which resides in the storage stack, intercepting I/O requests for data on disk. If requested data is contained in the cache, this request can be served by simply reading the cache, which is comparably faster. Otherwise the data has to be fetched from disk. Hence, the more requests can be served from the cache the better the overall system performance is.

PrimoCache Principle Fig. 1PrimoCache Principle Fig. 2

Why PrimoCache?

Why do we need PrimoCache since Windows has already implemented a file-system level cache?

  • PrimoCache is a block-level cache program which caches data on a logical block basis (offsets within a disk), while windows cache is a file-system level program which caches on a virtual block basis (offsets within a file). Each has strengths and weaknesses, and PrimoCache can be a good supplement to Windows cache.
  • Some applications can bypass Windows cache but cannot bypass PrimoCache because PrimoCache runs at a lower level in Windows.
  • Windows caches all data, while PrimoCache can cache on behalf of a specified volume in which users are interested. Given same size of system memory, the latter has a higher hit-rate.
  • PrimoCache supports persistent SSD caching for mechanical hard disks, improving system boot-up time and applications loading time. Windows cache cannot.
  • PrimoCache can customize write-deferred mode, while Windows cache cannot.
  • PrimoCache can make use of Invisible Memory on 32-bit Windows as cache, overcoming the Windows limits on amount of system memory.