Comments (6)
Hello, sure, I will try to help you.
We are also using the api28
image and emulator_api_28_x86
branch in our Kubernetes cluster.
First of all, I might tell you that expectation of 3GBs of RAM is an incorrect one - 3GB is a RAM in that is emulated in the device.
But this docker image also provides other types of memory to the qemu (such as cache, etc.), so in my experience, it starts with usage of 4Gb and goes up to 9-10 Gb.
Well, we don't run it anywhere except for Kubernetes, so I can't give you a different example. We are using snapshot versions of a docker image (Makefile creates both). And in our experience start of emulator really takes 30-60 seconds, that's why they are spawned only 2 times a day in our cluster and run 12 hours.
from docker-emulator-android.
There is an option to startup using the snapshot to speed up the init process but keep in mind that a lot of emulator options will no be changeable this way, for example, the serial number of the device. Each time you change these - you'll have to recreate another docker image for the emulator. From the maintenance perspective, this will be a nightmare, but it might be an acceptable trade-off in some use-cases.
from docker-emulator-android.
Thank you for such a quick reply.
I did not notice the option with snapshot images right away (it was not mentioned in the readme), tried it and it is much better now. But I also noticed that when creating a snapshot, adb
is renamed, so the only option is to adb connect
to exposed 5555
port. Are there any other options?
What about CPU usage per emulator? Config in api-28
set to 2. Is it worth limiting the resources of a container to 2 or 2.5 CPU?
But even with a snapshot, I'm still facing "System UI isn't responding" error especially when I run several containers at once (5+) on one instance(32 cores, 120Gb memory).
from docker-emulator-android.
This is intentional behavior as for the adb: the reason is that by default the emulator will connect to a local instance of adb server and you will not be able to connect to it externally. Even if you might succeed you will have the problem of two adb servers "fighting" so to say for control over that device. The only viable way to disable this was to rename the adb binary.
The performance of emulator depends highly on each specific environment. It is especially slow if you're using nested virtualisation which usually happens on public cloud providers such as AWS/etc. Are you running the container on actual hardware or you're using some kind of virtualisation there?
from docker-emulator-android.
This is intentional behavior as for the adb: the reason is that by default the emulator will connect to a local instance of adb server and you will not be able to connect to it externally.
Got it. So if I just want to connect all running emulators to local adb
on same machine (or host network) I can comment line with renaming.
Are you running the container on actual hardware or you're using some kind of virtualisation there?
Thanks. Yes, I'm trying to use nested virtualization instances on Google Cloud for now, but it seems that despite the hardware I choose, performance is fine only if there are just a couple of simulators per machine running. I will try to run this on "real" hardware then.
from docker-emulator-android.
Thank you again for your advice. The problem has been solved. Using "metal" instance - significantly improves performance when running multiple emulators within a single host.
from docker-emulator-android.
Related Issues (15)
- Doesn't save state between restarts
- Could not build android-28 HOT 5
- Make error HOT 2
- Cannot build android-28
- Could you release a ARM version? HOT 3
- PRs should pass at least 1 peer review
- adb_usb.ini is no longer used by adb
- After restart container emulator not worked
- Having trouble pulling image HOT 2
- Cloud provider HOT 3
- emulator won't start due to using qemu_i386 HOT 3
- How to connect with OpenSTF? HOT 2
- "make build" error HOT 1
- Make cannot accept a license HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-emulator-android.