Skip to content

Commit cc8abb2

Browse files
committed
wsrep_sst_xtrabackup*: du -s removed lessens output
and only displays the summary. As this is the only bit that is used there will be less du,kernel,awk CPU usage.
1 parent e78e308 commit cc8abb2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts/wsrep_sst_xtrabackup-v2.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ get_transfer()
399399
get_footprint()
400400
{
401401
pushd $WSREP_SST_OPT_DATA 1>/dev/null
402-
payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' -type f -print0 | du --files0-from=- --block-size=1 -c | awk 'END { print $1 }')
402+
payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' -type f -print0 | du --files0-from=- --block-size=1 -c -s | awk 'END { print $1 }')
403403
if $MY_PRINT_DEFAULTS xtrabackup | grep -q -- "--compress";then
404404
# QuickLZ has around 50% compression ratio
405405
# When compression/compaction used, the progress is only an approximate.

scripts/wsrep_sst_xtrabackup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ get_transfer()
197197
get_footprint()
198198
{
199199
pushd $WSREP_SST_OPT_DATA 1>/dev/null
200-
payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' -type f -print0 | du --files0-from=- --block-size=1 -c | awk 'END { print $1 }')
200+
payload=$(find . -regex '.*\.ibd$\|.*\.MYI$\|.*\.MYD$\|.*ibdata1$' -type f -print0 | du --files0-from=- --block-size=1 -c -s | awk 'END { print $1 }')
201201
if $MY_PRINT_DEFAULTS xtrabackup | grep -q -- "--compress";then
202202
# QuickLZ has around 50% compression ratio
203203
# When compression/compaction used, the progress is only an approximate.

0 commit comments

Comments
 (0)