Articles tagged memcached stats

The views expressed in this blog are strictly personal, and do not necessarily represent the views of Evident Software.

By Bill Nigh

Memcached misses happen naturally and are not strictly an error condition, just not a welcome one.  Memcached provides a potentially huge key-value index for all data, and the currently allocated resources might not be up to the load. When the Memcached cache fills up as identified by the “% Memory Free” metric, Memcached will start to evict the least recently touched key-value items. To see Memcached stats on this issue, you can use the “stats\n” command over a TCP socket and check the STAT evictions output.

Memcached misses are one reason an additional layer of functionality and service is written, such as Couchbase (originally Membase). Couchbase does not evict, it persists to disk, thus obviating that particular Memcached performance issue, but at an understandable performance cost elsewhere.

Evident ClearStone, our NoSQL DB monitoring tool, provides monitoring for Memcached over a lightweight protocol that enables administrators to set thresholds and to get notified when any threshold is exceeded. Knowing that their memory is running low, an operations team can kick off a new instance of Memcached to ensure that premature evictions do not occur and requests are being served.

See also: http://www.evidentsoftware.com/proactively-monitoring-your-memcached-environment-with-evident-clearstone-ecs/

Learn more about our performance monitoring solution for Java, NoSQL and web servers.

By Bill Nigh

Why would an organization run both Memcached and Cassandra, and how could one monitor both Memcached stats and Cassandra performance in a convenient way?

There are a number of reasons for running both technologies. Maybe a recent merger has brought both technologies in house. Maybe Cassandra is being used for time series data, such as we do with Evident ClearStone, our NoSQL DB monitoring tool, and Memcached is the front serving cache. Cassandra is pretty fast as it is, so the combination is unlikely, but if such a combination were found, then the monitoring solutions would typically be point solutions. Adding the separate consoles for these products to monitoring applications for JVM such as JConsole, WebLogic, JBoss and others, and the common problem of the NoSQL space hits you in the face: a lack of integration within a single dashboard.

Evident ClearStone’s Real Time Dashboard can display JMX-based, Linux SAR, php, perl, ruby and other scripted feeds on the same page. With this functionality, you can at least begin to glimpse the outlines of a more integrated approach to monitoring application performance.

Learn more about our performance monitoring solution for Java, NoSQL and web servers.

By Bill Nigh

If you have a lot of users hitting a Memcached instance, and it’s on a box not big enough to handle the needed number of threads, then Memcached can be slow. With all threads firing and trying to get access to the RAM, Memcached::get requests are impacted. For situations like these, it is recommended to monitor Memcached stats.

You can specify thresholds in a monitoring system and configure the thresholds with notifications, liberating your ops staff from having to continually watch a monitor or—more likely—a lot of monitors. An integrated view of stats for multiple Memcached instances, as well as of other resources on the enterprise app stack, can provide useful visualizations that reveal otherwise hidden relationships among resources and processes in the Memcached environment. Evident ClearStone provides for collection of metrics and events on nearly any IT resource, with browsable history, and the ability to annotate the reporting timeline with events.

Learn more about our performance monitoring solution for Java, NoSQL and web servers

By Scott Barnett

I just happened to be in California last week when Membase and CouchOne announced their merger.  First, this is excellent news for the NoSQL movement, and it seems happy times at the new Couchbase.  I happened to be in Palo Alto when I saw Bob’s blog, so I wandered over to Tied House and shared a few pints with the folks.  I had a chance to meet Bob and several members of the Membase team (Melinda, Perry and of course James who could not wipe the smile off his face!).  I also had a chance to meet Damien (and his lovely wife) from the CouchOne team, and we got serenaded with a new merger song which was penned at the party.  There were also several folks from companies that were using NoSQL in their environments (including one guy whose name I have forgotten (sorry!), but I do remember he worked in the same building as Membase but was using MongoDB for their application!  Shame :-) .  I met folks from Facebook, Canonical, Battery Ventures among others – it’s always great to feel the Valley vibe.

Beyond drinks and laughing, there was cause for real celebration. Both the Membase and Couch folks are seeing significant traction, and they had some great positioning in mind for the combined company. The combined ability to do caching, clustering, with a document database is the consolidation we predicted would happen in the NoSQL market.  CouchOne’s positioning with mobile gives them yet another growing channel for usage of Web and cloud applications where performance (and not transactions) are paramount.

Of course, we feel that this makes ClearStone’s positioning even more important as the leading APM tool for NoSQL – developers and operations will need tools that provide deep visibility into the NoSQL “stack”, which more often than not includes Couchbase, Membase or Memcached, as well as stats, correlation and relationship-mapping with the other tiers such as RDBMS, Web, Application, System, Network, etc., etc.

So, while we just released 5.0 Beta with Management Packs for Memcached stats and performance optimization and Membase, we will be adding support for CouchOne/Couchbase as they expose more monitoring capabilities.  In fact, 5.0 comes with a RESTful API that allows developers to build their own Management Packs, so if somebody wants to take a crack at the first Couchbase adapter for ClearStone, we’re ready for you!!

Congratulations again to both the Membase and CouchOne teams, and best wishes for continued success.

Related articles

Enhanced by Zemanta

Learn more about our solution for Memcached stats, monitoring and optimization

By Tim Sneed

A while back we released a Memcached performance monitoring management pack that supports statistics collection on Memcached instances. The management pack collects all of the stats one would see by simply calling the “stats” command via a telnet socket interface. By piping metrics from multiple Memcached instances into a single collector, ECS allows users to create “logical” clusters of Memcached instances to monitor. This means that if your Memcached client has 4 Memcached instances it uses for hashing and storing, you would essentially configure ECS to collect stats from each of the 4 instances. Once the individual instance metric data is in ECS, it is also aggregated to a “cluster” level so one can monitor the health of the Memcached stack as a whole, not just the instances individually.

For a developer, monitoring Memcached data in real-time via ECS’s Real-Time Dashboard might be ideal to test different load scenarios on a set of Memcached instances and see how the instances react. This has helped one group fine-tune their compression methods on items being stored in a Memcached instance. But for an operations team, it would be inefficient to employ someone to stare at the real-time feed of metric data and look for problems. Therefore, for a Memcached stack that is in production, ECS allows administrators to set up threshold detection on any metric that flows through its pipeline. This is essential to provide the operations team with instant notification of problem areas or keeping track of KPIs.

For example, a common issue that arises with Memcached is knowing when to bring up more instances. Most need to bring up more instances when the free memory of the Memcached instance or group of instances is running out. With ECS, an administrator can configure a threshold to watch the “% Memory Free” metric (can be at cluster or instance level). In the event that the threshold is hit, emails will be sent out to the operations team to notify them that this threshold is being hit. Knowing that their memory is running low, the operations team can then kick off a new instance of Memcached to ensure that premature evictions do not occur and requests are being served. Requests not being served could mean increased response times for your website. Another common issue is a high number of missed keys. If a threshold is set and a notification is received that there is a high number of missed keys, it allows the operations (or development) team to be proactive and have immediate scope into the problem rather than waiting for someone to complain that response times are slow somewhere higher up the stack or that there is data missing from the cache.

Having this type of visibility and responding to these issues before they become a bigger problem is paramount to running a healthy cluster of Memcached instances. The Management Pack for Memcached is a perfect tool for users of Memcached to be proactive about their environment. With the Real-Time Dashboard and threshold configuration, both the ops and dev teams can obtain immediate visibility to problem areas and understand quickly how to solve them.

Lastly, since Membase is built on top of Memcached, one can use the Management Pack for Memcached to monitor their Membase environment. We are currently working on an extension to the Memcached management pack to monitor not only the underlying Memcached instance, but also collect information from Membase’s Management REST API (a RESTfulservice provided by Membase). Through the REST API, ECS will be able to collect information on Membase-specific architecture (pools, buckets, etc.) that will allow for further understanding of the health of a Membase cluster.

An example of a threshold configuration that recognizes low cluster memory within an Memcached environment.

An example of a threshold configuration that recognizes when a specific key is being missed too often within an Memcached environment.

Read more about our solution for Memcached stats, monitoring and optimization