Skip to Content

Frequently Asked Questions about Memcached and Web Cache

FAQ: Memcached and Web Cache

Jump to:
Memory Utilization
High Availability
Management and Reporting

What is Memcached?

Memcached is a general-purpose distributed memory caching system that was originally developed by Danga Interactive for LiveJournal, but is now used by many other sites. It is often used to speed up dynamic database-driven websites by caching data and objects in memory to reduce the number of times the database must be read.

Is Gear6 Web Cache compatible with Memcached?

Yes. Gear6 Web Cache is 100% protocol-compliant with Memcached. Existing calls to Memcached will work with Gear6 Web Cache without code modifications.

Does Gear6 Web Cache support the Binary Memcached protocol?

The binary protocol is an enhancement to Memcached to increase performance by reducing packet overhead. The binary protocol is part of Memcached 1.4, which was released on July 9th, 2009.

How is Gear6 Web Cache like and unlike Memcached?

Gear6 Web Cache is a protocol-compliant Memcached Web caching solution that can be used anywhere Memcached is used, but adds significant capabilities in memory utilization and density, high availability, and management and reporting. Code that already works with Memcached needs no client-side code changes to work with the Gear6 solution.

How much memory can be deployed in one Gear6 Web Cache Module?

We offer the 1U Gear6 Web Cache Module with up to 384 Gbytes of memory, consisting of 64 Gbytes of DRAM and 320 Gbytes of flash memory.

How large a configuration can I deploy with Gear6 Web Cache?

Gear6 testing has included Gear6 Web Cache configurations of 32 modules. With a per-module capacity of 384 Gbytes, this represents a caching tier capacity of over twelve terabytes. There is no theoretical limit to the size of a Gear6 Web Cache configuration.

What's a typical deployment of Gear6 Web Cache?

As of early 2009, Memcached servers are typically equipped with 32 Gbytes of DRAM or less, due to cost considerations. Gear6 Web Cache configurations allow for up to 384 Gbytes per node. With such large Memcached capacity now practical and affordable, Web site operators can provide more Web services with the benefits of Memcached.

How do I decide how much Gear6 Web Cache to deploy?

Through its hybrid DRAM-flash architecture, Gear6 Web Cache makes very large Memcached configurations both practical and affordable. Gear6 Web Cache customers typically take advantage of its high density to add cache benefits to additional Web services, including session and profile management and very large-scale database caching.

Can I introduce Gear6 Web Cache into an existing Memcached tier?

Yes. You have complete flexibility to phase Gear6 Web Cache into an existing environment, and it will run side-by-side with open source implementations. Of course, most of the unique benefits of Gear6 Web Cache (such as replication and enhanced management) will be available only to that part of your caching tier that uses it.

How does Gear6 Web Cache reduce rack space, power and cooling requirements?

Gear6 Web Cache employs a unique hybrid DRAM-flash memory architecture, exploiting the very high density and low cost of flash memory. This allows the economical deployment of five to ten times more Memcached memory per unit of rack space than is found in typical Memcached deployments. The same amount of Memcached memory can be deployed in fewer hardware modules, saving rack space, power and cooling, or much larger amounts of Memcached can be deployed without increasing rack space, power or cooling.

What applications and/or databases are most often used with Gear6 Web Cache?

As is true with Memcached, Gear6 Web Cache is usable with a broad range of front- and back-end applications and databases. Tested environments include PHP, Perl, Python, Ruby, Postgres, MySQL and SQL.

Is Gear6 Web Cache suitable to Microsoft web site environments?

Yes. Gear6 Web Cache, like standard Memcached, works independently of front- and back-end applications and databases. There are open-source client libraries available for a variety of languages and platforms, including Microsoft’s offerings.

How are Gear6 Web Cache software upgrades performed?

We know that most Web sites need to operate on a 7x24 basis. For this reason, Gear6 Web Cache software updates can be performed in a staged fashion, so cache services operate without interruption as upgrades occur.

What changes must be made to existing Memcached calls to use Gear6 Web Cache?

None. If you use Memcached today, you are ready to use Gear6 Web Cache. No changes are required to your code to benefit from the density, availability and management advantages of Gear6 Web Cache.

Memory Utilization


Doesn't the use of flash memory introduce latency issues?

Most Gear6 Web Cache users see little or no additional latency as compared to an all-DRAM caching architecture. Gear6 Web Cache uses sophisticated object placement algorithms, internal DRAM caching, and enhanced memory management systems to ensure DRAM or near-DRAM levels of Memcached performance. In effect, Gear6 Web Cache acts and performs as a very high-density all-DRAM Memcached solution.

Doesn't flash memory have a limited lifetime compared to DRAM?

If used in exactly the same ways, flash memory does have a shorter lifetime than DRAM. Gear6 Web Cache employs a number of techniques to address this issue. Internal caches within Gear6 Web Cache limit the number of times that flash access is required. Writing objects across flash boundaries is minimized. Gear6 Web Cache also constantly monitors both DRAM and flash memory in all cache modules, removing form service any blocks where failures have occurred, and proactively deactivating those where failures appear imminent or likely.

How do you manage the placement of cache objects across DRAM and flash memory?

