Jump to content

[ROM] FLB-Mod 1 (Based on Android 2.1)


Guest Simon O

Recommended Posts

Guest totiadrenalin
This analysis is not correct I am afraid.

Linux low memory killer works depending on oom_adj. Here is the documentation of OOM:

Out of Memory (OOM) refers to a computing state where all available memory,

including swap space, has been allocated. Normally this will cause the system

to panic and stop functioning as expected. There is a switch that controls OOM

behavior in /proc/sys/vm/panic_on_oom. When set to 1 the kernel will panic on

OOM. A setting of 0 instructs the kernel to call a function named oom_killer on

an OOM. Usually, oom_killer can kill rogue processes and the system will

survive.

As you see, swap is considered "RAM" for OOM (however it does not behave like that in other circumstances.)

Thanks for correcting me.

cat /proc/sys/vm/panic_on_oom = blank space

What this should mean?

:lol:

OK

I managet to set it to 0

so now it won't panic on oom?

OH

It was always set to 0.

I just need to know is it possible to set the kernel that it won't use the swap memory for low memory killer?

Edited by totiadrenalin
Link to comment
Share on other sites

Guest gusthy
Thanks for correcting me.

cat /proc/sys/vm/panic_on_oom = blank space

What this should mean?

:lol:

OK

I managet to set it to 0

so now it won't panic on oom?

OH

It was always set to 0.

I just need to know is it possible to set the kernel that it won't use the swap memory for low memory killer?

Luckily no.

If it were possible, swap would be meaningless. Why do you want to do that?

(Swapping doesn't depend on process' active state, only on the process memory activity, swappiness and memory.

BTW, Android kernel doesn't panic on oom, since there is low memory killer B))

Edited by gusthy
Link to comment
Share on other sites

Guest totiadrenalin
Luckily no.

If it were possible, swap would be meaningless. Why do you want to do that?

(Swapping doesn't depend on process' active state, only on the process memory activity, swappiness and memory.

BTW, Android kernel doesn't panic on oom, since there is low memory killer :lol:)

Thank you very much for the information.

Now I really do agree with you.

But in that case, why the cpu is getting overloaded when there isn't any app foreground only the system panel?

And after i kill the background apps the cpu load is down.

Also I sometimes when I close some app (some huge game) the regular way by pressing the home button, and try to open the app again the pulse isstuck for 5-10sec. and sometimes even for much longer.

And If I close the app with the red button this isn't happening?

Edited by totiadrenalin
Link to comment
Share on other sites

Guest gusthy
Thank you very much for the information.

Now I really do agree with you.

But in that case, why the cpu is getting overloaded when there isn't any app foreground only the system panel?

And after i kill the background apps the cpu load is down.

Also I sometimes when I close some app (some huge game) the regular way by pressing the home button, and try to open the app again the pulse isstuck for 5-10sec. and sometimes even for much longer.

And If I close the app with the red button this isn't happening?

It depends.

One of the scenarios I can imgaine is that there are events in Android and apps hook themselves on them. If an event occurs that is important to many swapped apps, they all have to come out of the swap and do something small.

Other possible reason is that memory manager gets confused of lots of page ins/outs, and it takes time for it to clean up things.

BTW, Froyo is better regarding this issue.

Link to comment
Share on other sites

Guest totiadrenalin
It depends.

One of the scenarios I can imgaine is that there are events in Android and apps hook themselves on them. If an event occurs that is important to many swapped apps, they all have to come out of the swap and do something small.

Other possible reason is that memory manager gets confused of lots of page ins/outs, and it takes time for it to clean up things.

BTW, Froyo is better regarding this issue.

Thanks

I already test this things with the froyo and it is true that the froyo handle this much better then eclair.

Link to comment
Share on other sites

Guest gusthy
Nor me. But it was interesting anyway :lol:

B)

With 256 MB of Swap under Froyo sometimes - very rarely - Opera is killed for me too. (once in 2 or 3 days). Maybe there is another race condition that leads to killing an app, not only low memory...

(Unfortunately my experience is that my "large swap - seamless multitask without slowdown" strategy is usable only with Froyo, Eclair doesnt really like very big swaps. And this will lead to lowmem-kills.

Link to comment
Share on other sites

In the end it's a special problem with Opera? Opera is the "biggest" app I'm using, but I will try another big apps and will check if the stay in RAM.

I'm really looking forward to Froyo, seems to be pretty cool.

Link to comment
Share on other sites

Guest bounty123
Linux low memory killer works depending on oom_adj. Here is the documentation of OOM:

The question is, whether Android's process killer works the same way as the linux oom killer. The latter is a last resort for the system, when all memory+swap is gone, to try and keep the system alive. I suspect that they are not the same and maybe they work based on different conditions. I'd be glad to get more info on that.

Edited by bounty123
Link to comment
Share on other sites

Guest totiadrenalin
:lol:

With 256 MB of Swap under Froyo sometimes - very rarely - Opera is killed for me too. (once in 2 or 3 days). Maybe there is another race condition that leads to killing an app, not only low memory...

(Unfortunately my experience is that my "large swap - seamless multitask without slowdown" strategy is usable only with Froyo, Eclair doesnt really like very big swaps. And this will lead to lowmem-kills.

I never have that issue with the dolphin HD browser.

Not with eclair and not with froyo.

So maybe the problem could be with the Opera it self.

?

Link to comment
Share on other sites

Guest totiadrenalin
The question is, whether Android's process killer works the same way as the linux oom killer. The latter is a last resort for the system, when all memory+swap is gone, to try and keep the system alive. I suspect that they are not the same and maybe they work based on different conditions. I'd be glad to get more info on that.

Here are the informations that you need.

Edited by totiadrenalin
Link to comment
Share on other sites

Guest olekole
Is there any way how to check if A2SD JIT is working, please?

i don't no

but after

#> a2sd jit

the phone make a reboot

and linpack say 4.554 bevor 2000

ok jit on ?!

cu

olekole

Link to comment
Share on other sites

Guest gusthy
thanks, that's useful info

Yes, it is a very detailed information.

Shortly:

No, the mechanism on regular linux and Android are different, but both depend on oom value, so their conditions are similar (and oom calculation is the same, depends on RAM + SWAP). Android doesn't handle it as a "panic", it is an event.

Edit:

Just for curiosity I copy here the smem results of my phone running froyo.

The interesting columns are swap (the size of the swap used by the given process) and uss (the memory used only by the app) and pss (uss + the amount of shared memory divided by the number of processes using that piece of shared memory, so shared memory counts only once):

attila@attila-laptop:~$ smem -S smem.tar -k -t

PID User Command Swap USS PSS RSS

5383 0 /system/bin/debuggerd 52.0K 0 2.0K 100.0K

1222 1002 /system/bin/dbus-daemon --s 88.0K 4.0K 6.0K 116.0K

1226 0 /system/bin/installd 84.0K 4.0K 6.0K 136.0K

1229 1017 /system/bin/keystore /data/ 72.0K 4.0K 6.0K 100.0K

1237 0 /system/bin/qmuxd & 76.0K 4.0K 6.0K 100.0K

1208 1000 /system/bin/servicemanager 56.0K 24.0K 26.0K 140.0K

1210 0 /system/bin/vold 88.0K 72.0K 78.0K 208.0K

1211 0 /system/bin/netd 64.0K 88.0K 96.0K 224.0K

1 0 /init 64.0K 136.0K 136.0K 160.0K

1073 0 /sbin/adbd 12.0K 156.0K 156.0K 164.0K

5692 0 /system/bin/sh - 0 144.0K 183.0K 344.0K

2151 0 zygote /bin/app_process -Xz 4.3M 4.0K 221.0K 4.7M

5703 0 ./android-smemcap 0 260.0K 299.0K 464.0K

1215 0 /system/bin/rild 384.0K 644.0K 650.0K 864.0K

2150 1013 /system/bin/mediaserver 428.0K 700.0K 721.0K 1.0M

4865 10046 com.google.android.apps.goo 3.4M 480.0K 772.0K 6.6M

4972 10035 com.google.android.apps.upl 3.0M 472.0K 815.0K 7.1M

3432 10043 com.google.android.voicesea 3.5M 536.0K 835.0K 6.7M

4879 10059 com.dropbox.android 3.3M 560.0K 895.0K 7.2M

4750 10020 com.google.android.apps.map 6.6M 684.0K 913.0K 5.7M

2815 10007 com.android.providers.calen 4.2M 636.0K 941.0K 7.0M

4982 10045 com.amazon.mp3 3.5M 644.0K 991.0K 7.4M

4609 10021 com.android.mms 5.1M 716.0K 1.1M 7.6M

2618 10042 com.android.vending 14.8M 1.2M 1.5M 7.7M

2672 10013 android.process.media 3.5M 1.6M 2.0M 8.3M

2264 10017 com.android.inputmethod.lat 4.9M 1.7M 2.1M 8.4M

2273 1001 com.android.phone 6.0M 2.6M 3.0M 9.6M

4055 10001 android.process.acore 8.7M 2.4M 3.1M 10.7M

2597 1000 com.android.settings 2.5M 3.3M 3.6M 9.7M

2951 10060 com.fancywidget.android 2.2M 3.3M 3.6M 9.8M

2568 10054 com.rollerbush.batteryminde 1.8M 3.3M 3.8M 10.9M

5385 10014 com.android.email 1.7M 4.7M 5.3M 12.4M

2636 10002 com.google.process.gapps 2.7M 5.0M 5.6M 12.5M

3400 10058 android.process.acore.myhom 4.0M 7.4M 8.1M 23.6M

2510 10049 com.google.android.gm 2.6M 8.1M 9.3M 17.5M

2157 1000 system_server 3.3M 15.1M 16.3M 41.1M

-------------------------------------------------------------------------------

36 24 97.2M 66.5M 76.9M 246.2M

As you can see, some applications are fully swapped, some are not. The system uses 97.2 MB of swap and 76.9 MB of RAM = 175.1 MB of memory. Most of it is swapped out, but the system is still very responsive - the apps I haven't used nowadays (mms, mp3, market, voice search, dropbox, etc.) are swapped almost totally.

Edited by gusthy
Link to comment
Share on other sites

Guest totiadrenalin
i don't no

but after

#> a2sd jit

the phone make a reboot

and linpack say 4.554 bevor 2000

ok jit on ?!

cu

olekole

So you do have enabled jit.

First perform:

adb pull /system/build.prop build.prop

then open that file and check for this line:

dalvik.vm.execution-mode=int:jit

You can simply disable the jit by changing it to:

dalvik.vm.execution-mode=int:fast

But if you want to be absolutely sure that jit is working on your phone then connect your phone with a pc again and do this:

type:

adb logcat > logcat.txt

start some application from your phone, mybe several?!!

and ctrl+c

then open the logcat.txt and search for this lines:

D/dalvikvm( 3438): Total arena pages for JIT: 2

D/dalvikvm( 3438): Total arena pages for JIT: 3

But the linpack score is telling you everything that you should know to be sure that the JIT is enabled in your phone.

Edited by totiadrenalin
Link to comment
Share on other sites

Guest peelie

flashed flb1.7; apart from fc at start runnig pretty well.

question - is 'fix permissions' fromrom manager required? cause can't seem to run it giving me 'an error occured while attempting to run privileged commands'

ta

Link to comment
Share on other sites

Do I need to have a Ext3 partition to use swap or is ext2 fine?

I don't know what class my microSD card is but it's a Kingston 2gb card and according to the app SDcardBenchmark the card has a writespeed of 12,79kb/second and a readspeed of 15.2kb/second...

Link to comment
Share on other sites

Guest totiadrenalin
Do I need to have a Ext3 partition to use swap or is ext2 fine?

I don't know what class my microSD card is but it's a Kingston 2gb card and according to the app SDcardBenchmark the card has a writespeed of 12,79kb/second and a readspeed of 15.2kb/second...

LOL?

class6+

?

Link to comment
Share on other sites

Guest Otto222

Applied the vanilla update, network operators does not show anymore. Might have been the espresso/apn fix, since I applied it just before the Vanilla.

Edit: temporary bug, showed operator now, phone is still slow finding operators sometimes and will show searching symbol without something happening.

Programs running in background will still quit, like Ebuddy. This was not a problem in 2.2 beta and some other 2.1 mods.

Edited by Otto222
Link to comment
Share on other sites

Guest AntonioPT
Do I need to have a Ext3 partition to use swap or is ext2 fine?

I don't know what class my microSD card is but it's a Kingston 2gb card and according to the app SDcardBenchmark the card has a writespeed of 12,79kb/second and a readspeed of 15.2kb/second...

A partition for swap is not a ext2/3 partition, it's a... SWAP partition! :)

Seriously, it's a special type of filesystem just for swap.

Link to comment
Share on other sites

Guest InstantWater
That actually looks bad, since its practically 61.3 wasted, unused fast internal megabytes :)

Well, you are correct, but what should I move back to phone?

Thanks

BTW Tux Rider seems to be working, but very very slow. I think my CLASS 2 card is not enough for running all programs from it.

p.s. Is it worth to buy CLASS 6 microSD or CLASS 4 is more than enough?

Edited by InstantWater
Link to comment
Share on other sites

Guest AntonioPT
Well, you are correct, but what should I move back to phone?

Thanks

BTW Tux Rider seems to be working, but very very slow. I think my CLASS 2 card is not enough for running all programs from it.

p.s. Is it worth to buy CLASS 6 microSD or CLASS 4 is more than enough?

Dalvik on SD with a Class 2 card is NOT, by any means, RECOMMENDED.

Class 4 - A2SD (dalvik on phone) + swap

Class 6 - A2SD (dalvik on SD) + swap

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.