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
1
Question by Kyrmaal · Jun 24, 2012 at 04:52 PM · optimizationprofilerram

Memory Usage Optimization and Profiler

Hi !

My problem is simple (I think). When I build and play the game I'm working on, I see a RAM usage of nearly 2.2GB. But when I'm in editor and use the Profiler (with or without Deep Profile), it announces me a memory usage of 1.1GB. Why this difference ? And what could I do to minimize the RAM usage ?

Thanks !

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 Wolfram · Jun 24, 2012 at 11:11 PM 0
Share

Are you creating a 64bit build?

avatar image Kyrmaal · Jun 25, 2012 at 08:03 AM 0
Share

Nope, a 32bit one. Currently the players on a 64bit Windows play the game without problems, but the RA$$anonymous$$ usage makes most 32bit players crash ...

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Mizuho · Jun 25, 2012 at 08:30 AM

Do you unload any assets that aren't currently being used? Do you have way too many things loaded at once? Could you use more culling? Graphics optimization? General optimization? Texture compressions?

Comment
Add comment · Show 5 · 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 Kyrmaal · Jun 25, 2012 at 08:32 AM 0
Share

We're unloading assets every time we can. We compressed all our textures massively, but we don't see any difference in RA$$anonymous$$ usage. I'll give a look at culling, thanks ! But still, I can't understand why the Profiler indicates half the RA$$anonymous$$ we're using. Even when I build and use the profiler with a build (with Autoconnect profiler), I always see half the memory Windows indicates.

avatar image Mizuho · Jun 25, 2012 at 08:34 AM 0
Share

Here's another question that may help: http://answers.unity3d.com/questions/19199/are-there-any-known-memory-leaks-in-unity3d-or-mon.html.

avatar image Kyrmaal · Jun 25, 2012 at 08:55 AM 0
Share

One of the few things I know is that it isn't a "leak" : we are using a huge amount of RA$$anonymous$$, but it stays stable (~800$$anonymous$$B in menus, ~2GB in game).

avatar image Mizuho · Jun 25, 2012 at 08:59 AM 0
Share

Could it be because of the resolution? Here's another link: http://www.unitymagic.com/shop/en/occlussion-culling-tutorial/.

avatar image Kyrmaal · Jun 25, 2012 at 10:04 AM 0
Share

I don't see any influence of the resolution on RA$$anonymous$$ usage.

avatar image
0

Answer by Wolfram · Jun 25, 2012 at 10:49 AM

Seems to me that's not a problem with the build, but rather a problem that the Profiler does not register the total amount of used memory (correctly).

For example, I just tried that allocating several 100 MB worth of float arrays in both Editor or build make the process grow exactly the expected size. However, the Profiler stays constantly at 51MB and does not grow at all. So maybe it collects data only from Unity objects, or Unity serialized objects, or something like that. Although, the docs do claim "Note that in the Unity Editor this is memory used by everything in the editor; game builds will use much less."...

Can you estimate the amount of memory your data should consume? What kind of data is it, Unity objects, standard C# objects, Terrain data, ...?

When starting from a freshly starting editor and running your app that supposedly uses 1.1GB, what's the process size of the Editor? It should be somewhere around 2.4-2.5GB (2.2GB "true" process size plus Editor overhead).

If this is correct, 2.2GB is the true memory usage of your process, then the Profiler is wrong/incomplete.

One thing you could do to check/optimize the amount of data integrated into your build (i.e., disk space, as opposed/only remotely related to execution size) is to check the Editor log right after a build. Somewhere near the end you will find a long, size-sorted list of Assets that were integrated in your build. Check the sizes+names of the largest ones.

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

6 People are following this question.

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

Related Questions

How do I get my game to run faster? 4 Answers

Am I leaking Mesh components or does Unity Cache Meshes between scenes? 1 Answer

Odd picks in profiler with simple scene in unity 0 Answers

Profiler shows Object.ElementAddr_3_8() called over a million times. What is it? How do I reduce this? 1 Answer

EditorOverhead High CPU Usage in Unity Profiler 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