10 messages in com.mysql.lists.clusterRe: How much memory is my cluster using?
FromSent OnAttachments
Kevin Burton28 Nov 2006 22:30 
Christiaan den Besten29 Nov 2006 02:22 
Geert Vanderkelen29 Nov 2006 04:39 
Kevin Burton29 Nov 2006 14:41 
Christiaan den Besten29 Nov 2006 15:51 
Kevin Burton29 Nov 2006 16:20 
Christiaan den Besten29 Nov 2006 16:25 
Kevin Burton29 Nov 2006 17:17 
Christiaan den Besten01 Dec 2006 16:40 
Mikael Ronström01 Dec 2006 18:04 
Subject:Re: How much memory is my cluster using?
From:Christiaan den Besten (chr@prolocation.net)
Date:12/01/2006 04:40:16 PM
List:com.mysql.lists.cluster

Hi !

I have tried to find some more documentation on this subject .... most because 'ndb_size.pl' returned a requirement of '400Mb', and I am still at 670Mb of DataMemory :(

--

The memory allocated by DataMemory is used to store both the actual records and indexes. There is a 16-byte overhead on each record; an additional amount for each record is incurred because it is stored in a 32KB page with 128 byte page overhead (see below). There is also a small amount wasted per page due to the fact that each record is stored in only one page.

For variable-size table attributes in MySQL 5.1, the data is stored on separate datapages, allocated from DataMemory. Variable-length records use a fixed-size part with an extra overhead of 4 bytes to reference the variable-size part. The variable-size part has 2 bytes overhead plus 2 bytes per attribute. The maximum record size is currently 8052 bytes.

--

How should one read that when using 'on disk' storage. Does each record still occupy 16 bytes of RAM -and- some stuff for variable sized columns?

Is there any documentation available where I can really compute how much (Data)Memory is to be required for 'whatever type' columns added to the schema?

bye, Chris

On 29 Nov 2006, at 11:22, Christiaan den Besten wrote: ..

I am a bit worried about that part .... I have just converted a database from "MyIsam" to NDB (On Disk) storage ... but it still uses a massive amount of DataMemory.

Have been planning to do some 'testing' ( create table bla (int i, varchar bla1 (100), varchar bla2 (100), primary (i)) ) and then insert like 10.000 records to see how much DataMemory it will use. In this pathetic example, it should only use IndexMemory for the Primary key, and all the rest -should- go to disk shouldn't it ??

Nope. The Primary Key will create also an ordered index which will be stored in the DataMemory as well. If you used USING HASH, then that would have not been the case.

That is not what I expected for a On Disk setup??

DataMemory contains also UNDO logs. Though, not I'm not sure about the magnitude of that.

Best regards,

Geert

Are you MySQL certified? www.mysql.com/certification