I ran my app on my Macbook Air and my Iphone 6s and the below image is the memory usage profile after I go through all the UI in my apps. In the two scenario, I have performed similar tasks and duration. Why is the simulator memory usage so much higher than the actual device. Should I be concerned even though the device memory usage seems to be reasonable?
Everything is working fine, except for simulator which is reportedly using 5 GB of memory. This is waay more than on my intel mac that used 900mb to run.
Early Android devices had a per-app cap of 16MB. Later this cap increased to 24MB or 32MB.
Good Question.I appreciate you for asking this kind of question.
Apple Documentation says
Simulator is a useful tool, but it should not be the only way you test an app. Because the simulator is an app running on a Mac, it has access to the computer’s resources, including the CPU, memory, and network connection. All of these resources are likely to be faster than those found on a mobile device. As a result, the simulator is not an accurate test of an app’s performance, memory usage, and networking speed. For this same reason, always test the performance of your app’s user interface on a device. In Simulator, your app’s user interface may appear to run both faster and smoother than on a device
Xcode’s iOS simulator reports 2GB RAM for iPhone 6S, 4GB for iPad Pro
Xcode's iOS simulator shows 2GB of RAM for iPhone 6s and 6s Plus, 4GB for iPad Pro
Finally the solution from discussion is
Why the iPhone Simulator is Awesome
I found the exact solution from jbat100's answer.
Rendering performance of OpenGL ES in Simulator has no relation to the performance of OpenGL ES on an actual device. Simulator provides an optimized software rasterizer that takes advantage of the vector processing capabilities of your Macintosh computer. As a result, your OpenGL ES code may run faster or slower in iOS simulator (depending on your computer and what you are drawing) than on an actual device. Always profile and optimize your drawing code on a real device and never assume that Simulator reflects real-world performance.
Iphone Simulator - Allocates way too much memory and runs slow compared to device
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With