From b618a6f7f279b6dce23d4904a6b75f6551ca23cb Mon Sep 17 00:00:00 2001 From: Joerg Steffens Date: Thu, 20 Jul 2017 14:32:55 +0200 Subject: [PATCH] added workaround hint for bareos-16.2.6 .bvfs_lsdirs no longer shows empty directories from accurate jobs => performance issues --- manuals/en/main/bareos.sty | 1 + manuals/en/main/releasenotes.tex | 31 +++++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/manuals/en/main/bareos.sty b/manuals/en/main/bareos.sty index f5d87d5..a2f38de 100644 --- a/manuals/en/main/bareos.sty +++ b/manuals/en/main/bareos.sty @@ -215,6 +215,7 @@ \newcommand{\pool}[1]{\resourcename{Dir}{Pool}{#1}} \newcommand{\argument}[1]{\textit{#1}} \newcommand{\resourcetype}[2]{\path|#2|$^{\mbox{\tiny #1}}$} +\newcommand{\sqlcommand}[1]{\path|#1|} \makeatletter \newcommand{\resourcename}{% diff --git a/manuals/en/main/releasenotes.tex b/manuals/en/main/releasenotes.tex index 69a4d1a..b49814f 100644 --- a/manuals/en/main/releasenotes.tex +++ b/manuals/en/main/releasenotes.tex @@ -31,9 +31,37 @@ \section*{Bareos-16.2} \item Director now closes all configuration files when reloading failed. \item Storage daemon now closes the network connection when MaximumConcurrentJobs reached. \item New directive \configdirective{LanAddress} was added to the Client and Storage Resources of the director to facilitate a network topology where client and storage are situated inside of a LAN, but the Director is outside of that LAN. See \nameref{LanAddress} for details. - \item \bcommand{.bvfs_lsdirs} no longer shows empty directories from accurate jobs. \item A Problem in the storage abstraction layer was fixed where the director picked the wrong storage daemon when multiple storages/storage daemons were used. \item The device spool size calculation when using secure erase was fixed. + \item \bcommand{.bvfs_lsdirs} no longer shows empty directories from accurate jobs. + \begin{itemize} + \item \warning{This decreases performance if your environment has a large numbers of directories. Creating an index improves the performance.} + %In Bareos 16.2.6 the SQL Query used by \bcommand{.bvfs_lsdirs}{} was changed to not show + %empty directories from accurate jobs. It turned out that that the changed + %query causes performance issues when larger amounts of directories were backed up.\\ + \item \postgresql + \begin{itemize} + \item When using PostgreSQL, creating the following partial improves the performance sufficiently:\\ + \sqlcommand{CREATE INDEX file_jfnidpart_idx ON File(JobId, FilenameId) WHERE FileIndex = 0;} + + \item Run following command to create the partial index:\\ + \path@su - postgres -c 'echo "CREATE INDEX file_jfnidpart_idx ON File(JobId, FilenameId) WHERE FileIndex = 0; ANALYZE File;" | psql bareos'@ + + \end{itemize} + \item \mysql + \begin{itemize} + \item When using MySQL or MariaDB, creating the following index improves the performance:\\ + \sqlcommand{CREATE INDEX PathId_JobId_FileIndex_FileNameId ON File(PathId,JobId,FileIndex,FilenameId);} + + \item Run following command to create the index:\\ + \path@echo "CREATE INDEX PathId_JobId_FileIndex_FileNameId ON File(PathId,JobId,FileIndex,FilenameId);" | mysql -u root bareos@ + + \item However, with larger amounts of directories and/or involved jobs, even with this index + the performance of \bcommand{.bvfs_lsdirs}{} may still be insufficient. We are working on optimizing + the SQL query for MySQL/MariaDB to solve this problem. + \end{itemize} + \end{itemize} + \item Packages for Univention UCS 4.2 have been added. \item Packages for Debian 9 (Stretch) have been added. \item WebUI: The post install script of the bareos-webui RPM package for RHEL/CentOS was fixed, it no longer tries to run a2enmod which does not exist on RHEL/CentOS. @@ -44,7 +72,6 @@ \section*{Bareos-16.2} } - \releasenote{16.2.5}{ \begin{tabular}{p{0.2\textwidth} p{0.8\textwidth}}