Skip to content

Conversation

rhpvorderman
Copy link
Contributor

This is a quick test for re-evaluation of ISA-L support

see #1780

I ran samtools view on the current repository using libdeflate:

$ ./samtools view -1 --threads 8 ~/test/HG002_20230424_1302_3H_PAO89685_2264ba8c_hac_simplex_downsampled.bam | pv > /dev/null
10.1GiB 0:00:44 [ 234MiB/s] 

And then using the below patch with ISA-L.

./samtools view -1 --threads 8 ~/test/HG002_20230424_1302_3H_PAO89685_2264ba8c_hac_simplex_downsampled.bam | pv > /dev/null
10.3GiB 0:00:26 [ 394MiB/s] [      

This is significantly faster (slightly less than 2X) with a marginally larger filesize. And this is only the compression, I haven't tested decompression yet.

This needs to be properly integrated in the build system if this is going to be properly supported, so for now it is just hacked in to allow for benchmarks. (Install libisal-dev to compile on linux).

@rhpvorderman
Copy link
Contributor Author

rhpvorderman commented Apr 29, 2025

ISA-L decompression is also slightly faster:

$ ./samtools view -u  ~/test/HG002_20230424_1302_3H_PAO89685_2264ba8c_hac_simplex_downsampled.bam | pv > /dev/null
16.2GiB 0:00:58 [ 284MiB/s] [     
./samtools view -u  ~/test/HG002_20230424_1302_3H_PAO89685_2264ba8c_hac_simplex_downsampled.bam | pv > /dev/null
16.2GiB 0:00:52 [ 315MiB/s] [                

Just 10% though and this is on a intel i7 6700. This is not as clear cut as the compression.

@rhpvorderman
Copy link
Contributor Author

rhpvorderman commented Apr 30, 2025

I can confirm that the same sort of results occur when using a ryzen 5 3600 (AMD Zen 2). 10% faster reading and almost twice as fast writing.

So it works equally well on both x86 vendors. Since we have a cluster with both AMD Epyc and Intel Xeon I always check if optimizations are not detrimental.

I don't have any high performing ARM64 devices to test. The latest release of ISA-L is available on conda (https://github.com/conda-forge/isa-l-feedstock) for ARM64 and MacOS ARM64 architectures. If anyone wants to test.
From some tests I have run on an arm64 processor it seems as ISA-L performs well, but that was on a single-board computer so that is not really representative of machines running bioinformatic work loads.

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.

1 participant