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

Disable ssimulacra2's rayon feature #35

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

FreezyLemon
Copy link
Contributor

Closes #21.

We have our own threading mechanism, adding rayon on top of that is unnecessary and less efficient1.

This also makes the CPU usage a lot more predictable. Using -f 8 on a machine with 16 logical cores will show close to 50% CPU usage. With rayon, this was always more than expected (~70% in this example).

Footnotes

  1. On my two machines, normalizing for CPU usage will always result in higher FPS without rayon.

@lu-zero
Copy link
Member

lu-zero commented Feb 10, 2024

Sounds good, could you please open an issue so we can investigate if we can improve rayon later?

@lu-zero lu-zero merged commit 857babf into rust-av:main Feb 10, 2024
1 check passed
@FreezyLemon FreezyLemon deleted the disable-ssimu2-rayon branch February 10, 2024 11:54
@FreezyLemon
Copy link
Contributor Author

@lu-zero Can you explain what you mean? The rayon feature in ssimulacra2 isn't bad or anything, but we have a better threading mechanism in this crate

@lu-zero
Copy link
Member

lu-zero commented Feb 10, 2024

Ideally we can make so the rayon in the crate library cooperates better with downstream crates from what you found out :)

@FreezyLemon
Copy link
Contributor Author

I see. I opened rust-av/ssimulacra2#18

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.

Investigate rayon impact in multi-threaded scenarios
2 participants