RAM Size - Swapping?
-
Hello again,
some time ago I reported about
the laggy performance of my Volla Phone 22.
Today I compared the output of free -h of my Volla Phone 22 and a Volla Phone X which both are supposed to have 4GB of RAM.
Both are on 24.04-1.0 stable.Volla Phone 22 output:
total used free shared buff/cache available Mem: 3,3Gi 2,4Gi 254Mi 54Mi 707Mi 941Mi Swap: 1,8Gi 103Mi 1,7GiVolla Phone X output:
total used free shared buff/cache available Mem: 3,7Gi 2,5Gi 158Mi 51Mi 1,1Gi 1,2Gi Swap: 0B 0B 0BBoth Phones are running the same apps (Terminal, Launcher Modular and Morph (same number of tabs)).
I am ok with 3,7 GB of RAM of the Volla Phone X, I suppose that's within tolerable range. But why is my Volla Phone 22 missing 700MB of RAM?
Is that why it's swapping? And is that why it performs laggy?Maybe other Volla Phone 22 owners could verify their RAM for comparison here?
-
if you want to see all your memory use lsmem.
The ugly truth is that the firmware and the system (the linux kernel) are taking memory from the physical amount ot memory that is in your device. the 'free' utility is giving you the amout usable by the applications you run. That's not specific to your phone or even Ubuntu Touch, it's the same for all Linux systems, these 2 utitilites always return free < lsmem. -
@gpatel-fr I can't use lsmem since the folder it aims to (/sys/devices/system/memory) does not exist. Maybe I overlook something.
I thought, that 'total' of 'free' shows the correct amount of physical ram.
However, the result is noticably different and the VP22 should probably perform better... -
@jojumaxx said in RAM Size - Swapping?:
Maybe other Volla Phone 22 owners could verify their RAM for comparison here?
My VollaPhone22
phablet@ubuntu-phablet:~$ free -h total used free shared buff/cache available Mem: 3,3Gi 2,6Gi 144Mi 46Mi 730Mi 791Mi Swap: 1,8Gi 1,1Gi 712Mi phablet@ubuntu-phablet:~$ swapon NAME TYPE SIZE USED PRIO /dev/block/zram0 partition 1,8G 1,1G -2 -
@jojumaxx said in RAM Size - Swapping?:
the folder it aims to (/sys/devices/system/memory) does not exist. Maybe I overlook something
well, it works on my machine

it seems that Volla is using a kernel compiled without the CONFIG_MEMORY_HOTPLUG option (for curious people it can be seen in the /proc/config.gz file).
Makes sense this option is not very useful for a phone, but it's compiled in the Fairphone 5 kernel and it allows for lsmem to work. Short of that I don't know of an option to get the real physical memory.@jojumaxx said in RAM Size - Swapping?:
the VP22 should probably perform better...
On my desktop I put 2 sticks of 8 GB ram on the motherboard and free report 15Gi. On another desktop I put 1 stick of 8 GB and free report 7.5 Gi. On my FP5 I ordered with 8 GB free report 7.1 Gi, so the Volla values are not special IMO. The system is using memory, nowadays systems are complex and need more memory.
-
err, I just remembered that I did not reply fully to your question
Re: difference of 400Mb between 22 and X: it may be a difference in the compilation of the 2 kernels, or the Halium part (the X is Halium 10, the 22 is Halium 11) could be bigger... As Volla is delivering the OS they may be of help in replying to this question (unless you flashed it yourself with the UBPorts installer, in this case you are at the right place to ask)
Re: 'laggyness'
since your real problem is that you feel that your device is slow.
About the swap: I have quite some experience with Linux and I have never felt a real slowness when swap is at a reduced level like in your case 10% of use or less.
It's difficult to guess of course since I don't have a real-time display of the swap splashed on my screen.
When I have ever felt slowness, I usually check the swap and when it's at over 50% I'm sure that's the culprit.You see, swap don't decrease naturally by itself. When a program needs a lot of memory, some swap may be allocated, then the program frees the memory, but the system will not naturally decrease the swap. Things are very complicated under the hood. So you can have a bit of swap allocated and everything is all right really. But when swap goes over 50%, it's really frequent that you have a badly programmed software running amok, and unless it is stopped it will go on and eat all swap and then it's time for the big red button.
So the little swap you show us here may be a symptom of something significant, or it may not.
My advice: if you use heavily your phone for Internet browsing and you use Morph as packaged in the OS, stop it. It has an old code base that could badly interact with the current state of the Web. Recommended alternatives: anything else really; the QT6 preview of Morph, Firefox, Librewolf, Min by PParent (I tried it briefly this morning and did not see anything wrong with it, don't know if the name should carry an expectation it's really less resource hungry than the previously cited alternatives browsers).
Give a try to these alternatives and if one really consumes less memory and feel faster, don't hesitate to report ! You are not the only one with limited memory, even I have only 8 (err 7.1) Giga !
I can't stress enough how modern browsers are gigantic and complicated pieces of software and as eating too much memory is a common problem, and can be a cause for excess swapping. If your slowness is perceived only in browsing, even without eating too much memory an old browser can be slow because it don't understand new features of the current web.