Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 /
avatar image
0
Question by Vince613 · May 04, 2015 at 05:29 AM · vsync

WaitForTargetFps using high cpu

Hi, I am new to Unity. I am trying to write a simple benchmarking application.

Right now, all I am doing is rendering a single Quad (2 triangles) to the screen. I have no Update() methods defined right now and have not explicitly set Application.targetFrameRate or QualitySettings.vSyncCount to anything.

What I am experiencing is WaitForTargetFps using up so much of my CPU that it causes my framerates to drop (or so it seems). My app by default is running at ~38fps and using 28ms of CPU and GPU time.

I understand that the WaitForTargetFps is sort of like a wait loop until Vsync is fired, but based on this data I collected below where I set the vSyncCount to various values, something doesn't make sense to me.

 vSyncCount  FPS  CpuTime(main thread)  CpuTime(render thread)   GpuTime
    0         93           10.7ms               0.1ms             10.7ms
    1         38           26.0ms               0.2ms             26.0ms
    2         17           58.7ms               0.2ms             58.7ms


How is it I can't run at 30fps cleanly when I have the vSyncCount set to 2 when I'm able to run at 93fps when I have the vSyncCount turned off? I understand the timing of things can cause problems, and I could understand that as an excuse for not meeting the 60fps target when vSyncCount is set to 1, but I can't explain the 30fps one.

Also, when vSyncCount is set to 0, I still see 95% of my CPU time spen in the WaitForTargetFPS method. What's this about?

alt text

Thanks in advance for any help.

EDIT Not sure what I did, but I messed with the targetFrameRate value a bit, and now when I set vSyncCount to 0 (targetFrameRate is commented out) I am getting updwards of 700 fps. This all feels like there is some other workings at play that I don't understand.

capture.png (104.0 kB)
Comment
Add comment
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

0 Replies

· Add your reply
  • Sort: 

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

2 People are following this question.

avatar image avatar image

Related Questions

Significant Device.Present with VSync turned off 1 Answer

Jitter on Windows 10 Fullscreen Build 1 Answer

Frame Rate acting weird. Performance issue? Mobile 2d game 0 Answers

sprite moves jerky no matter on frame rate 2 Answers

Refreshrates and vsyncCount, what code should be applied? 0 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