[#113407] [Ruby master Feature#19630] [RFC] Deprecate `Kernel.open("|command-here")` due to frequent security issues — "postmodern (Hal Brodigan) via ruby-core" <ruby-core@...>

Issue #19630 has been reported by postmodern (Hal Brodigan).

19 messages 2023/05/05

[#113430] [Ruby master Feature#19633] Allow passing block to `Kernel#autoload` as alternative to second `filename` argument — "shioyama (Chris Salzberg) via ruby-core" <ruby-core@...>

Issue #19633 has been reported by shioyama (Chris Salzberg).

16 messages 2023/05/09

[#113489] [Ruby master Bug#19642] Remove vectored read/write from `io.c`. — "ioquatix (Samuel Williams) via ruby-core" <ruby-core@...>

Issue #19642 has been reported by ioquatix (Samuel Williams).

10 messages 2023/05/15

[#113498] [Ruby master Feature#19644] Module::current to complement Module::nesting — "bughit (bug hit) via ruby-core" <ruby-core@...>

Issue #19644 has been reported by bughit (bug hit).

12 messages 2023/05/16

[#113517] [Ruby master Misc#19679] Migrate Wiki from bugs.ruby-lang.org to ruby/ruby GitHub repository — "jemmai (Jemma Issroff) via ruby-core" <ruby-core@...>

Issue #19679 has been reported by jemmai (Jemma Issroff).

11 messages 2023/05/18

[#113529] [Ruby master Bug#19681] The final classpath of partially named modules is sometimes inconsistent once permanently named — "byroot (Jean Boussier) via ruby-core" <ruby-core@...>

Issue #19681 has been reported by byroot (Jean Boussier).

34 messages 2023/05/19

[#113538] [Ruby master Feature#19682] ability to get a reference to the "default definee" — "bughit (bug hit) via ruby-core" <ruby-core@...>

Issue #19682 has been reported by bughit (bug hit).

28 messages 2023/05/19

[#113601] [Ruby master Bug#19687] Should a development version of the standard library be included in ruby/ruby? — "jaruga (Jun Aruga) via ruby-core" <ruby-core@...>

Issue #19687 has been reported by jaruga (Jun Aruga).

9 messages 2023/05/23

[#113632] [Ruby master Bug#19691] Case insensitive file systems, require filename casing — "MSP-Greg (Greg L) via ruby-core" <ruby-core@...>

Issue #19691 has been reported by MSP-Greg (Greg L).

7 messages 2023/05/24

[#113656] [Ruby master Misc#19693] Data initialization is significantly slower than Struct — janosch-x via ruby-core <ruby-core@...>

Issue #19693 has been reported by janosch-x (Janosch M=FCller).

13 messages 2023/05/25

[#113660] [Ruby master Feature#19694] Add Regexp#timeout= setter — "aharpole (Aaron Harpole) via ruby-core" <ruby-core@...>

Issue #19694 has been reported by aharpole (Aaron Harpole).

15 messages 2023/05/25

[#113676] [Ruby master Bug#19697] Resolv::DNS resolution for international domains fails with "Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT" — "clairity (claire c) via ruby-core" <ruby-core@...>

SXNzdWUgIzE5Njk3IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGNsYWlyaXR5IChjbGFpcmUgYykuDQ0K

6 messages 2023/05/27

[ruby-core:113425] [Ruby master Feature#19435] Expose counts for each GC reason in GC.stat

From: "ko1 (Koichi Sasada) via ruby-core" <ruby-core@...>
Date: 2023-05-09 04:46:38 UTC
List: ruby-core #113425
Issue #19435 has been updated by ko1 (Koichi Sasada).


Sorry for late response.

> Yes, but unfortunately GC hooks have the adverse effect of disallowing allocation fast path, so I'd rather not go this route.

You are correct and we can ignore gc_enter/gc_exit events here. So we can avoid this demerit.

>> Is it so important to have in core?
> I think it would be useful for various application performance monitoring tools to be able to alert users on this kind of issues without having to use a C extension.

I agree it is convenient if Rails itself (or major gems) monitors this kind of counters. However if a gem monitoring this kind of counters is provided, I think there is no reason to avoid C-extension.

For example, we can introduce `major_gc_oldgen_time` and so on, but I think it is too much.
I think this proposal is also too much.

Too trivial reason I against is we want to introduce Ractor local GC and this kind of memory space should be allocated for each ractor, and I don't want to make it bigger and bigger (but again, it is not important issue).

----------------------------------------
Feature #19435: Expose counts for each GC reason in GC.stat
https://bugs.ruby-lang.org/issues/19435#change-102998

* Author: byroot (Jean Boussier)
* Status: Open
* Priority: Normal
----------------------------------------
### Context

We recently tuned the GC settings on our monolith application because we were seeing some very long GC pauses (multiple seconds) during some requests.

Very early we realized that we could know how often the GC was triggered, and how long it was taking, but we had no information as to why, hence no good way
to know which specific configuration to tune. As of today, the only way to get this information is to compile Ruby with debug counters, but that's not really
accessible for most users, and not very suitable to be deployed in production.

So we patched our Ruby to expose counters for each specific reason in `GC.stat` and this data was extremely valuable.

For instance we discovered that the number 1 cause of major GC was `shady` objects, which allowed us to both better tune or GC and to drive some
targeted patches to Ruby.


### Proposal

We'd like to merge the patch we used on our Ruby build. It expose 8 new keys in `GC.stat`:

- `:major_gc_nofree_count`
- `:major_gc_oldgen_count`
- `:major_gc_shady_count`
- `:major_gc_newobj_count`
- `:major_gc_malloc_count`
- `:major_gc_oldmalloc_count`
- `:minor_gc_newobj_count`
- `:minor_gc_malloc_count`

Some very uncommon reasons like `force` etc are ignored as they're not valuable.

Also note that sometimes multiple conditions can be met to trigger GC, in such case we my increment several counters, so the sum of `major_gc_*_count` can be higher than `major_gc_count`.


Proposed patch: https://github.com/ruby/ruby/pull/7250



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/

In This Thread

Prev Next