Skip to content

benchmark: update num to n in dgram offset-length - #59708

Closed
brunocroh wants to merge 2 commits into
nodejs:mainfrom
brunocroh:calibrate-dgram-offset-length
Closed

benchmark: update num to n in dgram offset-length#59708
brunocroh wants to merge 2 commits into
nodejs:mainfrom
brunocroh:calibrate-dgram-offset-length

Conversation

@brunocroh

@brunocrohbrunocroh commented Sep 1, 2025

Copy link
Copy Markdown
Member

Replace the num config with n to be compatible with the n CLI argument.

According to nodejs/performance#186 this benchmark was taking 40 seconds for a single run.

Since this benchmark doesn’t take too long to run (about 40s), I didn’t change the config.

I ran the benchmarks for comparison, but I’m not sure if using len as [1, 512, 1024] would provide better coverage than [1, 64, 256, 1024]. What do you guys think?

If that makes sense to you, let me know, and I can update it to [1, 512, 1024].
This change reduces the execution time from 40s to 30s.

Here’s the output for both configs:

len: [1, 64, 256, 1024]

dgram/offset-length.js dur=5 type="send" n=100 len=1: 0.00029774464483540395
dgram/offset-length.js dur=5 type="recv" n=100 len=1: 0.00008736534416572343
dgram/offset-length.js dur=5 type="send" n=100 len=64: 0.01820060746926647
dgram/offset-length.js dur=5 type="recv" n=100 len=64: 0.005719775647413869
dgram/offset-length.js dur=5 type="send" n=100 len=256: 0.07849402316926338
dgram/offset-length.js dur=5 type="recv" n=100 len=256: 0.02109259972351112
dgram/offset-length.js dur=5 type="send" n=100 len=1024: 0.3289801256746718
dgram/offset-length.js dur=5 type="recv" n=100 len=1024: 0.09215122503886834
real 0m40.983s
user 0m21.080s
sys 0m17.143s

len: [1,512,1024]

dgram/offset-length.js dur=5 type="send" n=100 len=1: 0.0003172381715335142
dgram/offset-length.js dur=5 type="recv" n=100 len=1: 0.00010832342823154378
dgram/offset-length.js dur=5 type="send" n=100 len=512: 0.1707906782931467
dgram/offset-length.js dur=5 type="recv" n=100 len=512: 0.05277125834012046
dgram/offset-length.js dur=5 type="send" n=100 len=1024: 0.3028087268917686
dgram/offset-length.js dur=5 type="recv" n=100 len=1024: 0.08280481519975962
real 0m30.869s
user 0m15.585s
sys 0m13.336s

Benchmark Machine Specifications:

---------------------------------
Uptime : 3 days, 15 hours, 36 minutes
Processor : Intel(R) Xeon(R) CPU E5-2690 v2 @ 3.00GHz
CPU cores : 4 @ 2999.998 MHz
AES-NI : ✔ Enabled
VM-x/AMD-V : ✔ Enabled
RAM : 11.4 GiB
Swap : 0.0 KiB
Disk : 500.0 GiB
Distro : CentOS Stream 9
Kernel : 5.14.0-295.el9.x86_64
VM Type : KVM

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/performance

@nodejs-github-botnodejs-github-bot added benchmark Issues and PRs related to the benchmark subsystem. dgram Issues and PRs related to the dgram subsystem / UDP. labels Sep 1, 2025
@RafaelGSS

Copy link
Copy Markdown
Member

If that makes sense to you, let me know, and I can update it to [1, 512, 1024].

+1

@brunocroh

Copy link
Copy Markdown
MemberAuthor

If that makes sense to you, let me know, and I can update it to [1, 512, 1024].

+1

done

@RafaelGSSRafaelGSS added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 3, 2025
@RafaelGSS

Copy link
Copy Markdown
Member

@brunocroh can you make sure to update the spreadsheet with the PRs you did? Also, let's focus just on benchmarks that take more than 10 min (on compare.js) to conclude

@brunocroh

Copy link
Copy Markdown
MemberAuthor

@brunocroh can you make sure to update the spreadsheet with the PRs you did? Also, let's focus just on benchmarks that take more than 10 min (on compare.js) to conclude

Yes, sure. Since I don’t have permission to edit the table, I just added comments with the PR URL.

Regarding the duration, I’m trying to focus on the ones that take longer to execute. At the same time, I’m also updating the ones that don’t support the N flag because of the requirements in nodejs/performance#187.

@BridgeARBridgeAR added the request-ci Add this label to start a Jenkins CI on a PR. label Sep 14, 2025
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 14, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@addaleaxaddaleax added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-rebase Add this label to allow the Commit Queue to land a PR in several commits. labels Sep 24, 2025
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Sep 24, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in e4e86ea...6ce89d7

nodejs-github-bot pushed a commit that referenced this pull request Sep 24, 2025
PR-URL: #59708
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
nodejs-github-bot pushed a commit that referenced this pull request Sep 24, 2025
PR-URL: #59708
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@brunocroh
brunocroh deleted the calibrate-dgram-offset-length branch September 24, 2025 15:13
targos pushed a commit that referenced this pull request Oct 6, 2025
PR-URL: #59708
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
targos pushed a commit that referenced this pull request Oct 6, 2025
PR-URL: #59708
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
aduh95 pushed a commit that referenced this pull request Oct 22, 2025
PR-URL: #59708
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
aduh95 pushed a commit that referenced this pull request Oct 22, 2025
PR-URL: #59708
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.benchmarkIssues and PRs related to the benchmark subsystem.commit-queue-rebaseAdd this label to allow the Commit Queue to land a PR in several commits.dgramIssues and PRs related to the dgram subsystem / UDP.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@brunocroh@nodejs-github-bot@RafaelGSS@BridgeAR@addaleax