What‘s message buffer’s size in a node?

26 views
Skip to first unread message

郭枫

unread,
Aug 30, 2015, 12:28:14 AM8/30/15
to tokudb-user
Default node is 4M, and I wonder how much space is used for real data and how much space is for message buffer?

Leif Walsh

unread,
Aug 30, 2015, 10:11:53 AM8/30/15
to 郭枫, tokudb-user
Buffers grow as large as possible until the node is 4MB, and they can grow unevenly. So you can have 1 4MB buffer and the rest empty, or you can have 10 400k buffers. 

The only other things stored in internal nodes are search keys (up to 15 of them, so that's usually not much space) and some small metadata. 

--
Cheers,
Leif


On Sun, Aug 30, 2015 at 12:28 AM, 郭枫 <leafo...@gmail.com> wrote:

Default node is 4M, and I wonder how much space is used for real data and how much space is for message buffer?

--
You received this message because you are subscribed to the Google Groups "tokudb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tokudb-user...@googlegroups.com.
To post to this group, send email to tokud...@googlegroups.com.
Visit this group at http://groups.google.com/group/tokudb-user.
For more options, visit https://groups.google.com/d/optout.

郭枫

unread,
Aug 30, 2015, 9:48:42 PM8/30/15
to Leif Walsh, tokudb-user
Thx~
Does that means a node could have at most 15 child nodes?

Leif Walsh

unread,
Aug 30, 2015, 10:07:23 PM8/30/15
to 郭枫, tokudb-user
16. This is a parameter "fanout"

--
Cheers,
Leif

郭枫

unread,
Aug 30, 2015, 11:04:31 PM8/30/15
to Leif Walsh, tokudb-user
Then a three level hierarchy just contains 16*16*16 rows? For a miliion+ rows table, 6+ level will be needed, so a point search will need many disk seeks, is it too expensive?

Abdelhak Errami

unread,
Aug 31, 2015, 6:06:59 AM8/31/15
to 郭枫, Leif Walsh, tokudb-user
Use tokuftdump to visualize your FTs, and that should answer most of your "design" and FT structure questions.
In the latest releases PerconaFT/toku-ft the fan out is configurable so you can set it to higher or lower value as you wish

Sent from my iPhone

郭枫

unread,
Aug 31, 2015, 6:56:10 AM8/31/15
to Abdelhak Errami, Leif Walsh, tokudb-user
Thanks~
I will have a try~

Leif Walsh

unread,
Aug 31, 2015, 7:49:13 AM8/31/15
to 郭枫, tokudb-user
The leaf nodes can have as many rows as fit in 4MB. So If your million row table is 400MB of data, it's more like 3 levels. 

--
Cheers,
Leif

MARK CALLAGHAN

unread,
Aug 31, 2015, 11:34:24 AM8/31/15
to Abdelhak Errami, 郭枫, Leif Walsh, tokudb-user
On this issue I think Toku could have done better. If you build an interesting new algorithm & file-structure and "use our dump" tool is how people are expected to understand the behavior then you are going to slow down adoption.
Mark Callaghan
mdca...@gmail.com

郭枫

unread,
Sep 1, 2015, 12:17:55 AM9/1/15
to Leif Walsh, tokudb-user
Thx~
Reply all
Reply to author
Forward
0 new messages