Proposal to set dalvik-vm optimizing all code

Search This thread

hunderteins

Senior Member
Sep 7, 2009
192
349
Hello,

I played with the dalvik.vm.dexopt-flags in /system/build.prop. Basically you control the class-loading and dalvik-vm there.

streakowner proposed in http://xdaforums.com/showpost.php?p=18111740&postcount=644 the setting v=n,o=v. But disabled this with #, in DSC v1.0 the setting is active.
That means: do not verify and optimize mode verified. Found that info in dexopt/OptMain.c

I did some performance measurement with smartbench 2011 and got the value 553 in the first round, and 465 in the second round. That is very bad for an one ghz powered device. Good would > 1000. /data/dalvik-cache takes 74 MiB with this setting.

At the moment I'm running with

dalvik.vm.dexopt-flags=v=n,o=a,u=y

That means: do not verify, optimize all classes and optimize for uniprocessor.

First I was not impressed, because rebooting with a cleaned dalvik-cache took more than double the time span of the o=v setting. logcat is full off lines telling me what can't be optimized and how much time the load took. But after booting I got the impression the system went faster. With smartbench 2011 I get the value 1036 in the first and 1110 in the second round. /data/dalvik-cache takes 74 MiB with this setting.

Can someone confirm my finding?

I don't say you will double the speed of the streak with this setting. But I think you will notice the change. The trade off is the time for the first boot. But I think that is worth is.
So I propose to use the above setting in all gb-based roms for the streak 5.

Have a nice weekend,
hunderteins
 
Last edited:

hunderteins

Senior Member
Sep 7, 2009
192
349
Tested on miui and it's not working i get into a boot loop.

Ouch! Sorry to hear that. I hope you didn't get in serious trouble.

getprop | grep dexopt
[dalvik.vm.dexopt-flags]: [v=n,o=a,u=y]

Well, same ~950 in Quadrant (CPU/mem only)

998400

Quadrant shows 1048 with o=a and 1065 with o=v. Thats not helping either. At least smartbench shows nearly the same "Games Index". But what do they test with ther productivity index? Calculating PI and mandelbrot is so different?
And there is opera. Its definitly faster with o=a. I'll try to find a web page rendering test.

o.k. I get more mixed signals here. Numion tells me that rendering a real world web-page is about 30% faster with o=a (10.5 vs. 14,6 sec). Scragz is 10 % slower with o=a ( 9.7 vs. 10.5 sec).

I'll file it under works for me, but don't try this with miui. Thanks for your help.

Reg. hunderteins
 

Attachments

  • quadrant_o_v.jpg
    quadrant_o_v.jpg
    25.9 KB · Views: 1,175
  • quadrant_o_a.jpg
    quadrant_o_a.jpg
    26 KB · Views: 1,070
  • smartbench_o_v.jpg
    smartbench_o_v.jpg
    21.3 KB · Views: 961
  • smartbench_o_a.jpg
    smartbench_o_a.jpg
    20.8 KB · Views: 839
  • numion_o_v.jpg
    numion_o_v.jpg
    42.1 KB · Views: 778
  • numion_o_a.jpg
    numion_o_a.jpg
    44.1 KB · Views: 723
  • scragz_o_v.jpg
    scragz_o_v.jpg
    43.7 KB · Views: 697
  • scragz_o_a.jpg
    scragz_o_a.jpg
    42.9 KB · Views: 663
Last edited:

_n0p_

Senior Member
Apr 9, 2009
2,560
1,833
47
Kyiv
n0p.8bit.fm
hunderteins, this actually lead me to think that you'll try to build highly optimized (armv7, neon, no loop unroll - small cache) libdvm. Am I right? :)
 

sinan33

Senior Member
Mar 29, 2010
680
143
Tarsus
Tested on miui and it's not working i get into a boot loop.

It works with MIUI too but you have to delete the another line that contains

dalvik.vm.dexopt-flags=m=y

i guess this lines value is overlapping with the other lines "u=y" value.

---------- Post added at 08:11 AM ---------- Previous post was at 08:03 AM ----------

The result of first test is:
Productivity index=716
Gaming index=981

with smart bench 2012

---------- Post added at 08:20 AM ---------- Previous post was at 08:11 AM ----------

The result of second test is:

Productivity index=1074
Gaming index=1569

with smart bench 2011
 
  • Like
Reactions: alispeedsport

cdzo72

Senior Member
Hello,

I played with the dalvik.vm.dexopt-flags in /system/build.prop. Basically you control the class-loading and dalvik-vm there.

streakowner proposed in http://xdaforums.com/showpost.php?p=18111740&postcount=644 the setting v=n,o=v. But disabled this with #, in DSC v1.0 the setting is active.
That means: do not verify and optimize mode verified. Found that info in dexopt/OptMain.c

