Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
Hi,
I've set up Obi solver to Use Burst, I have a TONE of work for it - the game is running at 1 FPS in editor, but when I go to Profiler, it shows fully occupied main thread with ObiFixedUpdater.FixedUpdate() while every Job.Worker thread is Idle
Have I made a mistake somewhere?
Posts: 6,346
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
17-06-2024, 07:46 AM
(This post was last modified: 17-06-2024, 07:46 AM by josemendez.)
Hi!
Burst and multithreading are completely orthogonal to each other: you can have Burst without multithreading, and multithreading without Burst (ideally you'd enable both, though).
Make sure multithreading is enabled: Jobs->Use Job Threads
kind regards,
Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
(17-06-2024, 07:46 AM)josemendez Wrote: Hi!
Burst and multithreading are completely orthogonal to each other: you can have Burst without multithreading, and multithreading without Burst (ideally you'd enable both, though).
Make sure multithreading is enabled: Jobs->Use Job Threads
kind regards,
I don't have that menu, what could be the reason?
Posts: 6,346
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
17-06-2024, 11:14 AM
(This post was last modified: 17-06-2024, 11:15 AM by josemendez.)
Have you installed the Jobs package?
Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
17-06-2024, 01:24 PM
(This post was last modified: 17-06-2024, 01:24 PM by cubrman.)
(17-06-2024, 11:14 AM)josemendez Wrote: Have you installed the Jobs package?
Yes I have, I saw your warning in Obi Solver and made sure I have EVERY plugin listed there. I installed jobs by name: com.unity.jobs
Posts: 6,346
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
17-06-2024, 02:02 PM
(This post was last modified: 17-06-2024, 02:02 PM by josemendez.)
(17-06-2024, 01:24 PM)cubrman Wrote: Yes I have, I saw your warning in Obi Solver and made sure I have EVERY plugin listed there. I installed jobs by name: com.unity.jobs
In some Unity versions these settings appear in the preferences menu:
Let me know whether this is your case, otherwise we will need to investigate further.
Kind regards,
Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
I'm affraid you need to investigate further. Tell me if you need me to do anything - I really need to get to the bottom of this.
Posts: 6,346
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
17-06-2024, 04:25 PM
(This post was last modified: 17-06-2024, 04:35 PM by josemendez.)
(17-06-2024, 03:56 PM)cubrman Wrote:
I'm affraid you need to investigate further. Tell me if you need me to do anything - I really need to get to the bottom of this.
So job threads are enabled but the threads aren’t getting any work? That’s really strange!
Please share a profiling session with us. In the profiler, there’s two buttons at the top right corner that allow you to export/import the data, profile your game for a few seconds and then export and send the data to support(at)virtualmethodstudio.com.
Also, could you describe your scene/setup? What does this “ton of work” you’re pushing look like?
Kind regards,
Posts: 63
Threads: 9
Joined: May 2018
Reputation:
0
(17-06-2024, 04:25 PM)josemendez Wrote: So job threads are enabled but the threads aren’t getting any work? That’s really strange!
Please share a profiling session with us. In the profiler, there’s two buttons at the top right corner that allow you to export/import the data, profile your game for a few seconds and then export and send the data to support(at)virtualmethodstudio.com.
Also, could you describe your scene/setup? What does this “ton of work” you’re pushing look like?
Kind regards,
Here is the debuger data:
https://drive.google.com/file/d/1SMVyghs...drive_link
And here is a link to the project for you to check. Let me know once you download the project and I will delete the link:
https://drive.google.com/file/d/1wK4SNm0...sp=sharing
Basically in the project there is around 6 copies of a 2k vertices model that "inflate" using your plugin. That's all really. This work is enough to make the game run at 1 FPS.
Posts: 6,346
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
18-06-2024, 01:34 PM
(This post was last modified: 18-06-2024, 06:47 PM by josemendez.)
(18-06-2024, 12:20 PM)cubrman Wrote: Here is the debuger data:
https://drive.google.com/file/d/1SMVyghs...drive_link
And here is a link to the project for you to check. Let me know once you download the project and I will delete the link:
https://drive.google.com/file/d/1wK4SNm0...sp=sharing
Basically in the project there is around 6 copies of a 2k vertices model that "inflate" using your plugin. That's all really. This work is enough to make the game run at 1 FPS.
Hi,
Your project isn't using Burst or multithreading at all as clearly stated by the warning in your ObiSolver component inspector (otherwise the warning wouldn’t appear). This is because the ObiSolver script file has been moved to Utilities/Obi/Scripts, outside of Obi's folder (located in Assets/Obi) and its assembly. Since packages check each other's assemblies to determine what's installed and what's not but the solver is not part of any assembly, it's not detecting any of the other installed packages.
As explained in the manual you should not take apart the asset's folder structure or modify its contents in any way, as this will break it:
http://obi.virtualmethodstudio.com/manua...setup.html
Quote:Once imported, you can find Obi installed in the /Assets/Obi folder. You may move the entire /Obi folder around, but you should not modify its contents.
The solution in your case is simply to delete Assets/Obi and Assets/Utilities/Obi and perform a fresh reinstall of the asset. Then if you want to move your Obi installation to another place in your project, do so as you would any other package: by moving the entire /Obi folder instead of some subfolders/files only.
Unrelated to this issue: in your scene's ObiSolver, relaxation is set to 0.1 (10%) on all constraint types but substeps are set to 4 and iterations to 2 or sometimes 3. This is a huge waste of resources as you're doing the same work a lot of times but only at 10% intensity each time. Set relaxation to 1 (100%) then reduce the amount of substeps/iterations as needed.
Let me know if you need further help,
kind regards
|