Obi Official Forum
Every Job.Worker thread is "Idle" - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Cloth (https://obi.virtualmethodstudio.com/forum/forum-2.html)
+--- Thread: Every Job.Worker thread is "Idle" (/thread-4257.html)

Pages: 1 2


Every Job.Worker thread is "Idle" - cubrman - 16-06-2024

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
[Image: 1.png]
Have I made a mistake somewhere?


RE: Every Job.Worker thread is "Idle" - josemendez - 17-06-2024

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
[Image: BrF10lg.png]

kind regards,


RE: Every Job.Worker thread is "Idle" - cubrman - 17-06-2024

(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
[Image: BrF10lg.png]

kind regards,


I don't have that menu, what could be the reason?
[Image: 1.png]


RE: Every Job.Worker thread is "Idle" - josemendez - 17-06-2024

Have you installed the Jobs package?


RE: Every Job.Worker thread is "Idle" - cubrman - 17-06-2024

(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


RE: Every Job.Worker thread is "Idle" - josemendez - 17-06-2024

(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:
[Image: screenshot-2022-11-05-191412-jpg.1146278]

Let me know whether this is your case, otherwise we will need to investigate further.

Kind regards,


RE: Every Job.Worker thread is "Idle" - cubrman - 17-06-2024

[Image: 1.png]

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.


RE: Every Job.Worker thread is "Idle" - josemendez - 17-06-2024

(17-06-2024, 03:56 PM)cubrman Wrote: [Image: 1.png]

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,


RE: Every Job.Worker thread is "Idle" - cubrman - 18-06-2024

(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/1SMVyghs2p4lLwntyDK_xBh_cUIvUNSUs/view?usp=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/1wK4SNm00Xw1lDUzRhSdvC_k-CZu422WY/view?usp=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.


RE: Every Job.Worker thread is "Idle" - josemendez - 18-06-2024

(18-06-2024, 12:20 PM)cubrman Wrote: Here is the debuger data:
https://drive.google.com/file/d/1SMVyghs2p4lLwntyDK_xBh_cUIvUNSUs/view?usp=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/1wK4SNm00Xw1lDUzRhSdvC_k-CZu422WY/view?usp=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/manual/6.3/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