Skip to content

Speed up csv compression on SMP machines#1085

Open
sbernhard wants to merge 1 commit into
theforeman:masterfrom
ATIX-AG:use_pbzip
Open

Speed up csv compression on SMP machines#1085
sbernhard wants to merge 1 commit into
theforeman:masterfrom
ATIX-AG:use_pbzip

Conversation

@sbernhard

Copy link
Copy Markdown
Contributor

The output of pbzip2 is fully compatible with bzip2. pbzip2 is optimized on SMP machines as it splits the input in multiple chunks and uses threads to run on multiple cpu cores to speed up the compression.

This change requires to add pbzip2 as a requirements in the RPM spec for foreman-maintain.

@sbernhard

Copy link
Copy Markdown
Contributor Author

@sbernhard

Copy link
Copy Markdown
Contributor Author

Thoughs on this @evgeni ?

@sbernhard

Copy link
Copy Markdown
Contributor Author

@stejskalleos can you maybe have a look at this?

@stejskalleos stejskalleos self-assigned this May 25, 2026
@stejskalleos

Copy link
Copy Markdown
Contributor

/packit build

Comment thread definitions/features/foreman_tasks.rb Outdated
@maximiliankolb

Copy link
Copy Markdown

ping @sbernhard

The output of pbzip2 is fully compatible with bzip2.
pbzip2 is optimized on SMP machines as it splits the input in multiple
chunks and uses threads to run on multiple cpu cores to speed up the
compression.

This change requires to add pbzip2 as a requirements in the RPM spec
for foreman-maintain.
@sbernhard

sbernhard commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Some measurements on a system with 16 cores. bigfile has size of 1.9GB.

bzip2:

$ time nice -n 10 bzip2 -9 bigfile
real	2m12,857s
user	2m11,971s
sys	0m0,763s

pbzip2:

$ time nice -n 10 pbzip2 -p8 -9 bigfile
real	0m43,990s
user	5m41,660s
sys	0m8,612s

@sbernhard

Copy link
Copy Markdown
Contributor Author

/packit build

@sbernhard sbernhard requested a review from stejskalleos July 9, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants