Giter VIP home page Giter VIP logo

Comments (8)

Jun10ng avatar Jun10ng commented on August 16, 2024

Heap Dump has the same scene.

"pprof is safe to use in production. We target an additional 5% overhead for CPU and heap allocation profiling. "

from holmes.

taoyuanyuan avatar taoyuanyuan commented on August 16, 2024

It's a good idea, and I prefer the latter too, we could configure not any CPU,but also mem and goroutine etc.
PR welcome!

from holmes.

cch123 avatar cch123 commented on August 16, 2024

in my previous experiments, if goroutine num is huge, eg. 100k
goroutine dump will also become a heavy action: stw && stack dump
maybe the goroutine number limit param should also be added~

from holmes.

Jun10ng avatar Jun10ng commented on August 16, 2024

in my previous experiments, if goroutine num is huge, eg. 100k goroutine dump will also become a heavy action: stw && stack dump maybe the goroutine number limit param should also be added~

how we measure this parameter, I mean it's difficult to have a common goroutine number limit on different machines, unlike CPU or memory can be measured in percent.

from holmes.

cch123 avatar cch123 commented on August 16, 2024

in my previous experiments, if goroutine num is huge, eg. 100k goroutine dump will also become a heavy action: stw && stack dump maybe the goroutine number limit param should also be added~

how we measure this parameter, I mean it's difficult to have a common goroutine number limit on different machines, unlike CPU or memory can be measured in percent.

Yes, it's hard to configure a universal value for every type of application load, if some users use this lib in their own app, maybe they can figure out a proper value with consideration on their own type of workload? I'm not sure

from holmes.

Jun10ng avatar Jun10ng commented on August 16, 2024

@cch123 ok, I will create a new pr, but before that, I want to discuss does this parameter control only goroutine profile dumping or all types profile dumping?

in other words,
change EnableDump

if err := h.EnableDump(cpu); err != nil {

or change
func (h *Holmes) goroutineCheckAndDump(gNum int) {

from holmes.

cch123 avatar cch123 commented on August 16, 2024

@cch123 ok, I will create a new pr, but before that, I want to discuss does this parameter control only goroutine profile dumping or all types profile dumping?

in other words, change EnableDump

if err := h.EnableDump(cpu); err != nil {

or change

func (h *Holmes) goroutineCheckAndDump(gNum int) {

only setting limit on goroutineCheckAndDump is ok, be careful about the naming~

from holmes.

taoyuanyuan avatar taoyuanyuan commented on August 16, 2024

In my opinion, if this goroutine parameter control all types profile dumping, use global EnableDump and WithCPUMax modify to WithMaxLimit(cpu, mem, goroutine), else control only goroutine profile, change to WithGoroutineDump(min int, diff int, abs int, max int).

from holmes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.