Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 oyy · Nov 18, 2015 at 10:43 AM · profilerthreadingcpu usageheadless

Reduce CPU usage of Headless mode

I run a Headless Mode Server on Linux(debian) and doing nothing. It eats about 5% cpu time. I have three question about that.

If I change the "Fixed Timestep" to 1 will fix this problem. What's the bottleneck exactly?

And I found unity has create 28 background thread! How can I reduce that? I try to disable the sound. It reduce to 26...

How can I use profiler on headless mode?

Thank you.

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
0
Best Answer

Answer by MCoburn · Nov 18, 2015 at 11:12 AM

Unity3D has a lot of threads in the background to handle a lot of things. Don't ask why... It's just how the engine manages itself. 5% is acceptable, because unless your machine is old, it's really not going to make a dent in performance. If it was doing nothing and eating up around 80% of your CPU, you'd have to question what the heck was going on.

Headless may also use what's known as a virtual framebuffer, as in, rather than using Xorg to pipe the 3D content to your GPU, it's rendering to a memory buffer (which is being done on the CPU) and then being discarded.

I haven't played with Unity's headless mode myself, but I have a decent understanding of Linux knowledge. I'd be willing to bet it's either overhead from the engine, or the virtual framebuffer.

Comment
Add comment · Show 3 · 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 oyy · Nov 18, 2015 at 12:00 PM 0
Share

I'm using the Headless $$anonymous$$ode as game server. I want to run dozens of process instance in a single physics machine. In this circumstance the sum Idle CPU usage and thread number become a considerable big usage. (Actually I should run multi scene in one instance. But the design of UNET not allow me to do that...ft... )

avatar image MCoburn oyy · Nov 19, 2015 at 12:25 AM 0
Share

What are your machine's specs that you want to deploy the game server on?

A lot of professional game servers actually spawn one instance of the game per server, which is the case in the stand-alone servers of Battlefield and Call of Duty. The only issue there is you'll need to change the ports (maybe via a config file parsed at boot?) so you don't have two server instances trying to fight over the same port.

What you could do, is try disabling the $$anonymous$$ain Camera. It could be to blame, like it's rendering something that is pointless in headless mode. I'm not 100% sure about the "Fixed Timestep" setting so I can't suggest any chances there.

Failing that, it may be a case of having to live with it.

avatar image oyy MCoburn · Nov 19, 2015 at 04:31 AM 0
Share

Game server is amazon ec2. About 4 core maybe. $$anonymous$$y game is $$anonymous$$OBA-game like DOTA. One instance that only serve ten people take one machine is unacceptable... 5% cpu per instance will cost 100% by running 20 instance. Only 200 people one machine are still very bad and expensive...

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

ReaderWriterLock causing stutter (Move.Me server) 0 Answers

function calls for each frame in the scene 0 Answers

Is 24 ms too high of a CPU usage time for mobile devices? 0 Answers

Unity app consuming CPU resources in sleep mode on Android? 0 Answers

High CPU Usage on GFX.processcommands 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