Anbox memory use


#1

Hello gentlemen,
I am try to porting ubuntu and anbox to my device with ubuntu17.10, it is too snow to use when open serveral ubuntu and android apps. It looks that it occupy too much memory, below show the basic memory use I open ubuntu and open anbox.
Why it takes so much memory while it’s a minimal android. Is there additional memory use in anbox implement, and how do you think the memory usage improvement on anbox?

Thanks!

root@wangzj12-X91F:/home/wangzj12# sudo systemctl stop snap.anbox.container-manager.service
root@wangzj12-X91F:/home/wangzj12# free -h
total used free shared buff/cache available
Mem: 3.8G 639M 2.1G 306M 1.0G 2.6G
Swap: 2.0G 90M 1.9G
root@wangzj12-X91F:/home/wangzj12#
root@wangzj12-X91F:/home/wangzj12#
root@wangzj12-X91F:/home/wangzj12# free -h
total used free shared buff/cache available
Mem: 3.8G 968M 1.7G 367M 1.1G 2.2G
Swap: 2.0G 90M 1.9G
root@wangzj12-X91F:/home/wangzj12# sudo systemctl start snap.anbox.container-manager.service
root@wangzj12-X91F:/home/wangzj12# free -h
total used free shared buff/cache available
Mem: 3.8G 1.6G 106M 565M 2.1G 1.4G
Swap: 2.0G 90M 1.9G
root@wangzj12-X91F:/home/wangzj12#


#2

It’s hard to read something our of your numbers as just having the container-manager running doesn’t mean the Android container is up and running. Can you elaborate a bit more what you did for each free -h call and if the container is running or not.

The Android contianer roughly takes ~500-600MB of RAM. That is the usual amount Android needs. On top always come additional memory for any started applications. I don’t have any concrete plans to reduce the amount of memory inside the container drastically. The only thing we will work is reducing memory overhead on the session-manager which runs outside of the container if there is something.


#3

Hi,Morphis,
I insert the operation infomation I did around free -h.
The problem I pazzuled is that the memory usage seems not so much in my toplap, but it coccupy more on my mobile device with cherrytrail. The free -h logs is I checked on the mobile device.
So what should effect the memory anbox used excude from normal android use? Will ubuntu version different, CPU different, or platform different will effect memory lot. Where can I check for it.
PS:
normal: ubuntu 16.04 + normal i3 cpu.
problem: ubuntu 17.10 + cherrytrail

Thanks!

######## I closed all anbox application and stoped container, the check with free -h ######
root@wangzj12-X91F:/home/wangzj12# sudo systemctl stop snap.anbox.container-manager.service
root@wangzj12-X91F:/home/wangzj12# free -h
total used free shared buff/cache available
Mem: 3.8G 639M 2.1G 306M 1.0G 2.6G
Swap: 2.0G 90M 1.9G
####### I opened an web with foxfire browser in ubuntu space ########
root@wangzj12-X91F:/home/wangzj12# free -h
total used free shared buff/cache available
Mem: 3.8G 968M 1.7G 367M 1.1G 2.2G
Swap: 2.0G 90M 1.9G
####### I started the container-manager, and opened the launcher and webview with same url as in fireforx, then check with free -h ####
root@wangzj12-X91F:/home/wangzj12# sudo systemctl start snap.anbox.container-manager.service
root@wangzj12-X91F:/home/wangzj12# free -h
total used free shared buff/cache available
Mem: 3.8G 1.6G 106M 565M 2.1G 1.4G
Swap: 2.0G 90M 1.9G
root@wangzj12-X91F:/home/wangzj12#


#4

These number show and increase of ~600-700M when you start Anbox. That is quite usual. From which system are these numbers?