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 load 88% #1

Open
zhuxiujia opened this issue Mar 1, 2020 · 6 comments
Open

cpu load 88% #1

zhuxiujia opened this issue Mar 1, 2020 · 6 comments
Assignees

Comments

@zhuxiujia
Copy link

zhuxiujia commented Mar 1, 2020

有点奇怪,为什么cpu负载会这么高?
我的电脑配置: i7 8700 6核心12线程

测试go官方rpc

client : cpu负载 12%
service: cpu负载 12%

测试may_rpc - cargo run --example=throughput --release

may::config().set_pool_capacity(12);
cpu负载 89.7%
@Xudong-Huang
Copy link
Owner

很正常啊,所有的cpu都充分利用了,你可以看看最后的统计数值应该差距很大

@zhuxiujia
Copy link
Author

很正常啊,所有的cpu都充分利用了,你可以看看最后的统计数值应该差距很大

问下那may是否有任务窃取的机制,会不会里面的协程忙的忙死,闲的闲死的情况

@Xudong-Huang
Copy link
Owner

有的,不然怎么会把cpu吃满

@zhuxiujia
Copy link
Author

zhuxiujia commented Mar 1, 2020

有的,不然怎么会把cpu吃满

还有个小问题,这个rpc 能否提供负载均衡 的 模块,提供简单的负载算法例如hash ,随机,轮询,最小连接数等等?

@Xudong-Huang
Copy link
Owner

这个工程不提供分布式的功能

@zhuxiujia
Copy link
Author

zhuxiujia commented Mar 2, 2020

这个工程不提供分布式的功能

那可以开放接口吗?能把负责重定向的trait 接口的算法 放给开发者去实现?
还有就是 是否可以自定义序列化框架,假如说不想用serde,要用protobuf序列化,似乎不支持了

@Xudong-Huang Xudong-Huang self-assigned this Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants