René's URL Explorer Experiment


Title: Later benchmarks are notoriously slower, possibly due to CPU throttling · Issue #954 · phpbench/phpbench · GitHub

Open Graph Title: Later benchmarks are notoriously slower, possibly due to CPU throttling · Issue #954 · phpbench/phpbench

X Title: Later benchmarks are notoriously slower, possibly due to CPU throttling · Issue #954 · phpbench/phpbench

Description: Problem I have a test case like this: class MyBench { public function benchA1() {...} public function benchB1() {...} public function benchA1() { ... // Exact copy of benchA1(). } public function benchB1() { ... // Exact copy of benchB1(...

Open Graph Description: Problem I have a test case like this: class MyBench { public function benchA1() {...} public function benchB1() {...} public function benchA1() { ... // Exact copy of benchA1(). } public function b...

X Description: Problem I have a test case like this: class MyBench { public function benchA1() {...} public function benchB1() {...} public function benchA1() { ... // Exact copy of benchA1(). } public function b...

Opengraph URL: https://github.com/phpbench/phpbench/issues/954

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Later benchmarks are notoriously slower, possibly due to CPU throttling","articleBody":"### Problem\r\n\r\nI have a test case like this:\r\n\r\n```php\r\nclass MyBench {\r\n  public function benchA1() {...}\r\n  public function benchB1() {...}\r\n  public function benchA1() {\r\n    ... // Exact copy of benchA1().\r\n  }\r\n  public function benchB1() {\r\n    ... // Exact copy of benchB1().\r\n  }\r\n}\r\n```\r\n\r\nWhen running all of them, the later (copied) version is notoriously slower than the previous version. E.g. A2 will be slower than A1, and B2 will be slower than B1. I saw differences higher than 10%, and this was reproducible.\r\n\r\nI assume this is because the processor gets heated and will throttle when it hits the later benchmark cases.\r\n\r\nThis can lead to misleading results when comparing the performance of different algorithms.\r\n\r\n\r\n### Solution 1: Sleep\r\nWe can use the `--sleep` parameter or `@Sleep` annotribute, hoping that the processor will cool down.\r\nI tried with ` --revs=1 --iterations=50 --sleep=10000`, it seems to improve stability _sometimes_, but the problem does not fully go away.\r\nPerhaps I need to use higher sleep numbers?\r\n\r\nOne problem with this is that a user won't see if the sleep number was \"high enough\", because usually there are no 1:1 copied benchmark methods.\r\n\r\n### Solution 2: Mix it up\r\nIn the past, I created a custom benchmark tool where I would break the strict ordering of benchmark cases.\r\nE.g. I would run A, B, A, B, A, B instead of A, A, A, B, B, B.\r\n\r\nWhile this makes a more \"fair\" comparison of A vs B in the current run, it does not help with differences to earlier runs, where the CPU might have been less heated.\r\n\r\n### Solution 3: Pre-stress the processor\r\nHeat up the processor so that all the benchmark cases suffer from the same throttling.\r\n\r\nI don't know if a processor will reach a fixed throttling level, or if it will throttle more and more.\r\nI assume it depends on many factors.\r\n\r\n### Solution 4: Measure current raw CPU speed?\r\nA reference operation could be used to measure the current CPU speed.\r\nA report could show benchmark times divided by the duration for the reference operation.\r\n\r\nProblems with this:\r\n- The divided number will be an imaginary unit, because the reference operation is completely arbitrary.\r\n- There might be high variation in the reference operation measurements.\r\n- Resources used for the reference operation might be different than for the benchmark operation, so the division might distort the results.","author":{"url":"https://github.com/donquixote","@type":"Person","name":"donquixote"},"datePublished":"2021-12-06T00:10:38Z","url":"https://github.com/phpbench/phpbench/issues/954"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7be42fee-265f-4764-48fa-a76160d1c728
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC9B4:B0AA1:45214D:5F9455:6B0451DE
html-safe-nonce0bc91d2c49580fa22522c1040004cb8c60b506d0e644ed5ab9fa1e6a0efe73a4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUI0OkIwQUExOjQ1MjE0RDo1Rjk0NTU6NkIwNDUxREUiLCJ2aXNpdG9yX2lkIjoiNzU3OTczNTc3MTU1NzY3OTU4MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac9eb1a4f62380aac28bab89049ec7d2ca8177b1e45cbe7d12850ebf2e6823afd7
hovercard-subject-tagissue:1071598054
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/phpbench/phpbench/954/issue_layout
twitter:imagehttps://opengraph.githubassets.com/85c902e333569fbcb07bb74112ac5305b82f5a27797da34078d42bde2ec12b67/phpbench/phpbench/issues/954
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/85c902e333569fbcb07bb74112ac5305b82f5a27797da34078d42bde2ec12b67/phpbench/phpbench/issues/954
og:image:altProblem I have a test case like this: class MyBench { public function benchA1() {...} public function benchB1() {...} public function benchA1() { ... // Exact copy of benchA1(). } public function b...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedonquixote
hostnamegithub.com
expected-hostnamegithub.com
None910ca0e260cfec6aff11407d8dc6a0d3a4cd381a2ec9ada56627b063426892a0
turbo-cache-controlno-preview
go-importgithub.com/phpbench/phpbench git https://github.com/phpbench/phpbench.git
octolytics-dimension-user_id12785153
octolytics-dimension-user_loginphpbench
octolytics-dimension-repository_id34982189
octolytics-dimension-repository_nwophpbench/phpbench
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id34982189
octolytics-dimension-repository_network_root_nwophpbench/phpbench
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasee086f9b7e88322eb2b41885a6ad425b215737fa5
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/phpbench/phpbench/issues/954#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpbench%2Fphpbench%2Fissues%2F954
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpbench%2Fphpbench%2Fissues%2F954
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=phpbench%2Fphpbench
Reloadhttps://github.com/phpbench/phpbench/issues/954
Reloadhttps://github.com/phpbench/phpbench/issues/954
Reloadhttps://github.com/phpbench/phpbench/issues/954
phpbenchhttps://github.com/phpbench
phpbenchhttps://github.com/phpbench/phpbench
Codehttps://github.com/phpbench/phpbench
Issues29 (29)https://github.com/phpbench/phpbench/issues
Pull requests12 (12)https://github.com/phpbench/phpbench/pulls
Discussionshttps://github.com/phpbench/phpbench/discussions
Actionshttps://github.com/phpbench/phpbench/actions
Projectshttps://github.com/phpbench/phpbench/projects
Security and qualityhttps://github.com/phpbench/phpbench/security
Insightshttps://github.com/phpbench/phpbench/insights
https://github.com/phpbench/phpbench
New issuehttps://github.com/login?return_to=https://github.com/phpbench/phpbench/issues/954
New issuehttps://github.com/login?return_to=https://github.com/phpbench/phpbench/issues/954
Later benchmarks are notoriously slower, possibly due to CPU throttlinghttps://github.com/phpbench/phpbench/issues/954#top
https://github.com/donquixote
donquixotehttps://github.com/donquixote
on Dec 6, 2021https://github.com/phpbench/phpbench/issues/954#issue-1071598054
https://github.com/dantleech
dantleechhttps://github.com/dantleech
on Dec 6, 2021https://github.com/phpbench/phpbench/issues/954#issuecomment-986612579
https://github.com/donquixote
donquixotehttps://github.com/donquixote
on Dec 6, 2021https://github.com/phpbench/phpbench/issues/954#issuecomment-986751701
https://github.com/dantleech
dantleechhttps://github.com/dantleech
on Dec 6, 2021https://github.com/phpbench/phpbench/issues/954#issuecomment-986975786
https://askubuntu.com/questions/523640/how-i-can-disable-cpu-frequency-scaling-and-set-the-system-to-performancehttps://askubuntu.com/questions/523640/how-i-can-disable-cpu-frequency-scaling-and-set-the-system-to-performance
Sign up for freehttps://github.com/signup?return_to=https://github.com/phpbench/phpbench/issues/954
Sign in to commenthttps://github.com/login?return_to=https://github.com/phpbench/phpbench/issues/954
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.