[android-developers] Re: Emulator on Linux 10 times slower than on Windows
Hi, I have been tracking this thread because I too have this problem. I'm using an Ubuntu 9.4 twin Athlon 1.6 CPU. with 1GB RAM. I'm using the Linux x86 build, so this may be part of the issue? If I were to build it myself perhaps the problem would go away? It takes at least 3 minutes to start the emulator. To run an Android app from Eclipse on the emulator takes about the same. It is much too slow. There is something wrong. I suspect some kind of busy/wait issue or other timeout issue. There seems to be very little churn on this topic, so I can only assume it is not biting everyone. Several of my work colleagues noticed the same thing on their Ubuntu systems at home. At work we use Mac's and everything is ok. A little sluggish, but acceptable. I have an answer for David Turner: using the -no-audio flag doesn't change anything! I suspect that some AVD parameter or whatever is set too low. Does the emulator have enough stack etc to run in on Linux? Is the cpu-delay somehow being set to some unwanted default? On Dec 8, 2:00 pm, David Turner di...@android.com wrote: This should definitely not happen. On the same hardware, the emulator running on Linux should be slightly faster than on Windows (due to the way QEMU implements its internal event loop and other technical details). Does starting with the -no-audio flag changes anything ? Another thing, can you start with the following: emulator -logcat '*:v' This will dump the logcat output (without adb being needed), and might show some problem in the emulated system. Another altenate option is '-shell' which will give you a root shell (that doesn't require adb), where you can run 'ps' and 'top' to understand what happens. Careful that 'Control-C' will close the emulator immediately though. On Sat, Dec 5, 2009 at 4:14 AM, brian.schim...@googlemail.com brian.schim...@googlemail.com wrote: Hi there, I know that many people are complaining about slow emulator performance, and mostly it can't be helped because of slow hardware and the fact that emulators somehow have to be slow by definition because of the way they work. But something really puzzles me: I'm using a dual boot configuration with Windows XP and Ubuntu 9.04. On XP, the emualtor is somehow slower than a real G1 device, but it's completely ok. But on Ubuntu, the emulator is unusable slow. Note that other programs run just fine under my ubuntu. I have no exact measurements, but I think the emulator about 10 times slower than on Windows. Installing a small app takes more than 2 minutes, starting an app sometimes takes over 2 minutes, returning to the home screen takes up to 40 seconds, and there is not a single click I can do that takes less than 2 seconds to trigger some kind of reaction. I get around 2 fps at most, no matter what I do. Both systems (of course) use the same hardware, and on both I'm using SDK 1.6 with a 1.5 AVD without google additions, and the very same app that I'm developing. I used to have a very old Graphics card that I had to access through plain old VESA drivers on both XP and Ubuntu. Now I'm on a new hardware which uses a proper driver to access the graphics hardware, but the emulator on Ubuntu is still as slow as before, so I think this is not the bottleneck. Also, I noticed that under heavy usage of the emulator, the usage of my real CPU never went above 30%. Is there any explanation for this slowness on Ubuntu? Or even a way to further investigate where the bottleneck might be? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Emulator on Linux 10 times slower than on Windows
@Michael MacDonald: Seems like a good advice, but i my case didn't help neither. @arnouf: - I'm not sure what you mean by using the good environment x86 / 64. I tested this on x86 hardware and on x64 hardware, but always with a 32 Bit Linux. Is seems as if the host processor bits have no impact on the speed of emulation. - I don't think that my speed issues are somehow related to the JDK I'm using. The most simple test for speed goes like this: Start the host computer, start a clean emulator from a terminal, wait for the boot process to finish, and slide the drawer on the homescreen several times. This does not involve any code compiled by me, but already shows great differences in performance. Those host hardware configurations that are slow on sliding the drawer are also slow on anything else related to the emulator. @all: It seems as if my adb is crashing/hanging rather often, on all hardware systems I'm using. I'm going investigate this a little bit more. Thank you all for your advices and help. Brian On 7 Dez., 17:56, arnouf arnaud.far...@gmail.com wrote: I had this problem with Ubuntu 8.10, two things : - check that you're using the good environment x86 / 64 - use preferly the SUN JDK 1.6 to compile Android development (you can use the JDK 1.5 to work with sources). Today I'm using a bipro intel, 4Gb, Ubuntu 9.10 and SUN JDK 1.5.0.20 and performance are really good. BR On Dec 7, 5:49 pm, Michael MacDonald googlec...@antlersoft.com wrote: I've had bad Linux/hardware interactions with the emulator from audio. The emulator AFAIK uses the SDL audio libraries. Try starting the emulator from the command line with the -noaudio flag and see if that works better. brian.schim...@googlemail.com wrote: To answer your questions: I was using Ubuntu two different hardware setups, both had 2 GB Ram installed, about 75% of which was free. See below for an output of free. As far as I can tell (that is, as far as java -version tells me), I'm using Sun's Java: java version 1.6.0_16 Java(TM) SE Runtime Environment (build 1.6.0_16-b01) Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing) But I think this wouldn't matter anyway, because the Android Emulator is based on Quemu which is native software, not Java. Or am I missing something? To make things even stranger than they were before, I removed my hard disk and attached it to yet another computer, which normally should perform about equally to the two systems I was using before, despite it only has 1 GB of Ram. I'm booting my Ubuntu from the hard disk attached via USB, and here everything runs smoothly, including the emulator. Even with method tracing turned on, performance is ok and very comparable to what I was used to have on XP. So the conclusion would be, that my first hardware setup can't be the bottleneck, since it runs the emulator fine under XP, and that my Ubuntu configuration can't be the bottleneck, since it runs the emulator fine on the third hardware configuration. Too bad that the first computer is broken now, and the third one doesn't belong to me, and the second one performs badly under ubuntu and currently has no XP. Just for completeness, here's the output of free, made on that nice third computer which runs it just fine: total used free shared buffers cached Mem: 1017192 971392 45800 0 18844 310512 -/+ buffers/cache: 642036 375156 Swap: 2441840 218892 948 On 5 Dez., 17:23, theSmith chris.smith...@gmail.com wrote: My emulators behave just fine under 9.10 Karmic Kola, unless I start method tracing, then it really slows down. Are you using the java sun jdk and not the open jdk? On Dec 5, 11:12 am, Mark Murphy mmur...@commonsware.com wrote: I'm using a dual boot configuration with Windows XP and Ubuntu 9.04. On XP, the emualtor is somehow slower than a real G1 device, but it's completely ok. But on Ubuntu, the emulator is unusable slow. Note that other programs run just fine under my ubuntu. I have no exact measurements, but I think the emulator about 10 times slower than on Windows. Installing a small app takes more than 2 minutes, starting an app sometimes takes over 2 minutes, returning to the home screen takes up to 40 seconds, and there is not a single click I can do that takes less than 2 seconds to trigger some kind of reaction. I get around 2 fps at most, no matter what I do. I am writing this email on a notebook, dual-boot Vista and Ubuntu 9.04, and if anything, the Ubuntu emulator is a bit faster. Also, I noticed that under heavy usage of the emulator, the usage of my real CPU never went above 30%. Is there any explanation for this slowness on Ubuntu? Or even a way to further investigate where the bottleneck might be? How much RAM do
Re: [android-developers] Re: Emulator on Linux 10 times slower than on Windows
I've had bad Linux/hardware interactions with the emulator from audio. The emulator AFAIK uses the SDL audio libraries. Try starting the emulator from the command line with the -noaudio flag and see if that works better. brian.schim...@googlemail.com wrote: To answer your questions: I was using Ubuntu two different hardware setups, both had 2 GB Ram installed, about 75% of which was free. See below for an output of free. As far as I can tell (that is, as far as java -version tells me), I'm using Sun's Java: java version 1.6.0_16 Java(TM) SE Runtime Environment (build 1.6.0_16-b01) Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing) But I think this wouldn't matter anyway, because the Android Emulator is based on Quemu which is native software, not Java. Or am I missing something? To make things even stranger than they were before, I removed my hard disk and attached it to yet another computer, which normally should perform about equally to the two systems I was using before, despite it only has 1 GB of Ram. I'm booting my Ubuntu from the hard disk attached via USB, and here everything runs smoothly, including the emulator. Even with method tracing turned on, performance is ok and very comparable to what I was used to have on XP. So the conclusion would be, that my first hardware setup can't be the bottleneck, since it runs the emulator fine under XP, and that my Ubuntu configuration can't be the bottleneck, since it runs the emulator fine on the third hardware configuration. Too bad that the first computer is broken now, and the third one doesn't belong to me, and the second one performs badly under ubuntu and currently has no XP. Just for completeness, here's the output of free, made on that nice third computer which runs it just fine: total used free sharedbuffers cached Mem: 1017192 971392 45800 0 18844 310512 -/+ buffers/cache: 642036 375156 Swap: 2441840 218892948 On 5 Dez., 17:23, theSmith chris.smith...@gmail.com wrote: My emulators behave just fine under 9.10 Karmic Kola, unless I start method tracing, then it really slows down. Are you using the java sun jdk and not the open jdk? On Dec 5, 11:12 am, Mark Murphy mmur...@commonsware.com wrote: I'm using a dual boot configuration with Windows XP and Ubuntu 9.04. On XP, the emualtor is somehow slower than a real G1 device, but it's completely ok. But on Ubuntu, the emulator is unusable slow. Note that other programs run just fine under my ubuntu. I have no exact measurements, but I think the emulator about 10 times slower than on Windows. Installing a small app takes more than 2 minutes, starting an app sometimes takes over 2 minutes, returning to the home screen takes up to 40 seconds, and there is not a single click I can do that takes less than 2 seconds to trigger some kind of reaction. I get around 2 fps at most, no matter what I do. I am writing this email on a notebook, dual-boot Vista and Ubuntu 9.04, and if anything, the Ubuntu emulator is a bit faster. Also, I noticed that under heavy usage of the emulator, the usage of my real CPU never went above 30%. Is there any explanation for this slowness on Ubuntu? Or even a way to further investigate where the bottleneck might be? How much RAM do you have? What is the output of running 'free' in Ubuntu from a shell? -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Emulator on Linux 10 times slower than on Windows
I had this problem with Ubuntu 8.10, two things : - check that you're using the good environment x86 / 64 - use preferly the SUN JDK 1.6 to compile Android development (you can use the JDK 1.5 to work with sources). Today I'm using a bipro intel, 4Gb, Ubuntu 9.10 and SUN JDK 1.5.0.20 and performance are really good. BR On Dec 7, 5:49 pm, Michael MacDonald googlec...@antlersoft.com wrote: I've had bad Linux/hardware interactions with the emulator from audio. The emulator AFAIK uses the SDL audio libraries. Try starting the emulator from the command line with the -noaudio flag and see if that works better. brian.schim...@googlemail.com wrote: To answer your questions: I was using Ubuntu two different hardware setups, both had 2 GB Ram installed, about 75% of which was free. See below for an output of free. As far as I can tell (that is, as far as java -version tells me), I'm using Sun's Java: java version 1.6.0_16 Java(TM) SE Runtime Environment (build 1.6.0_16-b01) Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing) But I think this wouldn't matter anyway, because the Android Emulator is based on Quemu which is native software, not Java. Or am I missing something? To make things even stranger than they were before, I removed my hard disk and attached it to yet another computer, which normally should perform about equally to the two systems I was using before, despite it only has 1 GB of Ram. I'm booting my Ubuntu from the hard disk attached via USB, and here everything runs smoothly, including the emulator. Even with method tracing turned on, performance is ok and very comparable to what I was used to have on XP. So the conclusion would be, that my first hardware setup can't be the bottleneck, since it runs the emulator fine under XP, and that my Ubuntu configuration can't be the bottleneck, since it runs the emulator fine on the third hardware configuration. Too bad that the first computer is broken now, and the third one doesn't belong to me, and the second one performs badly under ubuntu and currently has no XP. Just for completeness, here's the output of free, made on that nice third computer which runs it just fine: total used free shared buffers cached Mem: 1017192 971392 45800 0 18844 310512 -/+ buffers/cache: 642036 375156 Swap: 2441840 218892 948 On 5 Dez., 17:23, theSmith chris.smith...@gmail.com wrote: My emulators behave just fine under 9.10 Karmic Kola, unless I start method tracing, then it really slows down. Are you using the java sun jdk and not the open jdk? On Dec 5, 11:12 am, Mark Murphy mmur...@commonsware.com wrote: I'm using a dual boot configuration with Windows XP and Ubuntu 9.04. On XP, the emualtor is somehow slower than a real G1 device, but it's completely ok. But on Ubuntu, the emulator is unusable slow. Note that other programs run just fine under my ubuntu. I have no exact measurements, but I think the emulator about 10 times slower than on Windows. Installing a small app takes more than 2 minutes, starting an app sometimes takes over 2 minutes, returning to the home screen takes up to 40 seconds, and there is not a single click I can do that takes less than 2 seconds to trigger some kind of reaction. I get around 2 fps at most, no matter what I do. I am writing this email on a notebook, dual-boot Vista and Ubuntu 9.04, and if anything, the Ubuntu emulator is a bit faster. Also, I noticed that under heavy usage of the emulator, the usage of my real CPU never went above 30%. Is there any explanation for this slowness on Ubuntu? Or even a way to further investigate where the bottleneck might be? How much RAM do you have? What is the output of running 'free' in Ubuntu from a shell? -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Emulator on Linux 10 times slower than on Windows
My emulators behave just fine under 9.10 Karmic Kola, unless I start method tracing, then it really slows down. Are you using the java sun jdk and not the open jdk? On Dec 5, 11:12 am, Mark Murphy mmur...@commonsware.com wrote: I'm using a dual boot configuration with Windows XP and Ubuntu 9.04. On XP, the emualtor is somehow slower than a real G1 device, but it's completely ok. But on Ubuntu, the emulator is unusable slow. Note that other programs run just fine under my ubuntu. I have no exact measurements, but I think the emulator about 10 times slower than on Windows. Installing a small app takes more than 2 minutes, starting an app sometimes takes over 2 minutes, returning to the home screen takes up to 40 seconds, and there is not a single click I can do that takes less than 2 seconds to trigger some kind of reaction. I get around 2 fps at most, no matter what I do. I am writing this email on a notebook, dual-boot Vista and Ubuntu 9.04, and if anything, the Ubuntu emulator is a bit faster. Also, I noticed that under heavy usage of the emulator, the usage of my real CPU never went above 30%. Is there any explanation for this slowness on Ubuntu? Or even a way to further investigate where the bottleneck might be? How much RAM do you have? What is the output of running 'free' in Ubuntu from a shell? -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Emulator on Linux 10 times slower than on Windows
To answer your questions: I was using Ubuntu two different hardware setups, both had 2 GB Ram installed, about 75% of which was free. See below for an output of free. As far as I can tell (that is, as far as java -version tells me), I'm using Sun's Java: java version 1.6.0_16 Java(TM) SE Runtime Environment (build 1.6.0_16-b01) Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing) But I think this wouldn't matter anyway, because the Android Emulator is based on Quemu which is native software, not Java. Or am I missing something? To make things even stranger than they were before, I removed my hard disk and attached it to yet another computer, which normally should perform about equally to the two systems I was using before, despite it only has 1 GB of Ram. I'm booting my Ubuntu from the hard disk attached via USB, and here everything runs smoothly, including the emulator. Even with method tracing turned on, performance is ok and very comparable to what I was used to have on XP. So the conclusion would be, that my first hardware setup can't be the bottleneck, since it runs the emulator fine under XP, and that my Ubuntu configuration can't be the bottleneck, since it runs the emulator fine on the third hardware configuration. Too bad that the first computer is broken now, and the third one doesn't belong to me, and the second one performs badly under ubuntu and currently has no XP. Just for completeness, here's the output of free, made on that nice third computer which runs it just fine: total used free sharedbuffers cached Mem: 1017192 971392 45800 0 18844 310512 -/+ buffers/cache: 642036 375156 Swap: 2441840 218892948 On 5 Dez., 17:23, theSmith chris.smith...@gmail.com wrote: My emulators behave just fine under 9.10 Karmic Kola, unless I start method tracing, then it really slows down. Are you using the java sun jdk and not the open jdk? On Dec 5, 11:12 am, Mark Murphy mmur...@commonsware.com wrote: I'm using a dual boot configuration with Windows XP and Ubuntu 9.04. On XP, the emualtor is somehow slower than a real G1 device, but it's completely ok. But on Ubuntu, the emulator is unusable slow. Note that other programs run just fine under my ubuntu. I have no exact measurements, but I think the emulator about 10 times slower than on Windows. Installing a small app takes more than 2 minutes, starting an app sometimes takes over 2 minutes, returning to the home screen takes up to 40 seconds, and there is not a single click I can do that takes less than 2 seconds to trigger some kind of reaction. I get around 2 fps at most, no matter what I do. I am writing this email on a notebook, dual-boot Vista and Ubuntu 9.04, and if anything, the Ubuntu emulator is a bit faster. Also, I noticed that under heavy usage of the emulator, the usage of my real CPU never went above 30%. Is there any explanation for this slowness on Ubuntu? Or even a way to further investigate where the bottleneck might be? How much RAM do you have? What is the output of running 'free' in Ubuntu from a shell? -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en