Bug #43683 | OPTIMIZE TABLE doesn't return memory | ||
---|---|---|---|
Submitted: | 16 Mar 2009 22:38 | Modified: | 5 Aug 2009 7:55 |
Reporter: | Gustaf Thorslund | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S3 (Non-critical) |
Version: | mysql-5.1-telco-6.3 | OS: | Linux |
Assigned to: | Jonas Oreland | CPU Architecture: | Any |
Tags: | 6.4 (from bzr today), memory usage, mysql-5.1-telco-6.3 -> cluster 6.3, optimize table |
[16 Mar 2009 22:38]
Gustaf Thorslund
[16 Mar 2009 23:01]
Gustaf Thorslund
[ndbd default] DataMemory = 100M IndexMemory = 100M NoOfReplicas = 2 big.txt was generated by merging a number of files from the source code.
[1 Jul 2009 10:10]
Joffrey MICHAIE
Hello, please find next the results with real data DataMemory = 26.5G 2 DataNodes (Replicas = 2) Starting from scratch (initial) Adding 2.2M "items" (data in many tables) Node 3: Data usage is 55%(469241 32K pages of total 848000) Node 3: Index usage is 42%(136082 8K pages of total 320032) Node 4: Data usage is 55%(469241 32K pages of total 848000) Node 4: Index usage is 42%(136082 8K pages of total 320032) Doing Alter table to convert *int and char to COLUMN_FORMAT=Dynamic (excepted Primary Key) Node 3: Data usage is 51%(439941 32K pages of total 848000) Node 3: Index usage is 39%(126183 8K pages of total 320032) Node 4: Data usage is 51%(439941 32K pages of total 848000) Node 4: Index usage is 39%(126183 8K pages of total 320032) Adding 1M new "items" Node 3: Data usage is 75%(638826 32K pages of total 848000) Node 3: Index usage is 59%(189852 8K pages of total 320032) Node 4: Data usage is 75%(638832 32K pages of total 848000) Node 4: Index usage is 59%(189853 8K pages of total 320032) Removing 1M items by range (from Id 1M to Id 2M) Node 3: Data usage is 74%(628834 32K pages of total 848000) Node 3: Index usage is 47%(150730 8K pages of total 320032) Node 4: Data usage is 74%(628840 32K pages of total 848000) Node 4: Index usage is 47%(150729 8K pages of total 320032) Running Optimize table on ALL tables : Node 3: Data usage is 74%(627988 32K pages of total 848000) Node 3: Index usage is 47%(150730 8K pages of total 320032) Node 4: Data usage is 74%(627994 32K pages of total 848000) Node 4: Index usage is 47%(150729 8K pages of total 320032) Rolling restart the nodes : 1st node ... Node 3: Data usage is 57%(486128 32K pages of total 848000) Node 3: Index usage is 42%(137613 8K pages of total 320032) Node 4: Data usage is 74%(627994 32K pages of total 848000) Node 4: Index usage is 47%(150729 8K pages of total 320032) 2nd node ... Node 3: Data usage is 57%(486128 32K pages of total 848000) Node 3: Index usage is 42%(137613 8K pages of total 320032) Node 4: Data usage is 57%(486128 32K pages of total 848000) Node 4: Index usage is 42%(137613 8K pages of total 320032) I believe that the Optimize command should have freed more than ~900 pages of DataMemory, with Ms of lines deleted. Thanks in advance, Joffrey
[1 Jul 2009 12:54]
Gustaf Thorslund
Joffrey, Looks like you experienced the same problem as I described in the bug, right? /Gustaf
[4 Aug 2009 10:06]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/79981 3003 Jonas Oreland 2009-08-04 ndb - bug#45971 - crash during optimize table, make sure free list are searched correctly reuse get_alloc_page (with size + 1) since index might grow bug#43683 - optimize table does not return memory, try to move to page with *least* amount of free space
[4 Aug 2009 12:41]
Jon Stephens
Versions? 6.2+?
[5 Aug 2009 6:57]
Jon Stephens
(See Bug#45971)
[5 Aug 2009 7:55]
Jon Stephens
Documented bugfix in the NDB-6.3.26 and 7.0.7 changelogs as follows: In some cases, OPTIMIZE TABLE on an NDB table did not free any DataMemory.