Skip to content

Retry when poll_read_ready immediately succeeds in AsyncChannel#592

Merged
bwoebi merged 2 commits into
mainfrom
bob/poll-ready-retry
Aug 22, 2024
Merged

Retry when poll_read_ready immediately succeeds in AsyncChannel#592
bwoebi merged 2 commits into
mainfrom
bob/poll-ready-retry

Conversation

@bwoebi
Copy link
Copy Markdown
Contributor

@bwoebi bwoebi commented Aug 21, 2024

UnixStream::poll_read_ready may return Poll::Ready(Ok(())), which incidentally, when returned by an AsyncRead::poll_read function without further modification of buf, means that the channel was closed. The intended meaning is "immediately available", and thus we need to re-read.

This only can happen when epoll() is resumed between a recvmsg() call and the poll_ready_ready function being invoked, which may only happen in a multithreaded environment, which we recently switched to.

This PR reminded me why race conditions are so much fun.

@bwoebi bwoebi requested a review from a team as a code owner August 21, 2024 20:42
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Aug 21, 2024

Benchmarks

Comparison

Benchmark execution time: 2024-08-22 16:40:57

Comparing candidate commit 82edf70 in PR branch bob/poll-ready-retry with baseline commit 9e3cb7c in branch main.

Found 3 performance improvements and 0 performance regressions! Performance is the same for 47 metrics, 2 unstable metrics.

scenario:normalization/normalize_service/normalize_service/[empty string]

  • 🟩 execution_time [-20.539µs; -20.479µs] or [-31.336%; -31.245%]
  • 🟩 throughput [+6938884.535op/s; +6956828.500op/s] or [+45.481%; +45.598%]

scenario:normalization/normalize_trace/test_trace

  • 🟩 execution_time [-24.307ns; -19.036ns] or [-7.298%; -5.716%]

Candidate

Candidate benchmark details

Group 1

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 82edf70 1724344269 bob/poll-ready-retry
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
write only interface execution_time 1.482µs 2.919µs ± 1.428µs 2.757µs ± 0.019µs 2.773µs 2.968µs 12.858µs 16.292µs 490.92% 8.000 64.182 48.81% 0.101µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
write only interface execution_time [2.721µs; 3.117µs] or [-6.782%; +6.782%] None None None

Group 2

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 82edf70 1724344269 bob/poll-ready-retry
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching string interning on wordpress profile execution_time 139.433µs 139.841µs ± 0.195µs 139.831µs ± 0.105µs 139.934µs 140.195µs 140.356µs 140.882µs 0.75% 1.231 4.313 0.14% 0.014µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching string interning on wordpress profile execution_time [139.814µs; 139.868µs] or [-0.019%; +0.019%] None None None

Group 3

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 82edf70 1724344269 bob/poll-ready-retry
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
tags/replace_trace_tags execution_time 2.692µs 2.730µs ± 0.016µs 2.727µs ± 0.007µs 2.734µs 2.767µs 2.769µs 2.771µs 1.59% 0.847 0.622 0.58% 0.001µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
tags/replace_trace_tags execution_time [2.728µs; 2.732µs] or [-0.081%; +0.081%] None None None

Group 4

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 82edf70 1724344269 bob/poll-ready-retry
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_trace/test_trace execution_time 301.209ns 311.376ns ± 12.661ns 305.847ns ± 3.153ns 313.106ns 332.452ns 355.635ns 357.579ns 16.91% 2.051 3.861 4.06% 0.895ns 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_trace/test_trace execution_time [309.621ns; 313.131ns] or [-0.564%; +0.564%] None None None

Group 5

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 82edf70 1724344269 bob/poll-ready-retry
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
sql/obfuscate_sql_string execution_time 73.860µs 74.055µs ± 0.198µs 74.010µs ± 0.062µs 74.105µs 74.264µs 74.548µs 76.225µs 2.99% 6.846 70.288 0.27% 0.014µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
sql/obfuscate_sql_string execution_time [74.027µs; 74.082µs] or [-0.037%; +0.037%] None None None

