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
4
Question by CHPedersen · Jan 28, 2014 at 02:35 PM · profilervsync

Significant Device.Present with VSync turned off

I'm having some trouble understanding how to effectively turn off VSync in Unity and/or my machine. I did this, of course:

No VSync in Unity

Then, realizing that VSync could also be forced upon applications by the graphics card drivers, I went to the config software for my video card, too. It's one of those integrated Intel Graphics processors built into the Core i7, an HD Graphics 4000, to be precise. Going to its Control Panel, I found this under the 3D settings and changed it from "On" to "Use Application Settings":

No VSync in HD Graphics Control Panel

With these settings, I'm expecting it to obey Unity's request for not syncing, and I would expect it to just race ahead and blast frames at me, with no concern for screen tearing. Yet, when I run an external build against the profiler, I'm seeing this:

VSync still on

Notice the huge amount of time spent on Device.Present in the GPU profiler. This is usually the "wait for vsync"-task. Why is that still on? Are there other places to disable it I just haven't looked?

It's worth noting that it's only on under certain conditions. If I start up an empty scene, it works as expected, and the task is < 1ms. I just don't understand why, under some workloads, it suddenly kicks in, even when disabled in both Unity and driver software? And when it does kick in, why 33ms? Along with the ~8ms from the other, actual GPU tasks, that lands the GPU at ~41 ms. What does that accomplish? That doesn't correspond to any syncing frequency. It's certainly not waiting for the CPU, either. The sum of all CPU tasks is giving me <5ms.

I'm on Windows 7, and I even considered that it could be forcing VSync at the OS level to support its 3D accelerated Aero interface. But disabling that and running the Windows Basic profile does nothing for this issue. I'm out of ideas. O_O Anybody know what exactly this is, and if it's VSync, why does it seem to aim for something that isn't an integer division of 60 FPS?

hdgraphicsnovsync.png (64.6 kB)
unitynovsync.png (6.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

1 Reply

· Add your reply
  • Sort: 
avatar image
14
Best Answer

Answer by CHPedersen · Jan 28, 2014 at 03:59 PM

Interestingly, and a little surprisingly, this turned out to be the profiler itself. O_O

After speaking to ToreTank in Unity3D's IRC channel, I did some alternative performance testing using a simple GUI.Label with the FPS (1 / Time.deltaTime) instead of using the profiler to measure performance. Then I ran the external build many more times in multiple configurations, in Windowed mode and Full Screen, using both standard builds and Developement Builds, using both VSync Count = Every VBlank and Don't Sync, and the app's behavior started completely corresponding to expectations. With VSync Count = Don't Sync, the FPS was approximately 125 in the same scene, completely as expected from a GPU load of approximately 8ms.

It appears measuring and sending data to the profiler is such a burden that it cripples the application and causes a much heavier Device.Present than you'd expect from disabling VSync. This appears especially true for scenes with a high number of objects and many scripts, since such a setup will generate a complex object hierarchy for the profiler to display and update. That's why it kicked in when rendering the more complex scenes.

Lesson learned: Use profiler to pinpoint troublesome objects and code, but never for measuring the raw FPS.

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

19 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

Related Questions

Profiler Graph values and Overview values dont match! 0 Answers

WaitForTargetFPS - vSync and target fps off 0 Answers

High GPU Usage 2 Answers

Huge "Device.Present" performance hit in profiler 0 Answers

Vsync causing fps drop and erratic fps. Any ideas are welcome. 1 Answer


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