MySQL Forums
Forum List  »  NDB clusters

high memory consumption
Posted by: Ben SQL
Date: May 21, 2012 10:28AM

Can someone tell me where my memory did go?

I'm storing one big ndbcluster table with 175 million rows, each consisting of:

`field1` MEDIUMINT(8) UNSIGNED NOT NULL,
`field2` INT(10) UNSIGNED NOT NULL,
`field3` SMALLINT(5) UNSIGNED NOT NULL,
`field4` FLOAT UNSIGNED NOT NULL,
`field5` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
`field6` FLOAT UNSIGNED NOT NULL DEFAULT '0'

So each row's size should be about 3+4+2+4+2+4 = 19 bytes

If there was no overhead, I would expect the table to have a size of around
19 bytes * 175M rows = 3.1G

'show table status' reports a size of 7.9G, which is more than 150% overhead. Why is the table using so much space?

And it gets worse.

I have a 4 node cluster with 25GB data on each, the number of replicas is set to 2. This means, I should be able to store 50GB of data. Storing my 7.9G table should use around 16% of my available memory.
But 'all report memory' in ndb_mgm tells me, 25% are in use. This corresponds to 12.5G (replicated). That's 4x the memory the data would ideally need!

What happened here? What's taking so much memory? Is there a way to optimize this?

Options: ReplyQuote


Subject
Views
Written By
Posted
high memory consumption
1751
May 21, 2012 10:28AM
959
May 22, 2012 07:00AM
701
May 22, 2012 04:27PM
829
May 23, 2012 02:57AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.