You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "psalagnac (via GitHub)" <gi...@apache.org> on 2026/03/11 16:02:47 UTC
[PR] SOLR-18157: Optimize buffer allocation in JavaBinCodec [solr]
psalagnac opened a new pull request, #4208:
URL: https://github.com/apache/solr/pull/4208
https://issues.apache.org/jira/browse/SOLR-18157
This implements a smarter allocation strategy using powers of 2 for the internal buffer of JavaBinCodec. The goal is to reduce the number of allocations.
Added a JMH benchmark suite to measure serialization performance with different batch sizes. I see a small improvement in throughput locally. I expect the impact to be slightly higher in JVMs with big heap for other reasons.
```
### Before
Benchmark (batchSize) (type) Mode Cnt Score Error Units
RequestWriters.write 10 javabin thrpt 5 5770,665 ± 636,538 ops/s
RequestWriters.write 100 javabin thrpt 5 591,845 ± 11,787 ops/s
RequestWriters.write 1000 javabin thrpt 5 58,766 ± 8,620 ops/s
RequestWriters.write 10000 javabin thrpt 5 5,980 ± 0,044 ops/s
### AFTER
Benchmark (batchSize) (type) Mode Cnt Score Error Units
RequestWriters.write 10 javabin thrpt 5 5824,500 ± 482,134 ops/s
RequestWriters.write 100 javabin thrpt 5 601,498 ± 4,600 ops/s
RequestWriters.write 1000 javabin thrpt 5 59,621 ± 0,995 ops/s
RequestWriters.write 10000 javabin thrpt 5 5,988 ± 0,108 ops/s
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-18157: Optimize buffer allocation in JavaBinCodec [solr]
Posted by "psalagnac (via GitHub)" <gi...@apache.org>.
psalagnac merged PR #4208:
URL: https://github.com/apache/solr/pull/4208
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org