Galera writeset cache

Skip to first unread message

Laurent MINOST

unread,
Sep 17, 2012, 7:44:32 AM9/17/12
to codersh...@googlegroups.com
Hi,

Can anyone please provide more informations about the gcache.size and gcache.page_size parameters please ? 


gcache.size128MbSize of the ring buffer storage. This will be preallocated on startup
gcache.page_size128MbSize of the page files in page storage. The limit on overall page storage is the size of the disk. Pages are prefixed by “gcache.page”.
My questions are :
What is the page_size in comparison to the global cache size ? Is it the size of each "segment" in the global cache ?
If I want to allocate 2GB of gache.size, what would be the "best" value that make sense to configure for gcache.page_size please ?
For a server with 32GB of RAM and a dataset of almost 50GB, which size can be recommended for gcache.size please ? Is there any values to take in consideration to estimate/calculate the best values for gcache.size please ?

Thks.
Regards,

Laurent

Alex Yurchenko

unread,
Sep 18, 2012, 11:31:54 AM9/18/12
to codersh...@googlegroups.com
Hi Laurent,

For gcache.size:

Use wsrep_replicated_bytes and wsrep_received_bytes to determine the
overall rate of replication. Then decide how much time you need. Then
size = rate x time.

gcache.page_size is pretty much irrelevant for anybody.

Regards,
Alex

On 2012-09-17 14:44, Laurent MINOST wrote:
> Hi,
>
> Can anyone please provide more informations about the gcache.size and
> gcache.page_size parameters please ?
>
> From http://www.codership.com/wiki/doku.php?id=galera_parameters,
> I've read
> that :
>
> gcache.size128MbSize of the ring buffer storage. This will be
> preallocated
> on startupgcache.page_size128MbSize of the page files in page
> storage. The
> limit on overall page storage is the size of the disk. Pages are
> prefixed
> by “gcache.page”.
> My questions are :
> What is the page_size in comparison to the global cache size ? Is it
> the
> size of each "segment" in the global cache ?
> If I want to allocate 2GB of gache.size, what would be the "best"
> value
> that make sense to configure for gcache.page_size please ?
> For a server with 32GB of RAM and a dataset of almost 50GB, which
> size can
> be recommended for gcache.size please ? Is there any values to take
> in
> consideration to estimate/calculate the best values for gcache.size
> please ?
>
> Thks.
> Regards,
>
> Laurent

--
Alexey Yurchenko,
Codership Oy, www.codership.com
Skype: alexey.yurchenko, Phone: +358-400-516-011

Laurent MINOST

unread,
Sep 19, 2012, 3:46:58 AM9/19/12
to codersh...@googlegroups.com
Hi Alexey,

Thanks for this useful tip but could you please tell what I need to do exactly :

rate = wsrep_replicated_bytes /  wsrep_received_bytes ?
rate = wsrep_received_bytes / wsrep_replicated_bytes ? 
time should be in seconds ? minutes ? hours ?

Thanks.
Regards,

Laurent

Alex Yurchenko

unread,
Sep 21, 2012, 3:07:51 AM9/21/12
to codersh...@googlegroups.com
Hi,

All these settings are for on-disk storage (which is mmapped, so
prepare to see a much bigger mysqld image than it really is).

The only setting you're interested in and the one that controls the
size of the "permanent" cache for IST is gcache.size. This is what you
increase if you want to be able to attach nodes hours later without the
need for snapshot.

In case state snapshot transfer takes hours or days, the only thing you
should be worried is the free disk space. New cache pages will be
allocated as needed and cleaned up when not needed.

Regards,
Alex

On 2012-09-21 03:49, Mark Niel wrote:
> I have some questions on this topic as well.
> If you have a huge database, and taking a snapshot takes hours, and
> you
> have at least a gig of data coming in each hour. you may not have
> enough
> ram on the system for gacache.size.
>
> Some questions:
> 1. gcache.size is all stored in ram?
> 2. What can you do to save the cache on disk to increase to a high
> amount
> so you can attach a node hours later?
>
> Will any of these settings do that?
>
> gcache.size
> gcache.page_size
> gcache.keep_pages_size
Reply all
Reply to author
Forward
0 new messages