diff --git a/conan.lock b/conan.lock index e032059b89..3d4c9f584e 100644 --- a/conan.lock +++ b/conan.lock @@ -10,7 +10,7 @@ "rocksdb/10.5.1#4a197eca381a3e5ae8adf8cffa5aacd0%1762797952.535", "re2/20251105#8579cfd0bda4daf0683f9e3898f964b4%1774398111.888", "protobuf/6.33.5#ff253ead763bd8d9904a52979cd21e81%1782392410.233933", - "openssl/3.6.2#4789bbf131b77d0515d15e094c8f697f%1778071755.506", + "openssl/3.6.3#1163d4ddc603907084d08a6a0c6e580f%1782307150.583886", "nudb/2.0.9#11149c73f8f2baff9a0198fe25971fc7%1775040983.408", "mpt-crypto/0.4.0-rc2#a580f2f9ad0e795de696aa62d54fb9af%1782425834.488828", "lz4/1.10.0#982d9b673900f665a1da109e09c17cab%1782392402.164188", diff --git a/conanfile.py b/conanfile.py index a2997c408b..e47a20cbe9 100644 --- a/conanfile.py +++ b/conanfile.py @@ -33,7 +33,7 @@ class Xrpl(ConanFile): "grpc/1.81.1", "libarchive/3.8.7", "nudb/2.0.9", - "openssl/3.6.2", + "openssl/3.6.3", "soci/4.0.3", "zlib/1.3.2", ] diff --git a/run_openssl_comparison.sh b/run_openssl_comparison.sh index 686159db6b..9d7a74c409 100755 --- a/run_openssl_comparison.sh +++ b/run_openssl_comparison.sh @@ -1,13 +1,14 @@ #!/usr/bin/env bash -# Compare SHA-512-half performance: OpenSSL 3.5.6 vs 3.6.2. +# Compare SHA-512-half performance across OpenSSL versions. # Binaries are identical builds (GCC 13.3, Release, same locked deps), # differing only in the statically linked OpenSSL. set -euo pipefail cd "$(dirname "$0")/.build" -OLD=./xrpl_tests-openssl-3.5.6 -NEW=./xrpl_tests-openssl-3.6.2 +V356=./xrpl_tests-openssl-3.5.6 +V362=./xrpl_tests-openssl-3.6.2 +V363=./xrpl_tests-openssl-3.6.3 # Single hash of the full 100 KB buffer. Startup-dominated (~ms), kept for # parity with earlier result logs; expect near-identical numbers. @@ -15,8 +16,9 @@ FILTER=OpenSSL.SingleHashFullSlice hyperfine -N \ --warmup 5 \ --min-runs 200 \ - --command-name "openssl-3.5.6 singlehash" "$OLD --gtest_filter=$FILTER" \ - --command-name "openssl-3.6.2 singlehash" "$NEW --gtest_filter=$FILTER" \ + --command-name "openssl-3.5.6 singlehash" "$V356 --gtest_filter=$FILTER" \ + --command-name "openssl-3.6.2 singlehash" "$V362 --gtest_filter=$FILTER" \ + --command-name "openssl-3.6.3 singlehash" "$V363 --gtest_filter=$FILTER" \ --export-markdown openssl_comparison_singlehash.md \ --export-json openssl_comparison_singlehash.json @@ -25,8 +27,9 @@ FILTER=OpenSSL.MultihashAllSlices hyperfine \ --warmup 5 \ --min-runs 20 \ - --command-name "openssl-3.5.6 multihash" "$OLD --gtest_filter=$FILTER" \ - --command-name "openssl-3.6.2 multihash" "$NEW --gtest_filter=$FILTER" \ + --command-name "openssl-3.5.6 multihash" "$V356 --gtest_filter=$FILTER" \ + --command-name "openssl-3.6.2 multihash" "$V362 --gtest_filter=$FILTER" \ + --command-name "openssl-3.6.3 multihash" "$V363 --gtest_filter=$FILTER" \ --export-markdown openssl_comparison.md \ --export-json openssl_comparison.json diff --git a/src/tests/libxrpl/basics/openssl_test_results_3.5.6_3.6.2_3.6.3 b/src/tests/libxrpl/basics/openssl_test_results_3.5.6_3.6.2_3.6.3 new file mode 100644 index 0000000000..fd1d741cae --- /dev/null +++ b/src/tests/libxrpl/basics/openssl_test_results_3.5.6_3.6.2_3.6.3 @@ -0,0 +1,35 @@ +------------------------------------------------------------------------------------------------- +OpenSSL 3.5.6 vs 3.6.2 vs 3.6.3 comparison +Date: 2026-07-08 +Branch: vlntb/pratik-openssl-performance-test (commit 2133ba64bf) +Machine: valentin-Thelio-Major (Ubuntu 24.04, 48 cores) + +All three binaries are identical Release builds (GCC 13.3, C++23, same +conan.lock apart from the openssl entry), differing only in the statically +linked OpenSSL version (verified via the embedded version banner: +grep -aom1 'OpenSSL 3\.' ). 3.5.6/3.6.2 recipes from conancenter, +3.6.3 from the xrplf remote. + +Benchmark script: run_openssl_comparison.sh (hyperfine 1.18.0) + +SingleHashFullSlice (hyperfine -N --warmup 5 --min-runs 200) +Note: startup-dominated (~ms); one 100 KB hash takes microseconds. + +| Command | Mean [ms] | Min [ms] | Max [ms] | Relative | +|:---------------------------|----------:|---------:|---------:|------------:| +| openssl-3.5.6 singlehash | 4.6 ± 0.5 | 3.9 | 8.2 | 1.03 ± 0.15 | +| openssl-3.6.2 singlehash | 4.6 ± 0.4 | 3.9 | 6.5 | 1.01 ± 0.14 | +| openssl-3.6.3 singlehash | 4.5 ± 0.4 | 3.9 | 6.2 | 1.00 | + +MultihashAllSlices (hyperfine --warmup 5 --min-runs 20; 100k sha512Half calls per run) + +| Command | Mean [s] | Min [s] | Max [s] | Relative | +|:---------------------------|--------------:|--------:|--------:|------------:| +| openssl-3.5.6 multihash | 4.083 ± 0.015 | 4.060 | 4.117 | 1.00 ± 0.01 | +| openssl-3.6.2 multihash | 4.074 ± 0.017 | 4.049 | 4.116 | 1.00 | +| openssl-3.6.3 multihash | 4.081 ± 0.028 | 4.047 | 4.125 | 1.00 ± 0.01 | + +Conclusion: all three versions are statistically indistinguishable on both +benchmarks. The ~42% SHA-512 regression observed with the 3.6.0 alpha (see +openssl_test_results_1) remains fixed in 3.6.3. No performance objection to +upgrading to either 3.6.2 or 3.6.3.