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 JimmyCushnie · Apr 09, 2018 at 05:07 AM · memoryprofilerlinuxmemory usagelinux editor

How come memory usage is so high on Linux, and the profiler lies about it?

On Windows, my game uses about 200MB on the title screen. On Linux, it uses about a gigabyte for me, and my Linux players have reported everywhere from the regular 200MB through 1.5GB. I made a debug Linux build of the game and connected it to the profiler in an attempt to see where all the memory was. The profiler claims that only 200MB are used, but my system monitor shows that it's actually a gigabyte.alt text

Why the discrepancy? Why does Linux eat so much more memory? I'm sorry if this is obvious, I have not used or developed for Linux very much.

Comment
Add comment · Show 2
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 internationalfish · Apr 09, 2018 at 06:10 AM 0
Share

I couldn't tell you whether there are actually significant memory usage differences with Unity builds in Linux, but I can tell you that memory reporting in nix is often misleading. The system tends to hold on to memory even when it's not being used, then opportunistically free it when it's needed elsewhere... I don't know whether this could be what's going on here, so I'm leaving this as a comment for your reference rather than an answer.

avatar image JimmyCushnie · Apr 09, 2018 at 04:40 PM 0
Share

Thanks, I didn't know about that. I used the ter$$anonymous$$al to do more detailed diagnostics on memory usage, and it confirmed that the RA$$anonymous$$ is being used by my game, not the disk caching system.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by hodler · Oct 28, 2019 at 02:23 PM

I'm experiencing the same problem with a headless linux server. When i start up the server the memory usage shown in the system monitor is roughly the same as the unity memory profiler. Once some users connect to the server the memor iusage goes up. the server seems to be garbage collecting and the memory usage in the profiler drops once in a while so the memory stays pretty constant over time. The system memory however keeps growing continuously and never drops even after the clients disconnect. The discrepancy grows everytime new users connect and disconnect.

I cannot deploy the server like this, since it is destined to crash after a couple of hours due to system memory reaching full capacity.

Has anyone else experienced the problem and was able to solve it? Since the memory profilere tells me everything is fine i am not able to track down the cause of this.

Edit: Also the problem doesn't exist on a windows headless build, only on linux

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

84 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

Related Questions

Understanding Profiler: Profiler Memory Shows GC Allocation but Overview does not 1 Answer

TEXTURE has wrong size in memory 1 Answer

Total memory allocated increases indefinately from .80GB untill crash 3 Answers

what Memory Usage difference between Unity Profiler and procrank 0 Answers

Modo memory use increases steadily 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