Why does the iPhone need so much less RAM than Android devices?

Unified notification push
In mainland China, 4G memory iPhone can beat 12G memory Android. why? Because in its 12G memory, a large part is left to APP for constantly lurking in the background.
iPhone has enough confidence to run iOS with only small memory. The need to run memory at the beginning of iOS was not as big as the Android phone.
The iPhone's notification push is "system-level", independent of APP, is the communication between the device and the Apple server, not just the peer-to-peer between the device and the service provider.
For example, Facebook's server send a message to Apple's corresponding server, and it then "transfer" to your device. When you receive the notification, open the app and start receiving data from the FB server. Although it is the same as the notification you saw before, but it comes through two different channels.
iOS can't launch a lot of background Apps at the same time, but can still receive pushes stably and quickly. Why? Just because it simplifies the communication process of the device itself, it only needs one port to communicate with Apple's own server, instead of the different ports of each application like Android, so the iPhone can be completed with small memory.
Android's push method is more like "computer system." Each APP that needs to be pushed in the background has its own separate background process to communicate with its own server to exchange data.
(Similar to Apple Push Notification service, Android also has Google Cloud Message, but it is blocked by mainland China.)
This is actually a technical matter involving the design principles of both iOS and Android operating systems.
This problem is more obvious in mainland China. In mainland China, we add more memory to the Android phone because we couldn't connect to the Google server.
  • In the "Huawei P30" sold worldwide, the 128G hard drive model is only equipped with 4G or 6G RAM;
  • while the Chinese version of the P30, 64G hard drive model is equipped with 8G RAM!
In mainland China, you can hardly find an Android machine with 128G hard drive and 4G memory, but at least 8G. At first glance, it seems that the Chinese got a bargain deal? In fact, this is a helpless move of the domestic Android ecosystem in mainland China.
In Android, every APP must leave some threads in the background (that is, RAM), ready to receive incoming information. In other words, when you just turned on your phone and haven't started using them yet, some of the threads on all the apps on your phone have been quietly launched and put into memory.
These background-initiated threads cannot be closed because they are "legal". If they are closed, the user will not receive the message in time. In addition, do not underestimate the number of these background threads, an APP in the background to take a dozen or twenty MB is really not much, but 100 APP (64G hard drive mobile phone can hold 100 APP) add up to eat nearly 2G Memory!
Why do Chinese Android machines have large RAM? To give an example, we often use WeChat app: First, after you open the WeChat login account, the WeChat app on your mobile phone will maintain a "long-term connection" with Tencent's server.
When you send a message to your friend, this message is not sent directly from your mobile phone to his mobile phone, but your mobile phone sends the message to Tencent's server, then Tencent's server sends it to your friend.
Here is a problem. If the WeChat app on her mobile phone is turned off, even if the Tencent server sends the message, she will not receive it because the WeChat app on her mobile phone has been completely closed, which disconnected from the Tencent server.
Only when she opens WeChat again, its connection is restored and she can receive the message. If you want to receive the message in time, then the WeChat app shouldn't be completely closed. It needs to leave some threads, keep running in the background, and keep connected with Tencent's server, so that once the message is received, the system can promptly launch the "notification push mechanism" to remind you.
Therefore, the memory capacity of the Android machine must be increased with the capacity of the hard disk. The larger the hard disk capacity, the more APPs can be installed, and the more memory is needed to ensure that the threads left by the APP in the background operate normally.

Let's talk about iOS, why doesn't it need big memory? Because Apple has its own server. This system of iOS must be paired with "Apple's Server" to run properly. Whenever an iOS device is connected to the Internet, the iOS system first establishes a Keep-Alive with Apple's server.
On iOS, if WeChat is open, then the logic is the same as the above Android, the difference is reflected after WeChat is close.
If the WeChat app on your iPhone is closed, it will be disconnected from Tencent's server:
  1. Your friend sent a message to you, this message was first sent to Tencent's server.
  2. Tencent server found that "WeChat APP on your mobile phone does not establish a connection with the server",
  3. then it will turn this message to Apple's server.
  4. Then Apple's server will send it to your iOS system after receiving it, and the system will be able to make a notice in time.
It actually has only one extra step, but the benefit is that "WeChat app on your phone can be completely closed", there is no need to leave extra threads to receive messages, because Apple's server will always "keep receiving messages" and send the message to iOS, and then push notifications to you.
In this way, the memory of iPhone does not need to be increased along with the increase of hard disk capacity, because even if the APP is completely closed, it does not affect the timely reception of notification. In addition, the iOS does not actually support "real sense of background running". In the background, it only supports a limited kind of operations such as listening to songs, downloading, and navigation.
If an APP enters the background and has not been transferred to the foreground within 10 minutes, the system will close it, leaving only "a screenshot before its death". This is the so-called "tombstone mechanism." Therefore, most of the iPhone's memory is only for this current APP service, so that an APP uses 4G memory, it is really "more than enough".
Note: Why do we all say that iPhone phone is secure and privacy-oriented?
  • For the same reason, if the APP on the iPhone is closed, it is true that all threads are really closed.
  • But for Android, because every APP must "leave some threads in the background has been running", some unscrupulous APP or even mobile phone manufacturers, not only will leave the thread to receive messages, but also leave a thread to sneak open the camera or microphone to collect user data. These background threads, because they are "system code level things", users are not likely to close them.
If your Android phone can use Google's Serve, then you don't need such a large amount of memory. Because of the use of Google's server, its "notification Pushing Mechanism" has become the same as iOS, there is no need to have the APP's own thread left in the background, Google's server will help the APPs to receive information.
But because GFW, Android users in mainland China can not connect to "Google's server", then, to let Apps receive message in time, developers can only use the method that "constantly lurking and working in the background". For let the APP thread stay in the background, need a lot of memory support, then the Android machine has to increase memory. So, who will pay for these extra memory? The wool still comes from the sheep's back. Of course, their users, or consumers have paid. This is the most miserable part of Android users in mainland China. They not only have to endure the disclosure of privacy, but also pay for such price.
At present, "APPs stay in the background" has already foul the entire "Android Ecology" in mainland China pandemonium and messy. Every big manufacturer is thinking about its own solution:
  • For example, Xiaomi launched its own push service.
  • Huawei also has its own push service.
  • ...
But they all have little effect.
No developer would like to cooperate with them
  1. The developer needs to adapt different type, manufacturer by manufacturer, which increases the development cost and maintenance cost.
  2. APP developers are not willing to give up the benefits brought by "app resident background".
Let me know what's in your minds after reading this post.
Previous
Next Post »

Popular Posts