I did some performance measurement with smartbench 2011 and got the value 553 in the first round, and 465 in the second round. That is very bad for an one ghz powered device. Good would > 1000. /data/dalvik-cache takes 74 MiB with this setting.

At the moment I'm running with

dalvik.vm.dexopt-flags=v=n,o=a,u=y

That means: do not verify, optimize all classes and optimize for uniprocessor.

First I was not impressed, because rebooting with a cleaned dalvik-cache took more than double the time span of the o=v setting. logcat is full off lines telling me what can't be optimized and how much time the load took. But after booting I got the impression the system went faster. With smartbench 2011 I get the value 1036 in the first and 1110 in the second round. /data/dalvik-cache takes 74 MiB with this setting.

Can someone confirm my finding?

I don't say you will double the speed of the streak with this setting. But I think you will notice the change. The trade off is the time for the first boot. But I think that is worth is.
So I propose to use the above setting in all gb-based roms for the streak 5.

Have a nice weekend,
hunderteins



Sent from my Dell Streak using Tapatalk 2
 

Edrill

Senior Member
Nov 16, 2010
220
47
Same here. Didn't notice any major difference in boot time then usual.

MIUI seems a bit more responsive after this. And I've always found MIUI to be a bit laggy compared to CM and DSC! Gonna observe it for some more time before I can be 100% sure.
 

sinan33

Senior Member
Mar 29, 2010
680
143
Tarsus
Miui 2.4.20 is not laggy like old versions and it boots very fast.After i edited build.prop it's more responsive and i wrote the results of benches.
 

_n0p_

Senior Member
Apr 9, 2009
2,560
1,833
47
Kyiv
n0p.8bit.fm
Just a warning:
When I was experimenting with this settings, i've got caught in situation when CM7 dvm was trying to use /cache for dalvik-cache and failed.
Works fine with Nexus S dvm (as in DSC v7.0)
And I can confirm higher scores in Smartbench.
More, Smartbench somehow gives results, similar to clock value - ~930 on 998400, ~1340 on 1344000, so overclock does matter in this case.
 

_n0p_

Senior Member
Apr 9, 2009
2,560
1,833
47
Kyiv
n0p.8bit.fm
I sure do.
But just in case keep handy /system/lib/libdvm.so from DSC 7.0 and nandroid backup.
libdvm.so from CM7 has reference to /cache - I wonder if binary change to /data would help.
 

Dude_Virus

Senior Member
Mar 8, 2007
1,058
199
It works with MIUI too but you have to delete the another line that contains

dalvik.vm.dexopt-flags=m=y

i guess this lines value is overlapping with the other lines "u=y" value.

---------- Post added at 08:11 AM ---------- Previous post was at 08:03 AM ----------

The result of first test is:
Productivity index=716
Gaming index=981

with smart bench 2012

---------- Post added at 08:20 AM ---------- Previous post was at 08:11 AM ----------

The result of second test is:

Productivity index=1074
Gaming index=1569

with smart bench 2011

Ok so i need to change only the entry dalvik.vm.dexopt-flags. Below is my buildprop part where the dalvik entries are so just confirm as to what all needs to be changed

#streakOwner's recommended
dalvik.vm.startheapsize=48m
dalvik.vm.heapsize=48m
dalvik.vm.execution-mode=int:jit
dalvik.vm.dexopt-flags=v=n,o=v
dalvik.vm.dexopt-data-only=1
dalvik.vm.lockprof.threshold=150
davlik.vm.verify-bytecode=false
ro.android.kernel.checkjni=0
#wifi.supplicant_scan_interval=120
windowsmgr.max_events_per_sec=80
keyguard.no_require_sim=true
 

_n0p_

Senior Member
Apr 9, 2009
2,560
1,833
47
Kyiv
n0p.8bit.fm
Ok so i need to change only the entry dalvik.vm.dexopt-flags. Below is my buildprop part where the dalvik entries are so just confirm as to what all needs to be changed

#streakOwner's recommended
dalvik.vm.startheapsize=48m
dalvik.vm.heapsize=48m
dalvik.vm.execution-mode=int:jit
dalvik.vm.dexopt-flags=v=n,o=v
dalvik.vm.dexopt-data-only=1
dalvik.vm.lockprof.threshold=150
davlik.vm.verify-bytecode=false
ro.android.kernel.checkjni=0
#wifi.supplicant_scan_interval=120
windowsmgr.max_events_per_sec=80
keyguard.no_require_sim=true

Change
dalvik.vm.dexopt-flags=v=n,o=v

to
dalvik.vm.dexopt-flags=v=n,o=a,u=y
or
dalvik.vm.dexopt-flags=v=n,o=a,u=y,m=y (testing now with register optimization)
 

Dude_Virus

