> >>>>(in bacula-dir) incore tree of files to restore for a 360GB partition
> >>>>which is kind of annoying (especially when you make mistakes like I did
> >>>>and have to restart the whole operation from the beginning...)
How many files? For jobs with 5 millions of files, I wait at most 10 minutes.
> >>>>(except for the primary one). I have a feeling this is incorrect, but
> >>>>since I'm no MySQL expert I'm not sure...
Maybe it is really bad, I have cardinalities equal to their real values
(for MyISAM tables, I did not look at InnoDB tables). Maybe your MySQL
server produced some errors, which you overlooked.
> >>>>How should a *correct* output look like?
Here is my output:
+-------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation |
Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+-------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| File | 0 | PRIMARY | 1 | FileId | A |
81732392 | NULL | NULL | | BTREE | |
| File | 1 | JobId | 1 | JobId | A |
1246 | NULL | NULL | | BTREE | |
| File | 1 | PathId | 1 | PathId | A |
2818358 | NULL | NULL | | BTREE | |
| File | 1 | FilenameId | 1 | FilenameId | A |
11676056 | NULL | NULL | | BTREE | |
+-------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
or there would be something like
+-------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation |
Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+-------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| File | 0 | PRIMARY | 1 | FileId | A |
81732392 | NULL | NULL | | BTREE | |
| File | 1 | JobId_2 | 1 | JobId | A |
1246 | NULL | NULL | | BTREE | |
| File | 1 | JobId_2 | 2 | PathId | A |
2818358 | NULL | NULL | | BTREE | |
| File | 1 | JobId_2 | 3 | FilenameId | A |
11676056 | NULL | NULL | | BTREE | |
+-------+------------+------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
> >>>>>| File | 0 | PRIMARY | 1 | FileId | A |
> >>>>>79393114 | NULL | NULL | | BTREE | |
> >>>>>| File | 1 | JobId | 1 | JobId | A |
> >>>>> NULL | NULL | NULL | | BTREE | |
> >>>>>| File | 1 | PathId | 1 | PathId | A |
> >>>>> NULL | NULL | NULL | | BTREE | |
> >>>>>| File | 1 | FilenameId | 1 | FilenameId | A |
> >>>>> NULL | NULL | NULL | | BTREE | |
> >>>>>| File | 1 | JobId_2 | 1 | JobId | A |
> >>>>> NULL | NULL | NULL | | BTREE | |
> >>>>>| File | 1 | JobId_2 | 2 | PathId | A |
> >>>>> NULL | NULL | NULL | | BTREE | |
> >>>>>| File | 1 | JobId_2 | 3 | FilenameId | A |
> >>>>> NULL | NULL | NULL | | BTREE | |
> >>>>>| File | 1 | JobId_3 | 1 | JobId | A |
> >>>>> NULL | NULL | NULL | | BTREE | |
You have two same JobId indexes and if you have JobId, PathId and
FilenameID, there is no need to have JobId_2 compounded from (JobId,
PathId, FilenameId). I would try to do
alter table File drop index (JobId_3), drop index (JobId_2);
or maybe you have to use (JobId, PathId, FilenameId) instead of
JobId_2, I'm not sure.
> >>>>Btw, bacula-dir growed to 1.4GB RAM during the two days when building
> >>>>that incore index - and the machine has 2GB of RAM - I shudder to think
> >>>>of how long it would have taken in it wouldn't have fit inside
> >>>> theavailable RAM or if I would ever have to recover one of the
> >>>> bigger filesystems...
You need to know the number of files. For 3 millions, I needed around 700 MB
of RAM with 1.38.5 and about 200 MB of RAM with >= 1.38.6.
--
Rudolf Cejka <cejkar at fit.vutbr.cz> http://www.fit.vutbr.cz/~cejkar
Brno University of Technology, Faculty of Information Technology
Bozetechova 2, 612 66 Brno, Czech Republic
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users