Group 6

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 82edf70 1724344269 bob/poll-ready-retry
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
credit_card/is_card_number/ execution_time 1.613µs 1.614µs ± 0.000µs 1.614µs ± 0.000µs 1.614µs 1.614µs 1.615µs 1.615µs 0.12% 0.651 0.607 0.03% 0.000µs 1 200
credit_card/is_card_number/ throughput 619028539.743op/s 619752553.643op/s ± 183547.684op/s 619766624.913op/s ± 129572.234op/s 619891810.024op/s 620002275.912op/s 620107909.464op/s 620120193.443op/s 0.06% -0.649 0.602 0.03% 12978.781op/s 1 200
credit_card/is_card_number/ 3782-8224-6310-005 execution_time 104.115µs 105.052µs ± 0.478µs 105.003µs ± 0.217µs 105.192µs 105.835µs 106.965µs 107.967µs 2.82% 2.464 9.794 0.45% 0.034µs 1 200
credit_card/is_card_number/ 3782-8224-6310-005 throughput 9262058.960op/s 9519323.922op/s ± 42855.926op/s 9523508.139op/s ± 19717.944op/s 9545102.773op/s 9566172.437op/s 9584840.702op/s 9604771.651op/s 0.85% -2.387 9.295 0.45% 3030.372op/s 1 200
credit_card/is_card_number/ 378282246310005 execution_time 96.650µs 97.445µs ± 0.396µs 97.392µs ± 0.230µs 97.665µs 98.086µs 98.785µs 99.341µs 2.00% 1.323 3.482 0.41% 0.028µs 1 200
credit_card/is_card_number/ 378282246310005 throughput 10066289.420op/s 10262324.978op/s ± 41459.823op/s 10267805.093op/s ± 24342.973op/s 10290840.679op/s 10315170.119op/s 10334052.327op/s 10346611.485op/s 0.77% -1.279 3.284 0.40% 2931.652op/s 1 200
credit_card/is_card_number/37828224631 execution_time 1.613µs 1.614µs ± 0.003µs 1.613µs ± 0.000µs 1.614µs 1.614µs 1.615µs 1.659µs 2.82% 13.387 182.841 0.20% 0.000µs 1 200
credit_card/is_card_number/37828224631 throughput 602808633.060op/s 619689198.873op/s ± 1219877.484op/s 619782863.109op/s ± 147809.960op/s 619940090.965op/s 620041078.172op/s 620143012.263op/s 620147778.874op/s 0.06% -13.353 182.197 0.20% 86258.364op/s 1 200
credit_card/is_card_number/378282246310005 execution_time 94.182µs 95.364µs ± 0.742µs 95.262µs ± 0.475µs 95.744µs 96.957µs 97.345µs 97.671µs 2.53% 0.791 0.277 0.78% 0.052µs 1 200
credit_card/is_card_number/378282246310005 throughput 10238443.695op/s 10486738.651op/s ± 81088.245op/s 10497383.875op/s ± 52353.724op/s 10548056.105op/s 10596584.456op/s 10613769.067op/s 10617760.328op/s 1.15% -0.753 0.198 0.77% 5733.805op/s 1 200
credit_card/is_card_number/37828224631000521389798 execution_time 94.119µs 94.658µs ± 0.362µs 94.606µs ± 0.181µs 94.815µs 95.123µs 95.383µs 98.011µs 3.60% 4.158 35.257 0.38% 0.026µs 1 200
credit_card/is_card_number/37828224631000521389798 throughput 10202914.800op/s 10564540.999op/s ± 39749.494op/s 10570121.439op/s ± 20245.608op/s 10586953.706op/s 10610324.748op/s 10620388.247op/s 10624867.502op/s 0.52% -3.937 32.556 0.38% 2810.714op/s 1 200
credit_card/is_card_number/x371413321323331 execution_time 22.440µs 22.778µs ± 0.184µs 22.777µs ± 0.140µs 22.905µs 23.097µs 23.257µs 23.398µs 2.72% 0.518 0.079 0.81% 0.013µs 1 200
credit_card/is_card_number/x371413321323331 throughput 42738845.747op/s 43904007.678op/s ± 353010.665op/s 43902990.164op/s ± 270639.895op/s 44194211.274op/s 44426564.645op/s 44523875.328op/s 44562636.041op/s 1.50% -0.475 -0.008 0.80% 24961.623op/s 1 200
credit_card/is_card_number_no_luhn/ execution_time 1.613µs 1.613µs ± 0.000µs 1.613µs ± 0.000µs 1.614µs 1.614µs 1.614µs 1.614µs 0.06% 0.114 -0.988 0.02% 0.000µs 1 200
credit_card/is_card_number_no_luhn/ throughput 619442294.089op/s 619804850.472op/s ± 153701.249op/s 619800676.973op/s ± 135125.701op/s 619945194.014op/s 620016510.403op/s 620091824.166op/s 620132921.925op/s 0.05% -0.113 -0.989 0.02% 10868.320op/s 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time 85.938µs 86.688µs ± 0.337µs 86.679µs ± 0.207µs 86.882µs 87.277µs 87.566µs 87.704µs 1.18% 0.298 0.116 0.39% 0.024µs 1 200
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput 11401963.851op/s 11535733.040op/s ± 44785.475op/s 11536795.093op/s ± 27574.364op/s 11564738.556op/s 11608708.623op/s 11631647.202op/s 11636339.123op/s 0.86% -0.275 0.092 0.39% 3166.811op/s 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time 79.217µs 80.016µs ± 0.473µs 79.969µs ± 0.323µs 80.286µs 80.851µs 81.293µs 82.342µs 2.97% 0.983 2.151 0.59% 0.033µs 1 200
credit_card/is_card_number_no_luhn/ 378282246310005 throughput 12144472.982op/s 12497965.178op/s ± 73525.482op/s 12504788.714op/s ± 50282.530op/s 12557687.192op/s 12597454.735op/s 12611650.204op/s 12623626.966op/s 0.95% -0.928 1.895 0.59% 5199.037op/s 1 200
credit_card/is_card_number_no_luhn/37828224631 execution_time 1.613µs 1.614µs ± 0.001µs 1.614µs ± 0.001µs 1.614µs 1.615µs 1.615µs 1.616µs 0.12% 0.556 -0.552 0.04% 0.000µs 1 200
credit_card/is_card_number_no_luhn/37828224631 throughput 618921352.737op/s 619646965.690op/s ± 256312.332op/s 619671727.061op/s ± 194753.547op/s 619869147.184op/s 619979235.098op/s 620052607.413op/s 620085030.511op/s 0.07% -0.554 -0.554 0.04% 18124.019op/s 1 200
credit_card/is_card_number_no_luhn/378282246310005 execution_time 77.130µs 78.183µs ± 0.425µs 78.155µs ± 0.304µs 78.445µs 78.930µs 79.188µs 79.368µs 1.55% 0.277 -0.326 0.54% 0.030µs 1 200
credit_card/is_card_number_no_luhn/378282246310005 throughput 12599595.868op/s 12790870.674op/s ± 69501.882op/s 12795065.761op/s ± 49872.294op/s 12845520.677op/s 12903835.747op/s 12915624.611op/s 12965051.589op/s 1.33% -0.251 -0.345 0.54% 4914.525op/s 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time 94.096µs 94.610µs ± 0.371µs 94.553µs ± 0.239µs 94.843µs 95.325µs 95.581µs 95.764µs 1.28% 0.700 -0.175 0.39% 0.026µs 1 200
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput 10442376.504op/s 10569824.687op/s ± 41379.139op/s 10576063.197op/s ± 26801.168op/s 10601174.098op/s 10624452.496op/s 10627156.625op/s 10627436.854op/s 0.49% -0.684 -0.208 0.39% 2925.947op/s 1 200
credit_card/is_card_number_no_luhn/x371413321323331 execution_time 22.438µs 22.772µs ± 0.209µs 22.747µs ± 0.137µs 22.899µs 23.164µs 23.312µs 23.672µs 4.07% 0.861 1.095 0.92% 0.015µs 1 200
credit_card/is_card_number_no_luhn/x371413321323331 throughput 42243618.368op/s 43916928.237op/s ± 400822.963op/s 43961558.843op/s ± 265899.127op/s 44202648.755op/s 44499668.975op/s 44557672.083op/s 44567378.958op/s 1.38% -0.798 0.884 0.91% 28342.464op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
credit_card/is_card_number/ execution_time [1.613µs; 1.614µs] or [-0.004%; +0.004%] None None None
credit_card/is_card_number/ throughput [619727115.699op/s; 619777991.586op/s] or [-0.004%; +0.004%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 execution_time [104.985µs; 105.118µs] or [-0.063%; +0.063%] None None None
credit_card/is_card_number/ 3782-8224-6310-005 throughput [9513384.502op/s; 9525263.341op/s] or [-0.062%; +0.062%] None None None
credit_card/is_card_number/ 378282246310005 execution_time [97.391µs; 97.500µs] or [-0.056%; +0.056%] None None None
credit_card/is_card_number/ 378282246310005 throughput [10256579.045op/s; 10268070.910op/s] or [-0.056%; +0.056%] None None None
credit_card/is_card_number/37828224631 execution_time [1.613µs; 1.614µs] or [-0.028%; +0.028%] None None None
credit_card/is_card_number/37828224631 throughput [619520135.586op/s; 619858262.160op/s] or [-0.027%; +0.027%] None None None
credit_card/is_card_number/378282246310005 execution_time [95.261µs; 95.467µs] or [-0.108%; +0.108%] None None None
credit_card/is_card_number/378282246310005 throughput [10475500.601op/s; 10497976.702op/s] or [-0.107%; +0.107%] None None None
credit_card/is_card_number/37828224631000521389798 execution_time [94.607µs; 94.708µs] or [-0.053%; +0.053%] None None None
credit_card/is_card_number/37828224631000521389798 throughput [10559032.101op/s; 10570049.896op/s] or [-0.052%; +0.052%] None None None
credit_card/is_card_number/x371413321323331 execution_time [22.753µs; 22.804µs] or [-0.112%; +0.112%] None None None
credit_card/is_card_number/x371413321323331 throughput [43855083.795op/s; 43952931.561op/s] or [-0.111%; +0.111%] None None None
credit_card/is_card_number_no_luhn/ execution_time [1.613µs; 1.613µs] or [-0.003%; +0.003%] None None None
credit_card/is_card_number_no_luhn/ throughput [619783548.957op/s; 619826151.987op/s] or [-0.003%; +0.003%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 execution_time [86.642µs; 86.735µs] or [-0.054%; +0.054%] None None None
credit_card/is_card_number_no_luhn/ 3782-8224-6310-005 throughput [11529526.204op/s; 11541939.876op/s] or [-0.054%; +0.054%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 execution_time [79.950µs; 80.081µs] or [-0.082%; +0.082%] None None None
credit_card/is_card_number_no_luhn/ 378282246310005 throughput [12487775.253op/s; 12508155.103op/s] or [-0.082%; +0.082%] None None None
credit_card/is_card_number_no_luhn/37828224631 execution_time [1.614µs; 1.614µs] or [-0.006%; +0.006%] None None None
credit_card/is_card_number_no_luhn/37828224631 throughput [619611443.266op/s; 619682488.114op/s] or [-0.006%; +0.006%] None None None
credit_card/is_card_number_no_luhn/378282246310005 execution_time [78.124µs; 78.242µs] or [-0.075%; +0.075%] None None None
credit_card/is_card_number_no_luhn/378282246310005 throughput [12781238.382op/s; 12800502.967op/s] or [-0.075%; +0.075%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 execution_time [94.559µs; 94.662µs] or [-0.054%; +0.054%] None None None
credit_card/is_card_number_no_luhn/37828224631000521389798 throughput [10564089.936op/s; 10575559.438op/s] or [-0.054%; +0.054%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 execution_time [22.743µs; 22.801µs] or [-0.127%; +0.127%] None None None
credit_card/is_card_number_no_luhn/x371413321323331 throughput [43861378.030op/s; 43972478.445op/s] or [-0.126%; +0.126%] None None None

Group 7

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 82edf70 1724344269 bob/poll-ready-retry
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
two way interface execution_time 16.780µs 22.535µs ± 14.642µs 16.955µs ± 0.075µs 17.157µs 52.581µs 55.171µs 127.527µs 652.17% 3.858 19.996 64.81% 1.035µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
two way interface execution_time [20.506µs; 24.564µs] or [-9.005%; +9.005%] None None None

Group 8

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 82edf70 1724344269 bob/poll-ready-retry
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
redis/obfuscate_redis_string execution_time 38.861µs 39.450µs ± 1.079µs 38.951µs ± 0.043µs 39.024µs 41.770µs 41.796µs 42.400µs 8.85% 1.697 0.930 2.73% 0.076µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
redis/obfuscate_redis_string execution_time [39.301µs; 39.600µs] or [-0.379%; +0.379%] None None None

Group 9

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 82edf70 1724344269 bob/poll-ready-retry
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time 310.538µs 312.890µs ± 1.216µs 312.747µs ± 0.947µs 313.932µs 314.881µs 315.266µs 315.921µs 1.01% 0.204 -0.888 0.39% 0.086µs 1 200
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput 3165349.841op/s 3196055.136op/s ± 12415.176op/s 3197470.752op/s ± 9701.688op/s 3205045.926op/s 3214527.071op/s 3219506.569op/s 3220215.024op/s 0.71% -0.192 -0.892 0.39% 877.886op/s 1 200
normalization/normalize_name/normalize_name/bad-name execution_time 27.937µs 27.990µs ± 0.044µs 27.974µs ± 0.018µs 28.010µs 28.091µs 28.100µs 28.111µs 0.49% 1.165 0.193 0.16% 0.003µs 1 200
normalization/normalize_name/normalize_name/bad-name throughput 35573372.646op/s 35726958.773op/s ± 56156.327op/s 35748069.604op/s ± 23617.038op/s 35767790.005op/s 35781798.670op/s 35790203.228op/s 35795095.108op/s 0.13% -1.161 0.183 0.16% 3970.852op/s 1 200
normalization/normalize_name/normalize_name/good execution_time 16.700µs 16.734µs ± 0.021µs 16.724µs ± 0.015µs 16.752µs 16.765µs 16.773µs 16.828µs 0.62% 0.610 0.354 0.12% 0.001µs 1 200
normalization/normalize_name/normalize_name/good throughput 59423451.515op/s 59758086.536op/s ± 74093.315op/s 59793080.474op/s ± 51886.488op/s 59823864.349op/s 59845254.373op/s 59861116.537op/s 59878963.302op/s 0.14% -0.603 0.317 0.12% 5239.189op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... execution_time [312.722µs; 313.059µs] or [-0.054%; +0.054%] None None None
normalization/normalize_name/normalize_name/Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Long-.Too-Lo... throughput [3194334.512op/s; 3197775.760op/s] or [-0.054%; +0.054%] None None None
normalization/normalize_name/normalize_name/bad-name execution_time [27.984µs; 27.996µs] or [-0.022%; +0.022%] None None None
normalization/normalize_name/normalize_name/bad-name throughput [35719176.047op/s; 35734741.500op/s] or [-0.022%; +0.022%] None None None
normalization/normalize_name/normalize_name/good execution_time [16.731µs; 16.737µs] or [-0.017%; +0.017%] None None None
normalization/normalize_name/normalize_name/good throughput [59747817.915op/s; 59768355.157op/s] or [-0.017%; +0.017%] None None None

Group 10

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 82edf70 1724344269 bob/poll-ready-retry
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time 618.476µs 619.504µs ± 0.652µs 619.342µs ± 0.316µs 619.783µs 620.684µs 621.823µs 622.158µs 0.45% 1.552 2.835 0.10% 0.046µs 1 200
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput 1607308.065op/s 1614195.425op/s ± 1695.714op/s 1614618.020op/s ± 823.453op/s 1615279.119op/s 1616072.727op/s 1616315.734op/s 1616878.835op/s 0.14% -1.544 2.804 0.10% 119.905op/s 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time 386.754µs 390.199µs ± 1.352µs 390.110µs ± 0.942µs 391.115µs 392.444µs 393.664µs 394.178µs 1.04% 0.227 -0.031 0.35% 0.096µs 1 200
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput 2536922.602op/s 2562825.597op/s ± 8876.183op/s 2563378.518op/s ± 6191.056op/s 2569093.658op/s 2576269.236op/s 2582911.242op/s 2585621.383op/s 0.87% -0.207 -0.044 0.35% 627.641op/s 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time 190.891µs 191.517µs ± 0.225µs 191.518µs ± 0.134µs 191.650µs 191.912µs 192.034µs 192.062µs 0.28% -0.015 0.131 0.12% 0.016µs 1 200
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput 5206659.665op/s 5221485.489op/s ± 6138.982op/s 5221441.327op/s ± 3655.042op/s 5225306.508op/s 5231470.434op/s 5236459.247op/s 5238596.583op/s 0.33% 0.023 0.134 0.12% 434.092op/s 1 200
normalization/normalize_service/normalize_service/[empty string] execution_time 44.847µs 45.036µs ± 0.095µs 45.023µs ± 0.058µs 45.096µs 45.202µs 45.297µs 45.355µs 0.74% 0.641 0.344 0.21% 0.007µs 1 200
normalization/normalize_service/normalize_service/[empty string] throughput 22048126.020op/s 22204674.148op/s ± 46551.225op/s 22210943.999op/s ± 28693.980op/s 22238925.244op/s 22272402.475op/s 22287670.573op/s 22298081.712op/s 0.39% -0.629 0.320 0.21% 3291.669op/s 1 200
normalization/normalize_service/normalize_service/test_ASCII execution_time 48.911µs 49.120µs ± 0.138µs 49.096µs ± 0.082µs 49.201µs 49.377µs 49.557µs 49.739µs 1.31% 1.253 2.234 0.28% 0.010µs 1 200
normalization/normalize_service/normalize_service/test_ASCII throughput 20104853.826op/s 20358297.916op/s ± 56995.204op/s 20368439.024op/s ± 34104.729op/s 20400442.905op/s 20431659.688op/s 20440966.992op/s 20445157.648op/s 0.38% -1.230 2.140 0.28% 4030.170op/s 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... execution_time [619.414µs; 619.595µs] or [-0.015%; +0.015%] None None None
normalization/normalize_service/normalize_service/A0000000000000000000000000000000000000000000000000... throughput [1613960.415op/s; 1614430.434op/s] or [-0.015%; +0.015%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて execution_time [390.012µs; 390.386µs] or [-0.048%; +0.048%] None None None
normalization/normalize_service/normalize_service/Data🐨dog🐶 繋がっ⛰てて throughput [2561595.444op/s; 2564055.751op/s] or [-0.048%; +0.048%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters execution_time [191.485µs; 191.548µs] or [-0.016%; +0.016%] None None None
normalization/normalize_service/normalize_service/Test Conversion 0f Weird !@#$%^&**() Characters throughput [5220634.685op/s; 5222336.293op/s] or [-0.016%; +0.016%] None None None
normalization/normalize_service/normalize_service/[empty string] execution_time [45.023µs; 45.049µs] or [-0.029%; +0.029%] None None None
normalization/normalize_service/normalize_service/[empty string] throughput [22198222.596op/s; 22211125.700op/s] or [-0.029%; +0.029%] None None None
normalization/normalize_service/normalize_service/test_ASCII execution_time [49.101µs; 49.140µs] or [-0.039%; +0.039%] None None None
normalization/normalize_service/normalize_service/test_ASCII throughput [20350398.929op/s; 20366196.903op/s] or [-0.039%; +0.039%] None None None

Group 11

cpu_model git_commit_sha git_commit_date git_branch
Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz 82edf70 1724344269 bob/poll-ready-retry
scenario metric min mean ± sd median ± mad p75 p95 p99 max peak_to_median_ratio skewness kurtosis cv sem runs sample_size
benching deserializing traces from msgpack to their internal representation execution_time 1.171µs 1.344µs ± 0.060µs 1.355µs ± 0.049µs 1.397µs 1.423µs 1.436µs 1.437µs 6.01% -0.537 -0.176 4.42% 0.004µs 1 200
scenario metric 95% CI mean Shapiro-Wilk pvalue Ljung-Box pvalue (lag=1) Dip test pvalue
benching deserializing traces from msgpack to their internal representation execution_time [1.336µs; 1.353µs] or [-0.615%; +0.615%] None None None

Baseline

Omitted due to size.

@bwoebi bwoebi force-pushed the bob/poll-ready-retry branch from d00b971 to d971b77 Compare August 21, 2024 20:51
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 21, 2024

Codecov Report

Attention: Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 72.84%. Comparing base (9e3cb7c) to head (82edf70).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #592      +/-   ##
==========================================
- Coverage   72.90%   72.84%   -0.07%     
==========================================
  Files         241      241              
  Lines       34364    34366       +2     
==========================================
- Hits        25054    25034      -20     
- Misses       9310     9332      +22     
Components Coverage Δ
crashtracker 20.66% <ø> (ø)
datadog-alloc 98.73% <ø> (ø)
data-pipeline 90.12% <ø> (ø)
data-pipeline-ffi 0.00% <ø> (ø)
ddcommon 82.11% <ø> (ø)
ddcommon-ffi 68.11% <ø> (ø)
ddtelemetry 59.02% <ø> (ø)
ipc 84.28% <86.66%> (-0.02%) ⬇️
profiling 84.26% <ø> (ø)
profiling-ffi 77.42% <ø> (ø)
serverless 0.00% <ø> (ø)
sidecar 40.23% <ø> (ø)
sidecar-ffi 0.00% <ø> (ø)
spawn-worker 54.87% <ø> (ø)
trace-mini-agent 70.88% <ø> (ø)
trace-normalization 98.25% <ø> (ø)
trace-obfuscation 95.73% <ø> (ø)
trace-protobuf 77.67% <ø> (ø)
trace-utils 93.00% <ø> (ø)

UnixStream::poll_read_ready may return Poll::Ready(Ok(())), which incidentally, when returned by an AsyncRead::poll_read function without further modification of buf, means that the channel was closed.
The intended meaning is "immediately available", and thus we need to re-read.

This only can happen when epoll() is resumed between a recvmsg() call and the poll_ready_ready function being invoked, which may only happen in a multithreaded environment, which we recently switched to.

Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
@bwoebi bwoebi force-pushed the bob/poll-ready-retry branch from d971b77 to fab9a1b Compare August 22, 2024 11:56
@bwoebi bwoebi merged commit d980023 into main Aug 22, 2024
@bwoebi bwoebi deleted the bob/poll-ready-retry branch August 22, 2024 16:51
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.

4 participants