D
Deleted User
Guest
So what is Dalvik VM?
Dalvik VM is a unique Java Virtual Machine Runtime used to distribute the amount of memory each application is given such as the following that you see in your "build.prop"
dalvik.vm.heapstartsize=8m
dalvik.vm.heapgrowthlimit=192m
dalvik.vm.heapsize=512m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=2m
dalvik.vm.heapmaxfree=8m
As you can see each line is important for dalvik vm to work and without a single one makes your system unbootable.
"dalvik.vm.heapsizestart=" this line is based upon how dalvik will start in the size it is set in your build.prop file, depending how much it's given will determin how fast of a rate dalvik will read think of this as it's percentage of rate transfer when setting this, the default value is "8m" you can set it beyond the default value but becareful depending on your heapsize limit can break and make your os unbootable, we recommend you not to set it above "10m" if you want you can go up to the max 16m as your starting point but this can cause instability and prevent apps to load requiring you to restart your device to fix it!.
Let's talk about "dalvik.vm.heapgrowthlimit=" this value is the about of memory given to each app depending how the application is coded it may override this to use the full amount of memory needed to run the application. For example say your limit is "128m" but your heapsize is 256m though "128m" is half of 256m this.means apps are given 128m out of 256m to use and lowering the amount of physical ram to be used. We recomend to always use half of your Dalvik VM in order to get the best optimal config for your device.
Let's talk about ”dalvik.vm.heapsize=" this line is your primary amount of memory dalvik is given to the OS this is improtant because it uses the amount to reserve in your Physical ram usage, for example say your device has 3GB of physical ram and your heapsize is set as "512m" no matter how your heapgrowth limit is set dalvik will always reserve 512MB extra ram in case of an emergency when ram is needed for operations that uses dalvik VM this can be useful for app performance but utilizes more ram and giving you less free ram for you to use. If you want to free more ram you can set this to a lower dalvik vm size but not too low and don't go under 128m as dalvik has a requirement witch is currently unknown and is unsure if its safe.
Let's talk about "dalvik.vm.heaptargetutilization=" many devices uses this to give a delay when dalvik vm start on device boot. The default value is "0.75" the higher the value the longer dalvik has to be delayed to start, but the lower you set the value at the faster the post process will be!
Let's now talk about "dalvik.vm.heapminfree=" & ”dalvik.vm.heapmaxfree=" these are important however what these lines do is force dalvik vm to clear and keep a certain amount of memory free in case of an emergency but does nit affect how ram is utilized it's just there to save a certain amount when needed!. The default for the min is "2m" and the max is "8m".
So if you have a device that has lessthen 4GB of ram and want to save a good amount of ram for you to use use these values below:
dalvik.vm.heapstartsize=10m
dalvik.vm.heapgrowthlimit=64m
dalvik.vm.heapsize=128m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=2m
dalvik.vm.heapmaxfree=8m
Just ensure your wipe dalvik and cache when you apply these values!
Keep in mind that all devices use dalvik differently, for safety do not change your "dalvik.vm
heapsize=" below 512m as it can cause a bootloop unless your system has a vlue preset for you. Their are some cases when you need to alter your heap size depending on how you change your dalvik VM values
If your device has 3GB or higher ram your values.to get the best performance is show below:
dalvik.vm.heapstartsize=16m
dalvik.vm.heapgrowthlimit=256m
dalvik.vm.heapsize=512m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=512k
dalvik.vm.heapmaxfree=8m
If your planning to alter the heap size ensure you have half of the heapsize given to the heapgrowthlimit for exampler 512m÷2=256m, 128m÷2=64m, 256m÷2=128m & 64m÷2=32m
Never give less or higher amounts of your heapsize to your heapgrowthlimit this can cause system instablilty
Here is a chart showing what heapsize your device(s) should have based on your device(s) ram:
Remember you can increase the heapstartsize to 16m if you wish the higher itis the better performance you will receive, but the con about this is you may run out of memory quicker then normal so we recommend not to go above 16m.
1). For devices with 1GB of RAM
dalvik.vm.heapstartsize=8m
dalvik.vm.heapgrowthlimit=64m
dalvik.vm.heapsize=128m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=2m
dalvik.vm.heapmaxfree=8m
2). For device(s) with 2GB of RAM
dalvik.vm.heapstartsize=8m
dalvik.vm.heapgrowthlimit=128m
dalvik.vm.heapsize=256m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=2m
dalvik.vm.heapmaxfree=8m
3). For Devices with 3GB or higher or RAM
dalvik.vm.heapstartsize=8m
dalvik.vm.heapgrowthlimit=256m
dalvik.vm.heapsize=512m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=512k
dalvik.vm.heapmaxfree=8m
Remember the more ram you have the higher the heapsize will be keep in mind not all device(s) with higher ram go above 512m do your research on your device if your device has more then 3GB to see if your heapsize is bigger then 512m.
Additional info:
For those who are wondering the difference between 512m & 512k is the 512m is bigger than 512k.
512k is similar to what 512m is, but the big difference is since 512k is not 512m it is measured in KB (Kilobytes) compared to 512m witch is measured by MB (Megabytes) the 512k value is only used in the heapminfree value witch declares how much free dalvik memory should be reserved if in case the space is needed, it can also be used in heapmaxfree as long as the value in heapminfree is NOT higher then what is placed in heapmaxfree
Dalvik VM is a unique Java Virtual Machine Runtime used to distribute the amount of memory each application is given such as the following that you see in your "build.prop"
dalvik.vm.heapstartsize=8m
dalvik.vm.heapgrowthlimit=192m
dalvik.vm.heapsize=512m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=2m
dalvik.vm.heapmaxfree=8m
As you can see each line is important for dalvik vm to work and without a single one makes your system unbootable.
"dalvik.vm.heapsizestart=" this line is based upon how dalvik will start in the size it is set in your build.prop file, depending how much it's given will determin how fast of a rate dalvik will read think of this as it's percentage of rate transfer when setting this, the default value is "8m" you can set it beyond the default value but becareful depending on your heapsize limit can break and make your os unbootable, we recommend you not to set it above "10m" if you want you can go up to the max 16m as your starting point but this can cause instability and prevent apps to load requiring you to restart your device to fix it!.
Let's talk about "dalvik.vm.heapgrowthlimit=" this value is the about of memory given to each app depending how the application is coded it may override this to use the full amount of memory needed to run the application. For example say your limit is "128m" but your heapsize is 256m though "128m" is half of 256m this.means apps are given 128m out of 256m to use and lowering the amount of physical ram to be used. We recomend to always use half of your Dalvik VM in order to get the best optimal config for your device.
Let's talk about ”dalvik.vm.heapsize=" this line is your primary amount of memory dalvik is given to the OS this is improtant because it uses the amount to reserve in your Physical ram usage, for example say your device has 3GB of physical ram and your heapsize is set as "512m" no matter how your heapgrowth limit is set dalvik will always reserve 512MB extra ram in case of an emergency when ram is needed for operations that uses dalvik VM this can be useful for app performance but utilizes more ram and giving you less free ram for you to use. If you want to free more ram you can set this to a lower dalvik vm size but not too low and don't go under 128m as dalvik has a requirement witch is currently unknown and is unsure if its safe.
Let's talk about "dalvik.vm.heaptargetutilization=" many devices uses this to give a delay when dalvik vm start on device boot. The default value is "0.75" the higher the value the longer dalvik has to be delayed to start, but the lower you set the value at the faster the post process will be!
Let's now talk about "dalvik.vm.heapminfree=" & ”dalvik.vm.heapmaxfree=" these are important however what these lines do is force dalvik vm to clear and keep a certain amount of memory free in case of an emergency but does nit affect how ram is utilized it's just there to save a certain amount when needed!. The default for the min is "2m" and the max is "8m".
So if you have a device that has lessthen 4GB of ram and want to save a good amount of ram for you to use use these values below:
dalvik.vm.heapstartsize=10m
dalvik.vm.heapgrowthlimit=64m
dalvik.vm.heapsize=128m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=2m
dalvik.vm.heapmaxfree=8m
Just ensure your wipe dalvik and cache when you apply these values!
Keep in mind that all devices use dalvik differently, for safety do not change your "dalvik.vm
heapsize=" below 512m as it can cause a bootloop unless your system has a vlue preset for you. Their are some cases when you need to alter your heap size depending on how you change your dalvik VM values
If your device has 3GB or higher ram your values.to get the best performance is show below:
dalvik.vm.heapstartsize=16m
dalvik.vm.heapgrowthlimit=256m
dalvik.vm.heapsize=512m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=512k
dalvik.vm.heapmaxfree=8m
If your planning to alter the heap size ensure you have half of the heapsize given to the heapgrowthlimit for exampler 512m÷2=256m, 128m÷2=64m, 256m÷2=128m & 64m÷2=32m
Never give less or higher amounts of your heapsize to your heapgrowthlimit this can cause system instablilty
Here is a chart showing what heapsize your device(s) should have based on your device(s) ram:
Remember you can increase the heapstartsize to 16m if you wish the higher itis the better performance you will receive, but the con about this is you may run out of memory quicker then normal so we recommend not to go above 16m.
1). For devices with 1GB of RAM
dalvik.vm.heapstartsize=8m
dalvik.vm.heapgrowthlimit=64m
dalvik.vm.heapsize=128m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=2m
dalvik.vm.heapmaxfree=8m
2). For device(s) with 2GB of RAM
dalvik.vm.heapstartsize=8m
dalvik.vm.heapgrowthlimit=128m
dalvik.vm.heapsize=256m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=2m
dalvik.vm.heapmaxfree=8m
3). For Devices with 3GB or higher or RAM
dalvik.vm.heapstartsize=8m
dalvik.vm.heapgrowthlimit=256m
dalvik.vm.heapsize=512m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=512k
dalvik.vm.heapmaxfree=8m
Remember the more ram you have the higher the heapsize will be keep in mind not all device(s) with higher ram go above 512m do your research on your device if your device has more then 3GB to see if your heapsize is bigger then 512m.
Additional info:
For those who are wondering the difference between 512m & 512k is the 512m is bigger than 512k.
512k is similar to what 512m is, but the big difference is since 512k is not 512m it is measured in KB (Kilobytes) compared to 512m witch is measured by MB (Megabytes) the 512k value is only used in the heapminfree value witch declares how much free dalvik memory should be reserved if in case the space is needed, it can also be used in heapmaxfree as long as the value in heapminfree is NOT higher then what is placed in heapmaxfree
Last edited by a moderator: