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

Adding MacOS support #135

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from
Draft

Adding MacOS support #135

wants to merge 18 commits into from

Conversation

zhengc84
Copy link
Collaborator

@zhengc84 zhengc84 commented Feb 21, 2025

Adding MacOS compatibility to run geoscenario server. MacOS defaults to "spawn" multiprocessing which pickles objects, but this causes an issue as some objects built by boost cannot be pickled. An alternative solution of using "fork" as well as threading to run the SDV, traffic, as well as Dash is implemented.

The features of basic geoscenarioserver should run the same, producing same test results. The UI should also look identical.

The setup for MacOS will be different from normal geoscenarioserver.

how will MacOS compatibility work with Geoscenario-orchestrator-prod?

mantkiew

This comment was marked as resolved.

@mantkiew
Copy link
Collaborator

mantkiew commented Feb 27, 2025

I have cleaned up and minimized the changes by removing everything that's not needed or accidental.

Here's the design:

  1. GSServer runs traffic in a separate thread
  2. SDVPlanners run in separate processes just as before but forcing the "fork" method (fork is default on Linux, so no change, but it overrides the default "spawn" on MacOs).
  3. GSServer runs dashboard in it's own (main) thread

However, the performance is worse than on master. Good test is test_scenarios/gs_ringroad_stress_loop.osm.
In that scenario, on master, we see consistent dash rate 0.025 as configured and
image
On this branch we see very inconsistent dash rate jumping to very high values and
image

As you can see, on this branch the single process (dash and traffic threads) saturates the CPU (130% utilization), whereas, on master the load is spread over two processes: one 50% and one 80%.

Copy link
Collaborator

@mantkiew mantkiew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot merge this as the run-time performance is not good. But it's a good experiment. Let's keep it for now unmerged.

@mantkiew mantkiew marked this pull request as draft March 3, 2025 17:02
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