> > > After moving around elements of the structures I found there are some > savings that can be achieved. Here's a diff of original vs optimized size: > > size of struct slab_stats = 56 > -size of struct stats = 160 > -size of struct settings = 112 > +size of struct stats = 152 > +size of struct settings = 96 > > We have just one instance of the setting struct and and a small amount of the stats structs, so I would rather organize the variables in a natural way there (I haven't checked if that's the case currently).
> size of item = 48 > -size of conn = 496 > +size of conn = 464 > > > A normal memcached instance may have thousands of these structures, so we may save space here.. > No patch for this yet, if people think it's a good idea I can tidy up the > structure definitions to insure that we don't waste space with padding. > > Cheers, Trond