Senior Member
Mar 8, 2007
1,058
199
Change
dalvik.vm.dexopt-flags=v=n,o=v

to
dalvik.vm.dexopt-flags=v=n,o=a,u=y
or
dalvik.vm.dexopt-flags=v=n,o=a,u=y,m=y (testing now with register optimization)

Thanks for the values....but dont i need to change the cache size to 74 as mentioned in the original post tht the cache goes to 74 mb
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Hello,

    I played with the dalvik.vm.dexopt-flags in /system/build.prop. Basically you control the class-loading and dalvik-vm there.

    streakowner proposed in http://xdaforums.com/showpost.php?p=18111740&postcount=644 the setting v=n,o=v. But disabled this with #, in DSC v1.0 the setting is active.
    That means: do not verify and optimize mode verified. Found that info in dexopt/OptMain.c

    I did some performance measurement with smartbench 2011 and got the value 553 in the first round, and 465 in the second round. That is very bad for an one ghz powered device. Good would > 1000. /data/dalvik-cache takes 74 MiB with this setting.

    At the moment I'm running with

    dalvik.vm.dexopt-flags=v=n,o=a,u=y

    That means: do not verify, optimize all classes and optimize for uniprocessor.

    First I was not impressed, because rebooting with a cleaned dalvik-cache took more than double the time span of the o=v setting. logcat is full off lines telling me what can't be optimized and how much time the load took. But after booting I got the impression the system went faster. With smartbench 2011 I get the value 1036 in the first and 1110 in the second round. /data/dalvik-cache takes 74 MiB with this setting.

    Can someone confirm my finding?

    I don't say you will double the speed of the streak with this setting. But I think you will notice the change. The trade off is the time for the first boot. But I think that is worth is.
    So I propose to use the above setting in all gb-based roms for the streak 5.

    Have a nice weekend,
    hunderteins
    7
    turned verify on, didn't took longer to boot

    LuckyPatcher and other programs have a problem with optimized dalvik-cache for classes that aren't verified. So I set up

    dalvik.vm.dexopt-flags=v=a,o=v,u=y,m=y

    it is like: verify=all dexopt=verified uniprocessor=yes registermaps=yes

    Now LuckyPatcher works again, the boot takes not really more time, cache-size is the same as before and this uses register mapping. I'll give it a try a week or two.

    have a nice weekend,
    hunderteins
    4
    Tested on miui and it's not working i get into a boot loop.

    Ouch! Sorry to hear that. I hope you didn't get in serious trouble.

    getprop | grep dexopt
    [dalvik.vm.dexopt-flags]: [v=n,o=a,u=y]

    Well, same ~950 in Quadrant (CPU/mem only)

    998400

    Quadrant shows 1048 with o=a and 1065 with o=v. Thats not helping either. At least smartbench shows nearly the same "Games Index". But what do they test with ther productivity index? Calculating PI and mandelbrot is so different?
    And there is opera. Its definitly faster with o=a. I'll try to find a web page rendering test.

    o.k. I get more mixed signals here. Numion tells me that rendering a real world web-page is about 30% faster with o=a (10.5 vs. 14,6 sec). Scragz is 10 % slower with o=a ( 9.7 vs. 10.5 sec).

    I'll file it under works for me, but don't try this with miui. Thanks for your help.

    Reg. hunderteins
    3
    getprop | grep dexopt
    [dalvik.vm.dexopt-flags]: [v=n,o=a,u=y]

    Well, same ~950 in Quadrant (CPU/mem only)

    998400

    --
    Sergei.
    2
    It works with MIUI too but you have to delete the another line that contains

    dalvik.vm.dexopt-flags=m=y

    i guess this lines value is overlapping with the other lines "u=y" value.

    ---------- Post added at 08:11 AM ---------- Previous post was at 08:03 AM ----------

    The result of first test is:
    Productivity index=716
    Gaming index=981

    with smart bench 2012

    ---------- Post added at 08:20 AM ---------- Previous post was at 08:11 AM ----------

    The result of second test is:

    Productivity index=1074
    Gaming index=1569

    with smart bench 2011

    Ok so i need to change only the entry dalvik.vm.dexopt-flags. Below is my buildprop part where the dalvik entries are so just confirm as to what all needs to be changed

    #streakOwner's recommended
    dalvik.vm.startheapsize=48m
    dalvik.vm.heapsize=48m
    dalvik.vm.execution-mode=int:jit
    dalvik.vm.dexopt-flags=v=n,o=v
    dalvik.vm.dexopt-data-only=1
    dalvik.vm.lockprof.threshold=150
    davlik.vm.verify-bytecode=false
    ro.android.kernel.checkjni=0
    #wifi.supplicant_scan_interval=120
    windowsmgr.max_events_per_sec=80
    keyguard.no_require_sim=true