MySQL Forums
Forum List  »  NDB clusters

Re: Disk storage blob using more memory than expected.
Posted by: Peter Botha
Date: July 28, 2014 06:28AM

Showing percentages may hide the problem, especially if you have a large value configured for DataMemory in config.ini

I tried inserting only 1 record, and didn't see any extra memory used.
50 records shows the problem:

mysql> truncate table testblob;
Query OK, 0 rows affected (0.17 sec)

mysql> SELECT node_id, memory_type, used, CONCAT(ROUND(used/total * 100,1), '%') AS 'Percent used' FROM ndbinfo.memoryusage ORDER BY 2,1;
+---------+---------------------+---------+--------------+
| node_id | memory_type | used | Percent used |
+---------+---------------------+---------+--------------+
| 1 | Data memory | 1933312 | 0.2% |
| 2 | Data memory | 1933312 | 0.2% |
| 1 | Index memory | 180224 | 0.1% |
| 2 | Index memory | 180224 | 0.1% |
| 1 | Long message buffer | 262144 | 3.1% |
| 2 | Long message buffer | 262144 | 3.1% |
+---------+---------------------+---------+--------------+
6 rows in set (0.01 sec)

mysql> CALL GenerateFakeData(50, (1024*5)); # 5MB BLOB
Query OK, 1 row affected (0.04 sec)

mysql> SELECT node_id, memory_type, used, CONCAT(ROUND(used/total * 100,1), '%') AS 'Percent used' FROM ndbinfo.memoryusage ORDER BY 2,1;
+---------+---------------------+---------+--------------+
| node_id | memory_type | used | Percent used |
+---------+---------------------+---------+--------------+
| 1 | Data memory | 2195456 | 0.2% |
| 2 | Data memory | 2195456 | 0.2% |
| 1 | Index memory | 212992 | 0.1% |
| 2 | Index memory | 212992 | 0.1% |
| 1 | Long message buffer | 262144 | 3.1% |
| 2 | Long message buffer | 262144 | 3.1% |
+---------+---------------------+---------+--------------+
6 rows in set (0.00 sec)

mysql> truncate table testblob; CALL GenerateFakeData(50, (1024*500)); # 500MB BLOB
Query OK, 0 rows affected (0.14 sec)

Query OK, 1 row affected (0.51 sec)

mysql> SELECT node_id, memory_type, used, CONCAT(ROUND(used/total * 100,1), '%') AS 'Percent used' FROM ndbinfo.memoryusage ORDER BY 2,1;
+---------+---------------------+---------+--------------+
| node_id | memory_type | used | Percent used |
+---------+---------------------+---------+--------------+
| 1 | Data memory | 2228224 | 0.2% |
| 2 | Data memory | 2228224 | 0.2% |
| 1 | Index memory | 229376 | 0.1% |
| 2 | Index memory | 229376 | 0.1% |
| 1 | Long message buffer | 393216 | 4.7% |
| 2 | Long message buffer | 393216 | 4.7% |
+---------+---------------------+---------+--------------+
6 rows in set (0.01 sec)

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Disk storage blob using more memory than expected.
731
July 28, 2014 06:28AM


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.