page_parser very slow when large btree (~100GB)

Bug #1218545 reported by Yves Trudeau
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Data Recovery Tool for InnoDB
New
Undecided
Unassigned

Bug Description

When there're large btrees, the fact that the page_parser creates one file per page becomes a performance bottleneck because of the filesystem. The following patch creates one file per btree and can be as much as 20x faster:

--- page_parser.c 2013-08-29 13:25:49.869474000 -0400
+++ page_parser_1_file_per_btree.c 2013-08-29 13:32:48.947581652 -0400
@@ -159,10 +159,10 @@
                 exit(-1);
                 }
             sprintf(dir_name, "%s/%lu-%lu", dir_prefix, index_id.high, index_id.low);
- if(mkdir(dir_name, 0755) && errno != EEXIST) {
- fprintf(stderr, "Can't make a directory %s: %s\n", dir_name, strerror(errno));
- exit(-1);
- }
+ //if(mkdir(dir_name, 0755) && errno != EEXIST) {
+ // fprintf(stderr, "Can't make a directory %s: %s\n", dir_name, strerror(errno));
+ // exit(-1);
+ // }
        }
     else{
             sprintf(dir_name, "pages-%u/FIL_PAGE_TYPE_BLOB", (unsigned int)timestamp);
@@ -175,7 +175,7 @@

     // Compose page file_name
     if(is_index){
- sprintf(file_name, "%s/%08lu-%08lu.page", dir_name, 0, page_id);
+ sprintf(file_name, "%s", dir_name);
         }
     else{
         sprintf(file_name, "%s/page-%08lu.page", dir_name, page_id);

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.