<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Blosc Home Page  (Posts by Johnny Kao)</title><link>https://blosc.org/</link><description></description><atom:link href="https://blosc.org/authors/johnny-kao.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2026 &lt;a href="mailto:blosc@blosc.org"&gt;The Blosc Developers&lt;/a&gt; </copyright><lastBuildDate>Thu, 15 Oct 2026 09:12:55 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>When More Threads Make Things Slower</title><link>https://blosc.org/posts/when-more-threads-make-things-slower/</link><dc:creator>Johnny Kao</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;em&gt;Why matching the number of workers to the available compression blocks can make small requests much faster.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;More threads usually help compression when there is enough data to process in parallel. For a small request, however, the cost of preparing those threads can exceed the useful work. While working on &lt;a href="https://github.com/Blosc/c-blosc2/pull/805"&gt;C-Blosc2 PR #805&lt;/a&gt;, I found a case where a &lt;strong&gt;16 KiB compression request with sixteen configured threads&lt;/strong&gt; took about &lt;strong&gt;710 µs&lt;/strong&gt; with a fresh context. After the change, the same measured operation took about &lt;strong&gt;18 µs&lt;/strong&gt;, almost &lt;strong&gt;39× faster&lt;/strong&gt;. This is a result for that particular request and context lifecycle, not a 39× increase in the compression algorithm's throughput.&lt;/p&gt;
&lt;p&gt;The improvement came from two decisions that are easy to distinguish: &lt;strong&gt;skip parallel startup when a request contains only one block&lt;/strong&gt;, and &lt;strong&gt;avoid scheduling workers that have no blocks to process&lt;/strong&gt; when a request contains only a few blocks. Neither requires changing how the data is compressed. To understand the results, we first need to look at what each decision avoids, and then at the tests used to evaluate them.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://blosc.org/posts/when-more-threads-make-things-slower/"&gt;Read more…&lt;/a&gt; (5 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>Blosc2</category><category>compression</category><category>performance</category><category>threading</category><guid>https://blosc.org/posts/when-more-threads-make-things-slower/</guid><pubDate>Mon, 12 Oct 2026 13:00:00 GMT</pubDate></item></channel></rss>