Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Observer cost too much CPU even if no user request at all #63

Closed
raywill opened this issue Jun 3, 2021 · 0 comments
Closed

Observer cost too much CPU even if no user request at all #63

raywill opened this issue Jun 3, 2021 · 0 comments

Comments

@raywill
Copy link
Contributor

raywill commented Jun 3, 2021

I am testing observer in a 12core machine. While there is no request, observer still cost 60% CPU of one core.

here are details:

IMG_5994

I wrote a script to limit its cpu usage. seems that it works.

( this method requires that cgroup is enabled in your machine. create a cgroup named oceanbase)

PIDS=`top -d 10 -H -b -n1 | awk 'NR>6 { print $1,$12 }' | grep -E '(WeakReadSvr|LogStateDri|KVCacheWash|BRPC4|KVCacheRep|ObTimer|WeakReadService|ObLockWaitMgr|IODISK30|PartSerLargeCb3|CLGWR)' | awk '{print $1}'`
for i in $PIDS; do echo $i > /sys/fs/cgroup/cpu/oceanbase/tasks; done
echo 10000 > /sys/fs/cgroup/cpu/oceanbase/cpu.cfs_quota_us

# check
cat /sys/fs/cgroup/cpu/oceanbase/tasks
@MizuhaHimuraki MizuhaHimuraki changed the title observer cost too much CPU even if no user request at all Observer cost too much CPU even if no user request at all Jun 3, 2021
@oceanbase oceanbase locked and limited conversation to collaborators Jun 3, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants