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

Question about benchmark result. #74

Open
abbychau opened this issue Oct 17, 2019 · 6 comments
Open

Question about benchmark result. #74

abbychau opened this issue Oct 17, 2019 · 6 comments

Comments

@abbychau
Copy link

That is when I was running benchmark on my MacBook Pro (15-inch, 2018, i7, 16GB DDR4)
image

The result is 2.8x slower than 4190944 even it is running in release mode.
What are the possible tunings I missed?

@Xudong-Huang
Copy link
Owner

The bench result is quite different with different Hw/Sw environment. And the readme bench number is no longer valid since both rustc and the project is advanced a lot. Maybe I should remove the bench in readme. Put it there is just giving people some feeling of it's performance.

Linux and Mac has different event dispatch system. I think the your performance gap may mainly come from the differences between epoll and kqueue.

I test it again on my linux vm (ubuntu 16 with 4 cores cpu) and got the following result, yes it's still much slower than the original data.

$ /tmp/rust/may/release/examples/echo_client -t 2 -c 100 -l 100 -a 127.0.0.1:8000
==================Benchmarking: 127.0.0.1:8000==================
100 clients, running 100 bytes, 10 sec.

Speed: 281519 request/sec,  281519 response/sec, 27492 kb/sec
Requests: 2815193
Responses: 2815192
/tmp/rust/may/release/examples/echo_client -t 2 -c 100 -l 100 -a   2.95s user 16.58s system 195% cpu 10.011 total

@abbychau
Copy link
Author

abbychau commented Oct 17, 2019

Thank you for the retesting result.

I think kqueue and epoll would make a bit different but I think it is better to put this aside first because the current throughput seems to be abnormal, as it is just similar to the throughput of data operations on Redis but the test on may is just doing echo.

I would like to investigate but I am not sure what changes in Rust possibly made the logic changed.

Do you have any clue?

@Xudong-Huang
Copy link
Owner

I'm not familiar with MacOs. Did you see the cpu usage? In normal cases, you can use the whole cpu if give both server and client the half cpus.

@abbychau
Copy link
Author

The usage looks normal.
image

Do you have any clue of dropping from 4190k to 2815k anyways? It should be a major problem but may only require little effort to cater as it looks like a logic error revealed eventually due to the advancement of this project or Rust.

@Xudong-Huang
Copy link
Owner

The cpu usage should be almost 100%, like this
image

My performance drop may come from my old laptop, it's thermal system is not as good as before. It may also related with the vm upgrade, linux kernel upgrade, who knows.

@Xudong-Huang
Copy link
Owner

ref #72 with the latest result.

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