← Back to team overview

openstack team mailing list archive

Re: Caching strategies in Nova ...


Agree that there are pros and cons to caching at different layers.

As for plugins, in most places where we support memcache we revert to
an in-memory cache if it isn't configured.

The work that was done during essex was to make the metadata service
use either an external cache or internal cache.  When an cloud-init
based image boots it makes dozens of calls to get data, which results
in dozens of RPC calls to nova-network to map IP to instance and then
to the DB to load data.


Background info: The in-process cache I commited is actually the code
previously known as the "fake" memcache, moved from nova/tests to
nova/common.  The reason for the move is two-fold: 1) the code was
already in use as an in-memory cache in other locations in the code 2)
nova/tests isn't included in most (all?) packagings.

Also Josh Harlow has been researching better alternatives for
in-memory caches for python (rather than re-inventing the wheel -
which I started here: https://github.com/cloudbuilders/millicache ...)


So ya, I think a summit proposal would be good.


On Thu, Mar 22, 2012 at 8:06 AM, Sandy Walsh <sandy.walsh@xxxxxxxxxxxxx> wrote:
> o/
> Vek and myself are looking into caching strategies in and around Nova.
> There are essentially two approaches: in-process and external (proxy).
> The in-process schemes sit in with the python code while the external
> ones basically proxy the the HTTP requests.
> There are some obvious pro's and con's to each approach. The external is
> easier for operations to manage, but in-process allows us greater
> control over the caching (for things like caching db calls and not just
> HTTP calls). But, in-memory also means more code, more memory usage on
> the servers, monolithic services, limited to python based solutions,
> etc. In-process also gives us access to tools like Tach
> https://github.com/ohthree/tach for profiling performance.
> I see Jesse recently landed a branch that touches on the in-process
> approach:
> https://github.com/openstack/nova/commit/1bcf5f5431d3c9620596f5329d7654872235c7ee#nova/common/memorycache.py
> I don't know if people think putting caching code inside nova is a good
> or bad idea. If we do continue down this road, it would be nice to make
> it a little more modular/plug-in-based (YAPI .. yet another plug-in).
> Perhaps a hybrid solution is required?
> We're looking at tools like memcache, beaker, varnish, etc.
> Has anyone already started down this road already? Any insights to
> share? Opinions? (summit talk?)
> What are Glance, Swift, Keystone (lite?) doing?
> -S
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp