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

CPU idle decreases after the blade prepare jvm command is executed #663

Open
binbin0325 opened this issue Feb 17, 2022 · 2 comments
Open
Assignees
Labels
chaosblade-exec-jvm chaosblade-exec-jvm project difficulty/hard type/enhancement New feature or request
Milestone

Comments

@binbin0325
Copy link
Member

binbin0325 commented Feb 17, 2022

Issue Description

Type: question

Describe what happened (or what feature you want)

CPU idle decreases after the blade prepare command is executed
When the service is running online, the CPU idle rate is 50% . After the blade prepare command is executed, the CPU idle rate decreases rapidly

服务在线上运行,cpu idle在50%左右,当我执行blade prepare ivm --pid挂载agent后,发现cpu空闲率迅速下降,并且下降的幅度较大。在生产中进行故障注入有可能会直接让idle掉低 触发告警。
image

可疑代码,加载plugin时 由于plugin数量比较多,植入代码消耗资源比较多,是否可以改成和method plugin一样 采用“ lazy”加载模式,当blade create 时 添加相应的plugin到sandbox中去植入代码

@Information(id = "chaosblade", version = "1.4.0", author = "Changjun Xiao", isActiveOnLoad = false)
public class SandboxModule implements Module, ModuleLifecycle, PluginLifecycleListener {
    ......
    @Override
    public void onActive() throws Throwable {
        LOGGER.info("active chaosblade module");
        loadPlugins();
    }
    ......
}

通过火焰图 可以确认是loadPlugins 消耗较多资源
image

Describe what you expected to happen

How to reproduce it (as minimally and precisely as possible)

Tell us your environment

Anything else we need to know?

@xcaspar xcaspar added type/enhancement New feature or request chaosblade-exec-jvm chaosblade-exec-jvm project labels Mar 27, 2022
@xcaspar xcaspar added this to the v1.6.0 milestone Mar 27, 2022
@xcaspar
Copy link
Member

xcaspar commented Mar 27, 2022

👍 Nice.

@thinkergithub
Copy link

thinkergithub commented Jun 17, 2022

we'll fix this in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chaosblade-exec-jvm chaosblade-exec-jvm project difficulty/hard type/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants