Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PROF-11385] Enable GVL profiling by default on Ruby 3.2+ #4406

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Feb 19, 2025

What does this PR do?

This PR graduates the GVL profiling feature from preview to GA, and turns it on by default.

This means the old preview_gvl_enabled setting and its corresponding DD_PROFILING_PREVIEW_GVL_ENABLED environment variable are now deprecated.

Motivation:

Roll out this cool feature to customers ;)

Change log entry

Yes. Enable GVL profiling by default on Ruby 3.2+

Also, here's a snippet for the release highlights:

### GVL Profiling is now enabled by default on Ruby 3.2+

GVL profiling means the profiler gathers information from threads waiting to acquire the Ruby "Global VM Lock" (GVL).

This waiting can be a big a source of latency for Ruby applications: a thread "Waiting on the GVL" is a thread that's ready to make progress, but can't start because Ruby is busy doing something else.

For more details on why GVL profiling is relevant, check out [How the Ruby Global VM Lock impacts app performance](https://www.youtube.com/watch?v=MmKhsvvyiCw) and https://github.com/DataDog/dd-trace-rb/pull/3929.

Additional Notes:

N/A

How to test the change?

This change includes test coverage.

**What does this PR do?**

This PR graduates the GVL profiling feature from preview to GA, and
turns it on by default.

This means the old `preview_gvl_enabled` setting and its corresponding
`DD_PROFILING_PREVIEW_GVL_ENABLED` environment variable are now
deprecated.

**Motivation:**

Roll out this cool feature to customers ;)

**Change log entry**

Yes. Enable GVL profiling by default on Ruby 3.2+

Also, here's a snippet for the release highlights:

```markdown
 ### GVL Profiling is now enabled by default on Ruby 3.2+

GVL profiling means the profiler gathers information from threads
waiting to acquire the Ruby "Global VM Lock" (GVL).

This waiting can be a big a source of latency for Ruby applications:
a thread "Waiting on the GVL" is a thread that's ready to make progress,
but can't start because Ruby is busy doing something else.

For more details on why GVL profiling is relevant, check out
[How the Ruby Global VM Lock impacts app performance](https://www.youtube.com/watch?v=MmKhsvvyiCw)
and #3929.
```

**Additional Notes:**

N/A

**How to test the change?**

This change includes test coverage.
@ivoanjo ivoanjo requested review from a team as code owners February 19, 2025 09:41
@github-actions github-actions bot added core Involves Datadog core libraries profiling Involves Datadog profiling labels Feb 19, 2025
@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Feb 19, 2025

Datadog Report

Branch report: ivoanjo/prof-11385-gvl-profiling-ga
Commit report: 09eed91
Test service: dd-trace-rb

✅ 0 Failed, 20599 Passed, 1371 Skipped, 3m 16.63s Total Time

@pr-commenter
Copy link

pr-commenter bot commented Feb 19, 2025

Benchmarks

Benchmark execution time: 2025-02-19 10:45:25

Comparing candidate commit 09eed91 in PR branch ivoanjo/prof-11385-gvl-profiling-ga with baseline commit 18de083 in branch master.

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

scenario:tracing - Propagation - Trace Context

  • 🟩 throughput [+3479.174op/s; +3578.863op/s] or [+10.161%; +10.452%]

ivoanjo added a commit to DataDog/documentation that referenced this pull request Feb 19, 2025
This PR updates the documentation to reflect that GVL profiling is now
GA for Ruby.

Furthermore:

1. Since the feature is now enabled by default, I've removed it from
   the listed settings. We don't list every setting in this page, only
   the more relevant ones (especially extra data collection that's
   not enabled by default), and since this feature will be enabled by
   default there's no reason to list it here.

The change on the Ruby side is in
DataDog/dd-trace-rb#4406
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.70%. Comparing base (18de083) to head (09eed91).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4406      +/-   ##
==========================================
+ Coverage   97.69%   97.70%   +0.01%     
==========================================
  Files        1366     1366              
  Lines       83372    83396      +24     
  Branches     4230     4231       +1     
==========================================
+ Hits        81451    81483      +32     
+ Misses       1921     1913       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ivoanjo ivoanjo merged commit df4f87a into master Feb 19, 2025
487 checks passed
@ivoanjo ivoanjo deleted the ivoanjo/prof-11385-gvl-profiling-ga branch February 19, 2025 11:09
@github-actions github-actions bot added this to the 2.11.0 milestone Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Involves Datadog core libraries profiling Involves Datadog profiling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants