Jump to content

Welcome to CyanogenMod

Welcome to our forum. Like most online communities you must register to post, but don't worry this is a simple free process that requires minimal information for you to signup. Be a part of the CyanogenMod Forum by signing in or creating an account. You can even sign in with your Facebook or Twitter account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Get your own profile and make new friends
  • Download files attached to the forum.
  • Customize your experience here
  • Share your CyanogenMod experience!
Guest Message by DevFuse
 

VM Heap Size


  • Please log in to reply
7 replies to this topic

#1 Kevzilla

Kevzilla
  • Donators
  • 33 posts
  • Country:
    us - United States
  • Device Model:
    HTC Sensation 4G
  • CM Version:
    Android Revolution HD
  • Recovery Image:
    ClockworkMod

Posted 14 July 2010 - 11:32 AM

Was just wondering what this option does,also will changing it give any changes to performance. What do you guys set it to?

#2 vinny0000

vinny0000

    Developer in training

  • Donators
  • 163 posts
  • Twitter:vinny0000v1
  • Country:
    us - United States
  • Location:
    ICT KS
  • Device Model:
    HTC Dream,Nexus One,G2
  • CM Version:
    CM 6.0 / 5.0.8 /7.0.3
  • Recovery Image:
    ClockworkMod

Posted 14 July 2010 - 12:38 PM

View PostKevzilla, on 14 July 2010 - 11:32 AM, said:

Was just wondering what this option does,also will changing it give any changes to performance. What do you guys set it to?



i found some interesting info here on the subject --> http://ryanolson.wor...r-rom-cyanogen/

hope this helps

p.s. i have left it as is when i flashed and the rom is crazy fast enough without changing it

#3 Jeorgio

Jeorgio
  • Members
  • 1 posts
  • Device Model:
    |2|
  • CM Version:
    5.0.8
  • Recovery Image:
    Amon_RA

Posted 14 July 2010 - 03:11 PM

It's not "virtual memory," it's real memory.  This setting is simply the maximum amount of heap space (read: memory) a single instance of the Dalvik VM (read: application) can obtain.

Don't read anything into the "benchmarks" performed in the link above.  This setting should have little effect on overall system performance.  The only scenario where it would be beneficial to increase the maximum heap size would be if you have an application that is very close to using up all of its available heap space, which would force it to run garbage collection frequently, which would use up CPU cycles.  It is possible that lowering the maximum heap size could be beneficial in that it might prevent an application from obtaining more memory than it needs (by forcing it to garbage collect sooner), but that all depends on how the Dalvik VM is implemented and is really beyond my knowledge.

#4 Cody Fyler

Cody Fyler
  • Members
  • 17 posts

Posted 14 July 2010 - 05:06 PM

Jerogio, did you read the article? The author found that setting VM Heap size to 12 MB was the fastest (i.e. smaller than default). It's worth a shot, I think.

#5 Mora

Mora
  • Members
  • 11 posts
  • Device Model:
    |2|
  • CM Version:
    6-RC1
  • Recovery Image:
    ClockworkMod

Posted 14 July 2010 - 05:32 PM

View PostCody Fyler, on 14 July 2010 - 05:06 PM, said:

Jerogio, did you read the article? The author found that setting VM Heap size to 12 MB was the fastest (i.e. smaller than default). It's worth a shot, I think.

Yes, fastest, in a linpack test. Linpack measures the *compute* speed of your stack, not real-life performance. Without reading the test app source it's not possible to say how much it actually depend on garbage collection and memory allocation efficiency, so the whole test seem to me quite useless.

Actually, I would suggest bumping up VM heap space to maximum because it reduces GC runs to only when strictly necessary - and *any* GC algorithm is costly. In short, at the expense of little memory (that you wouldn't be using anyway) you get applications that perform smoother plus lower battery usage.

#6 Cody Fyler

Cody Fyler
  • Members
  • 17 posts

Posted 14 July 2010 - 05:59 PM

It depends on what the min heap size is, actually.


Anyone know that?

If it is set to the same as max, then memory will be wasted and my G1 doesn't have much to spare. Posted Image

#7 MeLLoCeLLo

MeLLoCeLLo

    Git Er Done!

  • Donators
  • 60 posts
  • Country:
    us - United States
  • Location:
    Chicago, IL, USA
  • Device Model:
    Nexus 4, Nexus 7 (2013)
  • CM Version:
    CyanogenMod11
  • Recovery Image:
    TWRP

Posted 14 July 2010 - 07:06 PM

Putting it on "12mb" seems to give the Rom a tiny boost. At least initially; cant comment on long term use.

#8 invisiblewave

invisiblewave
  • Donators
  • 1140 posts
  • Country:
    us - United States
  • Device Model:
    Sensation
  • CM Version:
    Nightlies usually
  • Recovery Image:
    Stock

Posted 14 July 2010 - 08:13 PM

View Postvinny0000, on 14 July 2010 - 12:38 PM, said:

VM heap is Virtual Memory...

i found some interesting info here on the subject --> http://ryanolson.wor...r-rom-cyanogen/

hope this helps

p.s. i have left it as is when i flashed and the rom is crazy fast enough without changing it

VM is Virtual Machine, as in JVM.  Dalvik is a Android's virtual machine.  Java code is compiled into bytecode which is executed on a virtual machine, it's slower than compiling into native code but means you don't have to install a different version of the compiled code for each different hardware or o/s implementation, you install a o/s-specific VM that has native routines called from the generic bytecode.  Theoretically, subsequent releases of Android could/should get faster as more native code is included in the JVM.