Gear6 Web Cache uses advanced memory management techniques to provide the highest possible density, performance and reliability. The most frequently accessed items are placed in DRAM for fastest performance. Internal caches speed the retrieval of data from flash memory. Objects are transferred between DRAM and flash memory as needed to maximize performance. In most cases, the performance of a Gear6 Web Cache module, comprised of both DRAM and flash, is indistinguishable from that of an all-DRAM module.

How do Gear6 Web Cache slab allocation algorithms compare to those in standard Memcached?

Standard memcached manages memory through a pre-set selection of Memcached bucket sizes. In operation these buckets are on average only 75% full, meaning that 25% or more of the memory capacity is wasted. Gear6 Web Cache uses a fine-grained block-based algorithm that virtually eliminates this waste, boosting by a third its memory usage efficiency.

How large can cache objects be with Gear6 Web Cache, and how does this compare to standard Memcached?

Standard memcached manages memory through a pre-set selection of Memcached bucket sizes. In operation these buckets are on average only 75% full, meaning that 25% of the memory capacity is wasted. Gear6 Web Cache uses a fine-grained block-based algorithm that virtually eliminates this waste, boosting by a third its memory usage efficiency.

How do Gear6 Web Cache eviction algorithms compare to those in standard Memcached?

Standard Memcached employs an LRU (“least recently used”) eviction algorithm that overwrites cache data based only on how recently it was used, and without regard for how soon or how often it may be needed again. Gear6 Web Cache uses enhanced cost-based algorithms to make eviction decisions, caching the most frequently-used data. This increases cache hit rates and reduces the number of times data must be retrieved from storage (your database, file server or other source).

High Availability


Isn't Memcached already highly available because of its distributed architecture?

The distributed architecture of standard Memcached allows cache services to be scaled across multiple hardware modules, enabling cache scalability. But Memcached does not gracefully address, for example, the failure of a module, or a cache tier software “hang.”

What happens in a typical Memcached deployment when a hardware module fails?

Depending on how a failure occurs, the service may or may not continue to operate, the IP addresses of modules may vanish, cascading failures can occur, and large application/database spikes may occur, adversely affecting the experience of site users.

In a standard Memcached deployment, how do site operators become aware of the failure of a hardware module, or of other failures within a cache tier?

Memcached provides fairly little management information that could inform site operators of a failure. The first indication of a Memcached failure is often a spike in application or database traffic, meaning that users are already being adversely affected.

What happens when a hardware module fails in a Gear6 Web Cache configuration?

The clustered architecture of Gear6 Web Cache monitors the operation of the cache service, and reacts immediately if a hardware or process failure occurs. With Gear6 Web Cache, if a hardware module fails, its operations fail over immediately to another module. Memcached IP addresses stay alive throughout the failure. This capability is called “continuous service availability.” This is the lowest-cost, highest-density way to deploy Gear6 Web Cache

When a module fails, and Gear6 Web Cache fails over to an available standby module, what happens to the cache data in the failed module?

In “continuous service availability” mode, the cache data in the failed module is lost, and the loading of new data into a new module begins immediately. There may be a performance impact, meaning that database and application loads may be higher, until the loading of that module is complete. For cases where this is not acceptable, Gear6 provides a replication-based capability called “continuous data availability.”

What happens when a module fails and Gear6 Web Cache replication (continuous data availability) is enabled?

In “continuous data availability” mode, all cache data contained in Gear6 Web Cache is automatically stored in two locations. If a module fails, Gear6 Web Cache moves the caching service over to another module already containing the same data, and operations continue immediately and without performance impact. Database and application spikes are avoided.

Besides memory failures, what other failures can occur, and how does Gear6 Web Cache address them?

Hardware module components (power supplies, fans, NICs, etc.) are the most common hardware failure sources, and these and other components are protected by physical redundancy within the Gear6 Web Cache Module. The Gear6 Web Cache cluster architecture provides assurance that caching continues even if an entire module fails, or if a software process failure occurs.

How do you monitor the health of DRAM and flash memory in a Gear6 Web Cache configuration?

Gear6 Web Cache monitors the health of DRAM through MCE (Machine Check Exception) metrics, and of flash memory through SMART (Self Monitoring, Analysis and Reporting Technology) data. In both cases, thresholds and historical data are monitored for trends and problem indications. Alerts are issued if desired, and memory is taken out of service when failures are imminent.

Management and Reporting


What aspects of Gear6 Web Cache can I view and manage through the management interface?

Typical Memcached deployments tend to operate without providing much visibility into the caching tier. Gear6 Web Cache is fully instrumented and equipped with intuitive interfaces that provide visibility at multiple levels within the cache tier, enabling better operational, architectural and investment decisions. Physical and logical aggregation and drill-downs let you view your entire Memcached infrastructure at a single glance, or identify and “drill down” on any aspect of Memcached operations to whatever level of detail is desired. Hot key, client and instance reporting are provided through Gear6 Advanced Reporter, letting you easily see, for example, the top n keys in your caching tier, or the top n keys for any Memcached instance or client. This information is useful for load balancing and architectural decisions.

Are Gear6 management capabilities also available through a command-line interface?

Yes. Gear6 Web Cache includes a fully-functional command line interface (CLI).

Is Gear6 Web Cache management compatible with my existing monitoring infrastructure?

Yes. We support SNMP and have tested Gear6 Web Cache with the Cacti, Hyperic and Nagios monitoring tools.