Skip to content

Commit

Permalink
Replace pbzip2 with faster implementation: lbzip2
Browse files Browse the repository at this point in the history
  • Loading branch information
Gandalf-the-Grey committed Oct 25, 2017
1 parent 5d4b498 commit 6078000
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN \
libssl-dev \
libtool \
ncurses-dev \
pbzip2 \
lbzip2 \
pkg-config \
python3 \
python3-dev \
Expand Down
4 changes: 2 additions & 2 deletions contrib/startpaassteemd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ if [[ "$USE_RAMDISK" ]]; then
mkdir -p /mnt/ramdisk
mount -t ramfs -o size=${RAMDISK_SIZE_IN_MB:-51200}m ramfs /mnt/ramdisk
ARGS+=" --shared-file-dir=/mnt/ramdisk/blockchain"
s3cmd get s3://$S3_BUCKET/blockchain-$VERSION-latest.tar.bz2 - | pbzip2 -m2000dc | tar x --wildcards 'blockchain/block*' -C /mnt/ramdisk 'blockchain/shared*'
s3cmd get s3://$S3_BUCKET/blockchain-$VERSION-latest.tar.bz2 - | lbzip2 -dc | tar x --wildcards 'blockchain/block*' -C /mnt/ramdisk 'blockchain/shared*'
chown -R steemd:steemd /mnt/ramdisk/blockchain
else
s3cmd get s3://$S3_BUCKET/blockchain-$VERSION-latest.tar.bz2 - | pbzip2 -m2000dc | tar x
s3cmd get s3://$S3_BUCKET/blockchain-$VERSION-latest.tar.bz2 - | lbzip2 -dc | tar x
fi
if [[ $? -ne 0 ]]; then
if [[ ! "$SYNC_TO_S3" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion contrib/steemd.run
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ cd $HOME

if [[ "$USE_PUBLIC_SHARED_MEMORY" ]]; then
echo steemd: Downloading and uncompressing blockchain-$VERSION-latest.tar.bz2 - this may take awhile.
wget -qO- https://s3.amazonaws.com/steemit-dev-blockchainstate/blockchain-$VERSION-latest.tar.bz2 | pbzip2 -m2000dc | tar x
wget -qO- https://s3.amazonaws.com/steemit-dev-blockchainstate/blockchain-$VERSION-latest.tar.bz2 | lbzip2 -dc | tar x
fi

# slow down restart loop if flapping
Expand Down
2 changes: 1 addition & 1 deletion contrib/sync-sv-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if [[ ! -z "$BLOCKCHAIN_TIME" ]]; then
echo steemdsync: starting a new blockchainstate upload operation
cd ${COMPRESSPATH:-$HOME}
echo steemdsync: compressing blockchainstate...
tar cf blockchain.tar.bz2 --use-compress-prog=pbzip2 -C $HOME blockchain
tar cf blockchain.tar.bz2 --use-compress-prog=lbzip2 -C $HOME blockchain
if [[ ! $? -eq 0 ]]; then
echo NOTIFYALERT! steemdsync was unable to compress shared memory file, check the logs.
exit 1
Expand Down

0 comments on commit 6078000

Please sign in to comment.