• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
2
Question by photonman170 · Jan 24, 2020 at 07:53 AM · graphicsprofilercpu usage

Semaphore Wait for signal accounts for 80% of total cpu usage.

alt text

As seen in the screenshot semaphore.WaitForSignal is costing up to 5.37 ms per frame. That is roughly 80% of my entire game's cpu usage.

Sometimes I will get random spikes of up to 400ms due to the same reason causing my game to stutter horribly.

It is a 3d game with no lighting. I'm using unlit shaders only. My biggest texture is 1536 x 1536 which I'm only mapping on a single object.

How can I reduce or eliminate this?

semaphore-wait-for-signal.png (144.5 kB)
Comment
Add comment · Show 18
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image photonman170 · Jan 27, 2020 at 10:13 AM 0
Share

In case somebody else is having trouble with the stuttering issue caused by the 400 ms spikes I fixed this issue by upgrading unity from version 2019.1 to 2019.2

avatar image onuralp20002 photonman170 · Apr 14, 2020 at 10:34 AM 0
Share

Which 2019.2 version did you upgrade to? Because there are many versions from 2019.2.0 to 2019.2.21.

avatar image photonman170 onuralp20002 · Apr 14, 2020 at 12:33 PM 0
Share

I'm currently using 2019.2.19 and haven't had the issue.

Show more comments
avatar image yudizArjun photonman170 · Jun 08, 2020 at 07:25 PM 0
Share

Hey @onuralp20002 , Did you try out 2019.2.19? Are you still facing the same issue?

avatar image onuralp20002 · Apr 14, 2020 at 02:33 PM 0
Share

I am using 2019.3.7f1 recently and I am having the same problem. I am creating a very simple android game and when I use GTX1050TI as my graphic card it gives about 150fps. But when I switch to a smaller graphic card, it is about 20fps and it is too less for a simple game like I am creating right now. I am dowloading 2020.10b5 right now which is in beta version. I hope that it will fix the problem. I am open to any suggestions. I will share if 2020 version fixed the problem or not. @photonman170

avatar image onuralp20002 onuralp20002 · Apr 15, 2020 at 05:52 AM 0
Share

2020 version did not help at all...

avatar image TastoAlpha_Yokota · Apr 28, 2020 at 07:36 AM 0
Share

I'm using 2019.3.11f1 and I'm experiencing similar issues. This dropout occurs only on Android devices and not on iOS. This may be an Android-specific glitch. If you have any countermeasures, please let me know.

avatar image UDN_6c8b8a3a-8d7a-436e-9ca9-a1bf7a57bf0c · May 10, 2020 at 03:49 AM 0
Share

I have the same question in 2019.2.15f1 and 2019.3.7f1. I am very unhappy.alt text

截屏2020-05-10上午114602.png (418.8 kB)
avatar image WILEz1975 · Jun 02, 2020 at 04:48 PM 0
Share

Same problem. It happens cyclically, regardless of what is displayed on the screen. On Windows, Build or Editor. Unity 2019.30f5

Show more comments

3 Replies

· Add your reply
  • Sort: 
avatar image
5

Answer by ArminRigo · Jan 24, 2020 at 09:23 AM

It just means the main thread is sleeping, waiting for a signal from another thread. It's not actually consuming CPU time. The render thread is working instead, and I guess that at some point this render thread signals the main thread when it is done.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Fahir · Oct 12, 2020 at 07:38 AM 0
Share

So that basically means that no matter how many ms it is saying that Semaphore.WaitForSignal takes it actually doesn't take that time at all? Even on a real device?

Because I have the same issue. I managed to get my draw calls down to 26, I am allocating a few bytes of gc alloc every few frames but the semaphore thing takes 27.17 ms out of $$anonymous$$e 48.18 total time

avatar image sj631 · Apr 19, 2021 at 09:55 AM 0
Share

https://docs.unity3d.com/2020.3/Documentation/Manual/profiler-markers.html

avatar image
1

Answer by sereschkin · Aug 31, 2021 at 10:13 PM

Just in case anyone is stumbling upon this issue in Sep. 2021 (Like I do, lol) and is sitting on a Mac: In my case I just switched to opengl, restarted IDE, switched back to Metal and restarted IDE again and now everything is so fast. Used Unity for months and never knew that this Editor can actually run fast.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image hawken · May 23 at 12:17 PM 0
Share

wow, everything is much faster now, thanks!

avatar image
0

Answer by DanjelRicci · Oct 12, 2020 at 09:39 AM

In my case I literally just had to close the Logcat tab. It was causing these spikes every few moments, but it only happened in the editor.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

223 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Minimizing spikes in Profiler? 0 Answers

CullScriptable CreateSharedRenderScene eats up CPU 0 Answers

Android Graphics.PresentAndSync 0 Answers

im bottlenecked by QuadTreeNode.Render... what is it? 2 Answers

GPU profiling time not adding up properly and GPU taking up lots of time 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges