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

Process disk rw #287

Merged
merged 28 commits into from
Apr 7, 2020
Merged

Process disk rw #287

merged 28 commits into from
Apr 7, 2020

Conversation

GuillaumeGomez
Copy link
Owner

@GuillaumeGomez GuillaumeGomez commented Apr 5, 2020

Taking over #248.

cc @bvaisvi

On windows, the performance are still miserable. An alternative could be to use GetProcessIoCounters, however it returns all I/O (so disk+network+driver, whatever "driver" means). So to get a somewhat accurate information, it'd require to get the network usage for the process and subtract it from what GetProcessIoCounters returns. Quite annoying... As a result, windows performance is getting 3 times worst when adding new process:

test bench_new                     ... bench:   7,918,095 ns/iter (+/- 422,384)
test bench_new_all                 ... bench:  92,207,290 ns/iter (+/- 6,613,951)
test bench_refresh_all             ... bench:   1,561,685 ns/iter (+/- 132,639)
test bench_refresh_components      ... bench:           1 ns/iter (+/- 0)
test bench_refresh_components_list ... bench:      28,625 ns/iter (+/- 1,849)
test bench_refresh_cpu             ... bench:      34,676 ns/iter (+/- 9,526)
test bench_refresh_disks           ... bench:      56,971 ns/iter (+/- 2,548)
test bench_refresh_disks_lists     ... bench:     125,932 ns/iter (+/- 4,918)
test bench_refresh_memory          ... bench:       1,042 ns/iter (+/- 28)
test bench_refresh_networks        ... bench:      39,778 ns/iter (+/- 3,216)
test bench_refresh_networks_list   ... bench:   1,374,947 ns/iter (+/- 58,170)
test bench_refresh_process         ... bench:       1,288 ns/iter (+/- 125)
test bench_refresh_processes       ... bench:   1,135,397 ns/iter (+/- 254,835)
test bench_refresh_system          ... bench:      38,371 ns/iter (+/- 7,019)
test bench_refresh_users_list      ... bench:   3,427,415 ns/iter (+/- 108,865)

The only way I found to reduce this performance drop even more is to only compute disk usage when user requests it (otherwise, it's 70 times slower!!!).

@bvaisvil
Copy link
Contributor

bvaisvil commented Apr 6, 2020

Great to see this get added!

@GuillaumeGomez GuillaumeGomez force-pushed the process_disk_rw branch 8 times, most recently from 9dd8e3a to 58c00c4 Compare April 7, 2020 12:45
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

Successfully merging this pull request may close these issues.

2 participants