2 GB database
20 million records
2 DB nodes
2 ordered indexes per record
1 primary key hash index (mandatory)
=> 2 GB DataMemory + 600 MB IndexMemory (hash index) + 320 MB
DataMemory (record overhead) + 170 MB internal node memory +
500 MB OS, other processes etc + 400 MB (ordered indexes)
As you can see the memory required is
DB size + (Currently only fixed size records, variable sized fields is
(25 + PK size)*#no_records + (Primary hash key mandatory for all
tables, PK_size = 8 bytes if no PK declared)
16*no_records + (Record overhead = handle, checksum, NULL bits, etc)
10*no_records*no_of_ordered_indexes + (Overhead 10 byte per ordered
(25 + 16 + PK_size + UK_size)*no_records * no_of_unique_indexes +
(Overhead for Unique Hash Index)
170MB + (Internal buffers, transaction state in default config)
memory for other processes and OS (normally a set of other processes,
the OS runs on the machine as well)
An important note here not yet documented in the MySQL manual is what
indexes you get.
If you provide a Primary Key it will as default be both a hash index
and an ordered index. The hash index is mandatory
but the ordered index can be removed by using the syntax USING HASH
(e.g. primary key (a,b) using hash)
If you provide a unique index it is the same that the hash index part
is mandatory but as default there will also be an
ordered index. Also here it is possible to remove the ordered index by
using the same syntax (e.g. unique (a,b) using hash).
Normal indexes declared will always be only ordered indexes.
So 2 machines equipped with 4 GB memory sounds doable, although 5 GB
If you run MySQL Servers on the same machines these need some amount of
memory as well.
Disk data is currently developed aimed for MySQL 5.0. It will make it
possible to store records on disk but fields with indexes will still be
stored in memory.
2004-08-10 kl. 04.08 skrev Richard Goh:
> --- Mikael_Ronström <mikael@stripped> wrote:
>> 2004-08-04 kl. 11.41 skrev Richard Goh:
>>> I'm rather new to mysql clustering. There are a
>>> things I'd like to ask:
>>> From the mysql faq, the recommended RAM is 16G.
>>> this clustering being in the memory?
>> Currently MySQL Cluster is memory-based, yes.
>> 16 GB is recommended but much smaller sizes are
>> possible. Successful
>> have been reported on this list with 264 MByte and
>> 240 Mhz CPU.
>>> From the mysql clustering architecture file, it
>>> that it can do such that if a transaction in 1st
>>> is not successful, then all the rest can be told
>>> rollback. Is this something similar to 2 phase
>> The cluster SW contains a variant of the 2 phase
>> commit protocol. For
>> details on this
>> see my Ph.D thesis that with a little search was
>> still accessible on
>> the Internet at
>> The transaction protocol is covered in chapter 6.
>> Eventually this will be covered by the MySQL manual.
> Hi, thanks for the reply! Was wondering, if this is a
> in-memory database, then how much RAM do I need for
> around 2G of data? Must be > 2G?
> Is there any possibility that it is not going to be
> in-memory? Because the RAM requirement seems to be
> too high....
> Do you Yahoo!?
> Take Yahoo! Mail with you! Get it on your mobile phone.
> MySQL Cluster Mailing List
> For list archives: http://lists.mysql.com/cluster
> To unsubscribe:
Mikael Ronström, Senior Software Architect
MySQL AB, www.mysql.com