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

Investigate use of a "writer thread" for all output #37

Open
michael-okeefe opened this issue Apr 18, 2024 · 0 comments
Open

Investigate use of a "writer thread" for all output #37

michael-okeefe opened this issue Apr 18, 2024 · 0 comments
Labels
benchmarking Related to benchmarking performance enhancement New feature or request performance A task related to assessing/enhancing performance

Comments

@michael-okeefe
Copy link
Member

michael-okeefe commented Apr 18, 2024

Problem

Writing results files currently takes quite a bit of time. A writer thread would allow simulation to continue while writer threads go at their best pace writing to output.

Possible Solution

Use a writer thread and a thread-safe queue to send data to write from the main simulation thread to the writer. Possible thread-safe queue implementations are here:

Note: this should be spec'd out and benchmarked for timing before investing too much time. We also need to discuss what to do if the queue fills up from the simulation-data side before the writer can clear the data out; presumably, we would just block under that scenario.

Note: usage of the writer thread should be optional as we will want to be able to turn it on/off for debugging and benchmarking purposes.

@michael-okeefe michael-okeefe added enhancement New feature or request performance A task related to assessing/enhancing performance benchmarking Related to benchmarking performance labels Apr 18, 2024
@michael-okeefe michael-okeefe added this to the 2024 (Year End) milestone Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmarking Related to benchmarking performance enhancement New feature or request performance A task related to assessing/enhancing performance
Projects
None yet
Development

No branches or pull requests

1 participant