[Q] [CM9/teamhacksung ICS] question about heap size change - Galaxy S I9000 Q&A, Help & Troubleshooting

Hello there,
two days ago i flashed teamhacksung's ICS aka CM9.
Firstday: everything smooth and okay
Second day: launcher starts to FC here and there, in the cm9 thread i found this "guide" (to bad that i just copied it to an txt and didnt copied the link...)
Code:
1. download Rom Toolbox from market, install, open
2.change to performance tab
3.build.prop tweaks
4.VM heap size to 48 mb
5. program will ask to reboot do it, go to toolbox again and choose Auto Memory Manager
6.choose presets->default
7.reboot and/or wipe cache
i downloaded Rom Toolbox and checked heapsize, currently its 128MB. So my question, is step 4 meaning to increase heap size from somthing default (<48mb) to 48mb or is it meant to decrease from current 128 to 48 mb? if i'm not remembering wrong, i had to increase heap for my tomcat server after having problems. so, (if its meant to) why decrease heap in android from 128 to 48? a short explanation would be cool.
I hope someone can help me with the heapsize question, i dont really want to make it even worse
Thanks in advance

Maybe will help u:
VM Heap Size
The heap is an area of dynamic memory allocated to programs. With a larger heap size, there is more memory for the program and the garbage collector can run more efficiently. Therefore, it is possible to get better performance by setting a larger VM heap size.
However, if you set it too high, you can run out of free memory which can trigger swapping which will degrade performance. Therefore the VM setting is a trade-off.
The optimal value will depend on the RAM on the device as well as the programs and usage patterns, therefore the optimal setting can often only be determined by the user experimentally.
Default value: varies between devices
Click to expand...
Click to collapse
source: droidgram[dot]com

It should be noted that in the ICS builds the build.prop now contains 3 variables pertaining to the heap size:
Code:
dalvik.vm.heapgrowthlimit
dalvik.vm.heapsize
dalvik.vm.heapstartsize
With the size in the tweaker referring to dalvik.vm.heapsize, the other two are new.
I have no clue as to what any of this means but I thought I should mention it.

Thanks for this informations, i'll try a lower value than 128

dodgex said:
Thanks for this informations, i'll try a lower value than 128
Click to expand...
Click to collapse
+ this Archive will help u :
http://forum.xda-developers.com/archive/index.php/t-1025915.html

damn...
it was way smoother (at least what i saw until now)...
but at least mp3 player (default music app) does not start...
first i set to 64m but as i saw that mp3 didnt work i thougt, maybe to less... i increased to 96 but here was mp3 also not working, after setting back to 128, still not working mp3...
as in the guide, i always cleared cache after changing value.
someone got an idea? do i have to reflash cm9?

Related

Wizard ROM Ported to BA - Performance Improvements

I've been working with the Wizard Port which mamaich has done, and have run into the 'normal' performance issues with WM2005 which most everyone has encountered.
Since our devices have so much RAM available, IMHO it should no longer be used for storage. Instead we can utilise huge SD Cards for all storage needs. We need one for the EXTROM installation anyways, and the Batteries will drain the same whether you're using 32Mb or 128Mb of your RAM.
My main focus has therefore been to improving RAM usage for Caching and Filesystem access (StorageManager). I'm trying things out to see if there are any improvements which can be done simply through registry changes. I'd felt I was relatively successful on my Himalaya (using BuzzROM 1.60c) with this style of performance tweak, so now it was time to try it out on the new Blue Angel.
I'm primarily concerned with stability and performance, as well as usability and resources. My focus has therefore been to make extensive use of the RAM Disk for all temporary elements (why make them persistant?), to add appropriate levels of caching and to set an appropriate number of buffers for all memory and filesystem access. My goal is to use the RAM to it's full potential - 32Mb for temp/ramdisk, and as much as beneficial for Cache/Buffers/Paging/etc. leaving the remainder (64Mb+) available for applications to use.
For this I've been scanning the forums and have gleaned the 'pearls of wisdom' from many developers who have been trying to improve the performance of their devices. For everything which I've found, I've researched the origins of the registry modification, and have verified (to the best of available information) that the flags/settings/values or other parameters as I've changed them in the attached registry files below, are legal and valid.
I've geared things to be a 'workhorse' device - i.e. the initial application open/start may be slightly slower (first run), but once the application is up and running, it responds very quickly. The point is then to keep all the commonly used applications running and using the RAM, not to try to have untold Mb of RAM free. All those 'Task OK Button Close' are a real waste when using WM2005 now.
If you do have some memory intensive application, then you may need to close applications, but with 64MB+ free I couldn't think of what you might want to run (except a game or something else 'useful'). The "Memory" Control Panel is all you'd ever need for this.
Ok ... enough rambling about what I've tried to achieve ... on to the details.
Device Configuration I'm using:
- mamaich Wizard ROM v2a (unmodified)
- Model No.: PH20B
- Model Name: iMate PDA2K
- ROM Version: 5.03.02 WWE
- ROM Date: 03/02/05
- Radio Version: Radio 1.15.00
- Protocol Version: 1337.45
- CPU: Intel(R) PXA263
- Speed: 400 Mhz
- RAM Size: 96 Mb
- Flash Size: 32 Mb
- Flash Chip Type: 28F128K3
- Storage Size: 60.30 Mb
Attached below are two principal registry files: Performance.reg, and Customize.reg
Performance is specifically for improving the Performance of the device.
Customize is specifically for setting 'default' customizations, which are user/owner preferences.
These can be imported using your favourite registry editor (I'm using Resco) and you can see what (if any) difference to performance they can make.
Code:
Performance.reg Details:
[HKEY_CURRENT_USER\ControlPanel\Phone]
- Disable Phone Sleep. May help with Bluetooth disconnect issues.
[HKEY_CURRENT_USER\ControlPanel\Sounds\TTSAnnounce]
- Move Voice Command Caller Identification into RAM Disk
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
- Move all of IE's Temporary Files into RAM Disk
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
- Give IE More Connections
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
- Give IE More Threads
[HKEY_LOCAL_MACHINE\ControlPanel\WiFi]
- Slow down the WiFi Scanning Interval
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\QwertyKey]
- Improve Keyboard Responsiveness
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\WaveDev]
- Improve Audio Responsiveness
[HKEY_LOCAL_MACHINE\Security\Policies\Policies]
- Disable Signing
[HKEY_LOCAL_MACHINE\Software\HTC\XPanel]
- Move Volatile elements to RAM Disk
[HKEY_LOCAL_MACHINE\System\FileSys]
- Move all Temporary Items to RAM Disk
[HKEY_LOCAL_MACHINE\System\GWE]
- Disable Animation
[HKEY_LOCAL_MACHINE\System\GWE\Menu]
- Disable Animation
[HKEY_LOCAL_MACHINE\System\StorageManager\Filters\fsreplxfilt]
- Set the File & Directory Exclusions for the Filesystem Filter
[HKEY_LOCAL_MACHINE\System\StorageManager\...]
- Tweak all the StorageManager settings to improve performance
Code:
Customize.reg Details:
[HKEY_LOCAL_MACHINE\ControlPanel\AdminPassword]
- Enable Admin Password Control Panel
[HKEY_LOCAL_MACHINE\ControlPanel\GPS Settings]
- Move GPS Control Panel to Connections
[HKEY_LOCAL_MACHINE\System\GWE]
- Make THIN scroll bars (get a bit more screen space - I'm accurate with a stylus)
[HKEY_CURRENT_USER\ControlPanel\Backlight]
- Default Backlight Settings
[HKEY_CURRENT_USER\ControlPanel\Comm]
- Default USB Communications
[HKEY_CURRENT_USER\ControlPanel\Notifications\ShellOverrides]
- Set the Volume
[HKEY_CURRENT_USER\ControlPanel\PhoneExtendFunction]
- Set PAP and Class 8 (4 Receive, 1 Transmit) GPRS Settings
[HKEY_CURRENT_USER\ControlPanel\Sip]
- Set SIP Input Word Suggestion Defaults
[HKEY_CURRENT_USER\ControlPanel\SoundCategories\Ring]
- Set the Volume
[HKEY_CURRENT_USER\ControlPanel\SoundCategories\RingPreview]
- Set the Volume
[HKEY_CURRENT_USER\ControlPanel\Volume]
- Set the Volume
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
- Set some IE defaults (Google, History, Zoom, etc.)
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
- Set some IE Messages
[HKEY_LOCAL_MACHINE\ControlPanel\Phone]
- Phone Flags
[HKEY_LOCAL_MACHINE\Explorer]
- Show all Files
[HKEY_LOCAL_MACHINE\Software\HTC\Camera\AppDefSettings\P3]
- Disable Recording Time Limit
[HKEY_LOCAL_MACHINE\Software\HTC\Camera\AppDefSettings\P4]
- Enable additional Contacts Photo Mode
[HKEY_LOCAL_MACHINE\Software\Microsoft\Inbox\Svc\SMS]
- Change the SMS Text Message Confirmation
[HKEY_LOCAL_MACHINE\Software\Microsoft\Obex]
- Disable OBEX
[HKEY_LOCAL_MACHINE\Software\Microsoft\Pocket MSN]
- Permit any email address in Pocket MSN
[HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\TaskBar]
- Clock in Taskbar
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
- ClearType in IE
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\AdvancedCPL]
- Enable Microphone AGC
*** NOTE: I forgot to mention to create the following directories in the RAM Disk in order to properly support things! ***
Cache
Cookies
History
Volatile
Improvements, comments, discussion and changes to these values (or adding more) is HIGHLY encouraged. We'll all benefit from faster machines, without needing to overclock them into instability. And if something is obviously WRONG in these settings, point out the mistake! 8)
Hope this helps others with their performance concerns.
Regards,
Tuatara.
*********************************************************
UPDATE: Version 2 of the Scripts: 5/Feb/2006
Performance:
1). Corrected the WaveDev Priority, and the QwertyKey Priority to values which will produce better performing results across all requirements.
2). Removed requirement for \Ram Disk32\Volatile since the \Volatile directory is NOT automatically created. This can lead to problems if the RAM gets corrupted and or is reformatted. Now all temporary (Volatile) Files have been placed in the root folder "\Ram Disk32\" instead.
NOTE: This means you DO NOT need to create any directories! All cache directories will automatically be created as required by IE on startup!
3). BufferSize has been reduced to a more 'sensible' value of 1024 buffers.
4). Added "EnableDataCacheWarm", "EnableFatCacheWarm", and "PathCacheEntries" to the filesystem specifications.
Customize:
1). Moved Key Deletion to END of registry script, since some registry imports fail to delete these keys properly. Can be done manually.
2). Changed Default Search Page to a more Mobile Friendly GOOGLE search page, which permits better searching of results.
3). Removed the /GWE elements which shrunk down the scroll bars, as I did begin to find it tiring to aim more carefully to scroll things.
4). Removed the OBEX Disable, since this would probably confuse more than help.
Filesys.exe and StorageManager Registry Settings
mamaich said:
Some registry settings regarding StorageManager profiles are read during the first stage of boot process from constant boot.hv file located in XIP section of a ROM, and not from the registry you've changed. For example all drivers that are loaded during "Bootphase" 0 or 1 may ignore all settings that are not present in boot.hv. For example you can change "MountFlags" value to anything, and it would be ignored. I also think that cache size settings for TRUEFFS_DOC and MSFlash are read from boot.hv, because setting the cache size in registry to 16Mb (you cannot allocate more than 32Mb in one chunk) does not decrease the free memory size. The same is for "XIP" and "Flags" settings. The filesystem driver may reread these settings from registry when it becomes available, but I don't think so.
The only filesystem driver that reads your changed settings is SD-Card driver. It is loaded after registry is fully functional.
By the way, it is possible to mount root directory of our device to SD-Card, similar to MPX200.
Click to expand...
Click to collapse
I've had a look into this, and from my understanding the StorageManager mounts the partitions (keeping all the flags, etc.) as from boot.hv, but once the filesystem is up and running, it appears to reload in the filesystem (not partition) registry keys from the user registry, when it mounts the portions of the user registry hive at the end of the process.
Filesys.exe Boot Process
http://msdn.microsoft.com/library/d.../wcemain4/html/cgconFilesysexeBootProcess.asp
Although I could be wrong about this ... it 'appeared' to have made a slight improvement. Very hard to say though if it is reloading the registry information.
A better answer might be to modify the boot.hv and then check the performance.
More on this shortly ...
Regards,
Tuatara
Thread Times and Quantum Theory ...
mamaich said:
Tuatara said:
...
Badly written code ... maybe ... most likely it's poor blocking / thread safety implementations which are causing the issues. Interrupt level and thread level access to the data buffers, taken from legacy 2003/SE code could be at fault here. ...
Click to expand...
Click to collapse
Occasionally I've found this page - http://blogs.msdn.com/sloh/archive/2005/05/27/422605.aspx
It has an interesting code at the bottom. I've already made a program that can hook system calls, I'll try to hook EnterCriticalSection and WaitForMultipleObjects and force them to use that code. Maybe this would reduce the occasional lockdowns.
I've also managed to find the value of default thread quantum on our device. It is 0x4b == 75 milliseconds (WinCE default is 100ms). I.e. we have about 13 task switches per second. Decreasing the value can potentially make our device more responsive, but would add some overhead.
Here is the address to patch in nk.nba (address: old_value new_value):
00207B94: 4B 20
this would set a thread quantum to 0x20 == 32 milliseconds, thread switching would be 31 times per second.
Currently I'm testing this patch, if it is efficient - i'll integrate it into newer ROMs.
Click to expand...
Click to collapse
Modifying the Quantum Times is an excellent thought. I remember when this was done for Win2K by SysInternals (tweaking Server into Workstation & vice-versa). Reducing the quantum (in theory) should improve the performance, unless there are too many 'busy' applications executing. Interrupt service requests, and thread unblocking to service them could really kill the 'Quantum Theory' if they come too 'thick and fast'.
It would mean that USB/GSM data is serviced quickly, but application responsiveness (user perception) actually goes down slightly overall.
BUT !!!! the upside of this would be that the dreaded 'lockup' events won't happen anymore, since data is ALWAYS serviced, and the application has (in effect) a lower priority timeslice in which to execute. You will never have a high-priority thread blocking for extended periods, locking the 'foreground' application while it's busy servicing the data requests.
Let me know your initial testing results - I'd then go ahead and modify my ROM if you feel there is any improvement of note. Similarly, I'd probably try to also go about modifying the boot.hv for StorageManager registry settings and see how far that can get things.
Cheers,
Tuatara
Re: Thread Times and Quantum Theory ...
Tuatara said:
mamaich said:
Tuatara said:
...
Badly written code ... maybe ... most likely it's poor blocking / thread safety implementations which are causing the issues. Interrupt level and thread level access to the data buffers, taken from legacy 2003/SE code could be at fault here. ...
Click to expand...
Click to collapse
Occasionally I've found this page - http://blogs.msdn.com/sloh/archive/2005/05/27/422605.aspx
It has an interesting code at the bottom. I've already made a program that can hook system calls, I'll try to hook EnterCriticalSection and WaitForMultipleObjects and force them to use that code. Maybe this would reduce the occasional lockdowns.
I've also managed to find the value of default thread quantum on our device. It is 0x4b == 75 milliseconds (WinCE default is 100ms). I.e. we have about 13 task switches per second. Decreasing the value can potentially make our device more responsive, but would add some overhead.
Here is the address to patch in nk.nba (address: old_value new_value):
00207B94: 4B 20
this would set a thread quantum to 0x20 == 32 milliseconds, thread switching would be 31 times per second.
Currently I'm testing this patch, if it is efficient - i'll integrate it into newer ROMs.
Click to expand...
Click to collapse
Modifying the Quantum Times is an excellent thought. I remember when this was done for Win2K by SysInternals (tweaking Server into Workstation & vice-versa). Reducing the quantum (in theory) should improve the performance, unless there are too many 'busy' applications executing. Interrupt service requests, and thread unblocking to service them could really kill the 'Quantum Theory' if they come too 'thick and fast'.
It would mean that USB/GSM data is serviced quickly, but application responsiveness (user perception) actually goes down slightly overall.
BUT !!!! the upside of this would be that the dreaded 'lockup' events won't happen anymore, since data is ALWAYS serviced, and the application has (in effect) a lower priority timeslice in which to execute. You will never have a high-priority thread blocking for extended periods, locking the 'foreground' application while it's busy servicing the data requests.
Let me know your initial testing results - I'd then go ahead and modify my ROM if you feel there is any improvement of note. Similarly, I'd probably try to also go about modifying the boot.hv for StorageManager registry settings and see how far that can get things.
Cheers,
Tuatara
Click to expand...
Click to collapse
I've done this modification on nk.nba and reflashed my device and i can't see any difference so far. Will do some more testing later.
"[HKEY_LOCAL_MACHINE\Software\Microsoft\Obex]
- Disable OBEX"
Why?
To which point are these tweaks actually noticeable?
Don't get me wrong, i appreciate greatly all the research done arround this, but last time i applied some reg settings (like cache, etc), that didn't improve wm5 speed to the point to find it usable..
I mean, time required to open tmail.exe, the lag in writing sms, lag before answering a call, wifi multitask use, and program responsiveness in general, can one say that with these tweaks the improvements are significative?
I mean, i've kind of given up on wm5 because of these things (although i've reflashed it many times, hope is last thing to die )
Will running some benchmarking software (before) and (after) the registry tweaking show any improvement?
I'm trying to find some (preferably free) benchtest software for WM5 right now. Will update this thread if I find it.
I'm using Wizard v2a on SX66 with Radio 1.15 myself.
Hmm, actually i can feel a little speed up, not much, but it is faster a bit indeed.
KTamas said:
"[HKEY_LOCAL_MACHINE\Software\Microsoft\Obex]
- Disable OBEX"
Why?
Click to expand...
Click to collapse
Ah - legacy stuff for the defaults I need here. Most of our users don't have Bluetooth Headsets, so by default it is disabled to extend battery life. I should have removed that before posting - but then again, maybe it's useful for someone.
d3vil said:
To which point are these tweaks actually noticeable?
Click to expand...
Click to collapse
As with anything which is NOT modifying the underlying issues, these registry tweaks will only produce SOME improvement in the performance. There is a limit to how much you can cache, buffer, move into RAM, or maintain available.
d3vil said:
Don't get me wrong, i appreciate greatly all the research done arround this, but last time i applied some reg settings (like cache, etc), that didn't improve wm5 speed to the point to find it usable..
Click to expand...
Click to collapse
Part of the reason for this is the abundance of mis-information about the registry tweaks. I've seen posts where for example the Flags settings for StorageManager have been specified in Hex, someone else copied them in decimal, and then these have been imported as hex again - leading to some 'random' FATFS configuration setting which would cause problems. Or other posts where the buffer sizes are set to 64Mb or larger?!!? And you would get no useful benefit from this.
d3vil said:
I mean, time required to open tmail.exe, the lag in writing sms, lag before answering a call, wifi multitask use, and program responsiveness in general, can one say that with these tweaks the improvements are significative?
Click to expand...
Click to collapse
For my expectations and usage, these tweaks do help the performance of applications. This does take into account some assumptions though - such as I do not 'Terminate' the application, but leave them running as intended. All temporary elements are placed onto the RAMDisk. All applications are attempted to be executed from RAM. etc.
d3vil said:
I mean, i've kind of given up on wm5 because of these things (although i've reflashed it many times, hope is last thing to die )
Click to expand...
Click to collapse
It all depends on your expectations. Mine are to have better Word, Excel, Outlook, and Exchange integration, incl. Push Email and ActiveSync support. Can't get that with WM2003, so I'm working with what I can, and making it run as smoothly/quickly/stably as possible.
Cheers,
Robert.
mr_ding said:
Will running some benchmarking software (before) and (after) the registry tweaking show any improvement?
Click to expand...
Click to collapse
Benchmarking software is unfortunately inherently flawed. It can only measure what it is attempting to execute - which in the majority of cases does not reflect real-life usage.
These tweaks aren't necessarily designed to speed up the first execution of an application, but are to keep that application ready and available for the next time it is needed and used.
It would be hard to design a benchmark which could replicate everyday usage. The best answer is ... if you've been using your device for a while, and have noticed a few problems ... try the registry settings and see if the issues are less pronounced, or are eliminated entirely.
mr_ding said:
I'm trying to find some (preferably free) benchtest software for WM5 right now. Will update this thread if I find it.
Click to expand...
Click to collapse
I've applied similar settings to my Himalaya and have had very good performance and results from them. I've barely needed to reset the device (maybe 5 times in as many months) and have adapted my usage, or configured my way around most of the flaws. Time to do the same for the Blue Angel Wizard v2a. (or b)
Anyways ... the next step on my list is to make a EXTROM which auto-configures the devices with all the settings and applications we need for our users. mamaich's cfg.txt makes this so easy to do. 8)
Regards,
Robert.
thank you for the work.
one little question, what do i do with the files?
and there is in the all settings the boot image ?
I'm not sure if it is mamaich's very new hexa editing in ROM or your tweaks but my problems with sound are back Will reflash the original Wizard2BA and do a hardreset i guess.
Tuatara said:
mr_ding said:
Will running some benchmarking software (before) and (after) the registry tweaking show any improvement?
Click to expand...
Click to collapse
Benchmarking software is unfortunately inherently flawed. It can only measure what it is attempting to execute - which in the majority of cases does not reflect real-life usage.
These tweaks aren't necessarily designed to speed up the first execution of an application, but are to keep that application ready and available for the next time it is needed and used.
It would be hard to design a benchmark which could replicate everyday usage. The best answer is ... if you've been using your device for a while, and have noticed a few problems ... try the registry settings and see if the issues are less pronounced, or are eliminated entirely.
mr_ding said:
I'm trying to find some (preferably free) benchtest software for WM5 right now. Will update this thread if I find it.
Click to expand...
Click to collapse
I've applied similar settings to my Himalaya and have had very good performance and results from them. I've barely needed to reset the device (maybe 5 times in as many months) and have adapted my usage, or configured my way around most of the flaws. Time to do the same for the Blue Angel Wizard v2a. (or b)
Anyways ... the next step on my list is to make a EXTROM which auto-configures the devices with all the settings and applications we need for our users. mamaich's cfg.txt makes this so easy to do. 8)
Regards,
Robert.
Click to expand...
Click to collapse
I guess you don't use the (SPB Plus) feature when pressing (x) button, it automatically closes the application, right?
I will try your tweak tonight/tomorrow and uninstall/disable SPBPlus feature on auto-closing application myself.
Typically I run Mapopolis (sometimes with BT GPS), phone, sudoku, and tcpmp (watch divx movies). Will it really be okay with all these applications running in the background without closing them?
KTamas said:
I'm not sure if it is mamaich's very new hexa editing in ROM or your tweaks but my problems with sound are back Will reflash the original Wizard2BA and do a hardreset i guess.
Click to expand...
Click to collapse
Interesting ... it could well be either at fault. The only change I've made for the Sound was to set the Audio Priority to a sensible value. You could readily change the value of Priority256 for the sound and see if that makes a difference.
Alternatively, with the quantum time for a thread being lowered, it is possible that there is not enough time for audio decoding to be performed per quantum, which will lead to stuttering as there are other waiting tasks to be serviced.
For the audio, you could try two things:
1). Change the value of Priority256 for HKEY_LOCAL_MACHINE\\Drivers\\BuiltIn\\WaveDev (lower = higher priority = serviced more often)
2). Change the quantum time to something larger (more audio processing per thread switch)
Try patching nk.nba (address: old_value new_value):
00207B94: 4B 64
This would set the thread quantum to 100 milliseconds (MS Recommended = 10 times per second)
You could even be so radical as to try 120 milliseconds (= 78, which would give you 8 1/3 switches per second)
You may find that the audio more responsive with larger processing time blocks, and higher priority. Again, it really depends on what your requirements are.
NOTE: A Hard Reset isn't required for these changes. This is only changing how things execute, not where things are executing from. There should be no need to hard reset & format.
Regards,
Tuatara.
Tuatara said:
KTamas said:
I'm not sure if it is mamaich's very new hexa editing in ROM or your tweaks but my problems with sound are back Will reflash the original Wizard2BA and do a hardreset i guess.
Click to expand...
Click to collapse
Interesting ... it could well be either at fault. The only change I've made for the Sound was to set the Audio Priority to a sensible value. You could readily change the value of Priority256 for the sound and see if that makes a difference.
...
Click to expand...
Click to collapse
I don't have sound issues. But I have Priority256 set to 0x80 (128). Tested on PocketPlayer, sound of incoming call, Toppler game (without Priority256=0x80 it had clicking sounds).
I recommend using 0x80, it is a well-tested value since GB-tweak for WM2003. In this case wavedev driver would not steal time from system services, and priority is high enough to eliminate sound pauses.
I'm still testing my patch, and had no occasional slowdowns yet. The device is responsive even when you are running CPU benchmarks. Previously it lost Activesync connection, ignored touchscreen taps, etc.
Re: Filesys.exe and StorageManager Registry Settings
Tuatara said:
I've had a look into this, and from my understanding the StorageManager mounts the partitions (keeping all the flags, etc.) as from boot.hv, but once the filesystem is up and running, it appears to reload in the filesystem (not partition) registry keys from the user registry, when it mounts the portions of the user registry hive at the end of the process.
Filesys.exe Boot Process
http://msdn.microsoft.com/library/d.../wcemain4/html/cgconFilesysexeBootProcess.asp
Click to expand...
Click to collapse
It is easy to find whether driver rereads registry or not. Just search for "SYSTEM/BOOTPHASE2" unicode string inside it. None of the drivers wait for this event, so we can assume none of them rereads registry. Only filesys.exe, devmgr.dll and pm.dll use this event.
I don't know when filesystem filters are loaded, but they may be loaded at the bootphase 2, so fsreplxfilt.dll can use your new settings. But this should be checked.
You can also try to set invalid values to some settings, so that device would have great slowdown or would not boot at all. Or you can set cache size to something near 32Mb, and check the size of used memory. If it would be decreased, or device would react on your settings (i.e. would not boot) - the driver rereads the registry.
mamaich said:
Tuatara said:
KTamas said:
I'm not sure if it is mamaich's very new hexa editing in ROM or your tweaks but my problems with sound are back Will reflash the original Wizard2BA and do a hardreset i guess.
Click to expand...
Click to collapse
Interesting ... it could well be either at fault. The only change I've made for the Sound was to set the Audio Priority to a sensible value. You could readily change the value of Priority256 for the sound and see if that makes a difference.
...
Click to expand...
Click to collapse
I don't have sound issues. But I have Priority256 set to 0x80 (128). Tested on PocketPlayer, sound of incoming call, Toppler game (without Priority256=0x80 it had clicking sounds).
I recommend using 0x80, it is a well-tested value since GB-tweak for WM2003. In this case wavedev driver would not steal time from system services, and priority is high enough to eliminate sound pauses.
Click to expand...
Click to collapse
I initially had the setting as 128 (0x80) as well, but had some occasional issues with Voice Command & pauses/delays. I increased the priority and the issue appeared to be resolved. However this is assuming short audio playback streams, not continuous ones, and I had changed things further since that issue arose. Time to retest.
Probably setting the value back to 0x80 in the registry is the best option as mamaich recommends. It would be a general solution for everyone. Similarly, I've found the keyboard better with the tweak, but this too could be reduced in priority - possibly 0xA0 (160) would be a more 'adequate' value to utilise.
Code:
Recommend to Change: Performance.reg to contain:
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\QwertyKey]
"Priority256"=dword:000000A0
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\WaveDev]
"Priority256"=dword:00000080
mamaich said:
I'm still testing my patch, and had no occasional slowdowns yet. The device is responsive even when you are running CPU benchmarks. Previously it lost Activesync connection, ignored touchscreen taps, etc.
Click to expand...
Click to collapse
Sounds good ... possibly the Priority256 setting for the WaveDevice was too high - especially with the smaller quantum value, leading to stuttering (somehow). Hopefully KTamas has some time to see which direction solves the problem in the audio.
Re: Filesys.exe and StorageManager Registry Settings
mamaich said:
Tuatara said:
I've had a look into this, and from my understanding the StorageManager mounts the partitions (keeping all the flags, etc.) as from boot.hv, but once the filesystem is up and running, it appears to reload in the filesystem (not partition) registry keys from the user registry, when it mounts the portions of the user registry hive at the end of the process.
Filesys.exe Boot Process
http://msdn.microsoft.com/library/d.../wcemain4/html/cgconFilesysexeBootProcess.asp
Click to expand...
Click to collapse
It is easy to find whether driver rereads registry or not. Just search for "SYSTEM/BOOTPHASE2" unicode string inside it. None of the drivers wait for this event, so we can assume none of them rereads registry. Only filesys.exe, devmgr.dll and pm.dll use this event.
I don't know when filesystem filters are loaded, but they may be loaded at the bootphase 2, so fsreplxfilt.dll can use your new settings. But this should be checked.
Click to expand...
Click to collapse
Haven't had the chance yet to decompose the ROM Image, but will get to that shortly - shame that MS doesn't make the process description clearer. I will try updating the boot.hv with changed settings and see what results that can bring.
mamaich said:
You can also try to set invalid values to some settings, so that device would have great slowdown or would not boot at all. Or you can set cache size to something near 32Mb, and check the size of used memory. If it would be decreased, or device would react on your settings (i.e. would not boot) - the driver rereads the registry.
Click to expand...
Click to collapse
From what I could tell in my experimenting, outlandish (or illegal) settings are limited by the driver itself. i.e. trying to set a CacheSize of 64Mb is met with an upper limit to the CacheSize of 2Mb anyways - regardless of the registry value. This is (partially) why some ridiculous values published by others still work, and additionally why increasing those values doesn't bring any further gains.
Each tweak I've done for StorageManager has increased the memory usage requirements, so I (strangely) still think that there is some mystical reloading of the registry information happening. Maybe it is solely the filters which affect this - maybe it is the loading of the filters which resets only the cache/buffer sizes (to limits), since the filesystems are already mounted.
Regardless, I will try the boot.hv, and the Quantum Time Change sometime soon.
jimp said:
This might be irrelevant, but I had most versions of wm5 on my BA (except the himalaya port). I'm having some issues with MS VoiceCommand.
The (leaked) original (slow) version worked ok.. The wizard port worked even better so did v2.. when i put v2a however (with 32M ramdrive), voice command started acting strange.
The whole device seems abit odd.. when i remove the device off its cradle its just SO SLOW.. as if its searching to sync.. anyway back to VC.
Its very wierd.. ie.. i say Call Harry .. and it matches NAT .. HOW ON EARTH!? Or I say.. call nicole.. and it matches TAXI! . This was NOT an issue with previous wm5 roms. I dont run any other software on the device so I dont know what's causing this. Could it be the ramdrive?
Note.. VC rarely gets the match right anymore.. where as before it RARELY got it wrong.
Click to expand...
Click to collapse
I'm still testing with VoiceCommand, and have had to change a few things to get suitable performance. I haven't as yet made the Quantum Timing change, but I'll evaluate that and see how it goes.
Anyways, you might wish to try the following CAB file. I can't remember who created it but I've been using it along with the RAM Disk for the CallerID Wave File Generation, and Voice Command has been working well. It makes a few registry entries, and I believe replaces some configuration elements - haven't disassembled it as yet.
jimp said:
Note2.. MP3 playback skipping like mad.. (just noticed) (and only on certain mp3s.. not all STRANGE).
Click to expand...
Click to collapse
Additionally, it would be recommended to keep the WaveDev Priority at 128, since KTamas has reported stuttering when it was set at 96 (as in the registry script in the first post)
(Time! I just need more time!!! )
Code:
[HKEY_CURRENT_USER\ControlPanel\SoundCategories\VoiceCommand1]
"AttenuationCategory"=dword:00000001
"InitVol"=dword:00000005
"Script"="p"
[HKEY_CURRENT_USER\ControlPanel\Sounds\TTSAnnounce]
"Sound"="\\RAM Disk32\\Volatile\\TTSCallerID.wav"
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\WaveDev]
"Priority256"=dword:00000080

ShadowROM on IMGFS

Hi Guys,
Something that's been bothering me for a while now, hopefully someone can explain or investigate where I've failed to find the answer.
The registry key
HKLM\System\StorageManager\IMGFS\ShadowROM = 1
should cause ROM to be "shadowed", that is, copied to RAM and executed from there instead of the 32mb flash.
If that's the case, why is it that switching this key to 0 not free up 32mb of RAM, and setting it to 1 does not eat 32mb of ram? In fact I've seen no change in memory usage between the 2 settings.
I've tested this setting in TuMa 1.3 and Ivan 3.x and 4Rx. Is it possible that this setting does nothing in the version of IMGFS.dll used, or that this key is set to 0 in the smaller default registry and untouchable without re-cooking the ROM?
Or does IMGFS shadowing work differently to the way I've described it?
All executable files from IMGFS are decompressed to RAM and run from there. Nothing can be run directly from IMGFS (unlike was in older OS versions). I don't know the meaning of this key, and there are no noticeable differences when changing it.
Confirmed, this is a dead key. Even deleting it has no effect whatsoever on memory use or performance.

Compcache / Linux-swap

Run sh /system/bin/swap -s to check swap status and other mod values.
Ok so I did this to check on my stuff, cause i wanted to make a compcache.
*** CompCache ***
compcache_en=0
cc_memlimit=16
cc_disksize=32
cc_backingswap_en=0
cc_backingswap=/dev/block/mmcblk0p3
swappiness=30
*** Linux Swap ***
linux_swap_en=1
linux_swap_partition=/dev/block/mmcblk0p3
....................
=== Linux Swap status ===
Linux SWAP enabled on /dev/block/mmcblk0p3
Linux Swap: swappiness - 30(system) 30(user)
i'm running JACxHEROSkiv1.5r2 and want to know what I can do to inprove the speed of the ROM.
Any suggestions are welcome i'm not much of a programmer
Looks nlike you need to edit the"cc_disksize=32" value, but I doubt that affect the speed tbh.
What size swap partition are you running?
Im running with 96 MB linux swap
btw what is that (cc_disksize=32) ?? the linux swap size ?
I read i a couple of posts about the linux swap and compcache and read that if you enable comcache it could speed up your device slightly.
YuYe said:
Im running with 96 MB linux swap
btw what is that (cc_disksize=32) ?? the linux swap size ?
I read i a couple of posts about the linux swap and compcache and read that if you enable comcache it could speed up your device slightly.
Click to expand...
Click to collapse
Ah thought CC was already enabled.
compcache_en=0 < This needs to be changed to one to enable CC.
cc_disksize=32 < That's the CC size, I wouldnt change it.
I would *strongly* recommend reducing your swap size. It seems to be that the bigger the size, the faster it is at first, but then the phone starts to get really slow. Go for 48 or 64mb.
I don't really know a lot about CC, I've never edited the config files for it as it's generally set up for optimum performance already (and I also don't like the idea of it wearing out the nand). If you look in the xHero there are other configurations for CC, CC+swap, swap, CC +backing swap that you may want to look at.
twistedUmbrella said:
Alright. Ran a 96 mb swap all day to test. Load screen about equal. It was "ghost lag" where you do something and it freezes for a minute
Click to expand...
Click to collapse
Ok then i better change the size of my swap. also does it matter if your on ext3 or 4 ?
And what is the difference between linuxswap and compcache ?
Sorry for these noob questions but I'm a bit lost
YuYe said:
Ok then i better change the size of my swap. also does it matter if your on ext3 or 4 ?
And what is the difference between linuxswap and compcache ?
Sorry for these noob questions but I'm a bit lost
Click to expand...
Click to collapse
no ext doesn't matter.
Compressing pages and keeping them in RAM virtually increases its capacity. This allows more applications to fit in given amount of memory.
Click to expand...
Click to collapse
The problem is the Hero UI is quite CPU intensive, so less CPU power can be devoted to compressing/decompressing files in RAM.
Linux-swap is a separate partition where files are paged, increasing the amount of memory. The difference being it's outside the RAM.

Running a custom ROM? Minimize memory leaking by tweaking this tweak!

Most chefs have optimized their custom ROMS with a large "file system cache" to, in theory, increase performance. After much experimentation, I have found so far that this seems to directly correlate with some of the memory leaking we see in these ROMS! (perhaps the WM6.5 file caching algorithm is faulty?)
Anyway, you have nothing to loose but time, so please consider this simple tweak...
If your ROM has a HKLM\System\StorageManager\FATFS\CacheSize of a large value (4096, or 0x1000 in hex, seems to be common) change this instead to 0x100 (256) and soft-reset.
Now, use the phone a bit, and notice how much free RAM you get back after closing everything down. Even if the free RAM doesn't initially jump right back up to almost where it was at boot, you'll notice that CleanRAM does a *much* better job of getting it right back there.
To me, the phone doesn't feel slower in any way with this small of a file system cache. Turning it off completely did feel a bit slower, but I could have just been imaging things.
Either way, I've had a cache value of 0x100 since my last reset several hours ago, and have had Opera, CorePlayer, IE, YouTube, Adobe Reader, and several other things opening and closing and running concurrently, and once I shut them all down, I am right back to about where I was at boot. The one time it didn't get there, cleanRAM gave me back 18MB and there I was!
Try it !
* UPDATE: I don't claim this will completely fix memory leaks -- I'm sure there's many factors at play here -- but it does seem to really help!
i just tried it and it dropped down to 52% after i was at 70%. it feels a bit slower for me but nothing to major.
thanks for sharing
Tried it on NRG's Latest, changed from Auto to 256k (using Schaps advanced config).
Mem Usage seems to stay a little lower, and the performance seems similar.
Just my experience.
Dave
will try it and report back
attached a cab
This really does work... I even noticed sometimes if I leave my phone alone the memory usage will go down a little bit now instead of leak. No performance issues. Using dotcompt's latest ROM. Works great, hangs around 65% memory in use now even with heavy use. I changed my cache setting to 128kb.
I tried this tweak with the 6.5 stock ROM from HTC on a unbranded model. De default value was 0, i changed it to 128 and now i'm hoping for some action
I will report back tomorrow if i notice any change.
Thx for the tip ^.^
Hi all, well i tried this tweak. It does seem to slow things down a bit. I saw there was an option to disable the cache, i'm going to test this now.
For me 128 was the best value.
Grtz,
FeareX
I'll give it a try at 128kb .... let's see
edit: After first reset upcoming appointments and weather forecast in home tab were missing ( -> changed mem size to 256kb ... let's see
when i went to try this out, my cache was set to 0, so i changed it to 256 and didn't notice any change and the same thing occurred when changing to 128
does this work?
titan427m said:
when i went to try this out, my cache was set to 0, so i changed it to 256 and didn't notice any change and the same thing occurred when changing to 128
Click to expand...
Click to collapse
zero means that windows mobile takes what ever it wants/needs. If you want zero you should disable the cache.
also watch out for this: http://wiki.xda-developers.com/index.php?pagename=Windows_Mobile_6_Standard
I also played around with the maximum buffer size for HTC Sense. Found somewhere in HKLM\Software\HTC\ResProxy
Some Custom ROMs already have a lower value. In Advanced Config you also find a setting for the glyph cache.
And I kicked out many tabs. For example the music tab is locking memory once it is used.
But keep in mind that caching is done for speed. And the best tweak is not to even use HTC Sense! ;-) But a blank today screen is not very useful, so I am still looking for a good solution and testing alternatives.
At least Windows Mobile devices should have much more RAM
I changed mine to 256, rebooted and 2 things i notice. SMS that comes in does not display the caller name. It only displays the number. I can view the SMS from the tab but when i tap on the sms and goes into the sms compose window, no sms is displayed at all
Changed back to 0. It's probably just me but FYI
unclemiltie said:
yes you can
blocks are the same to the mechanical parts are simple, out with the old in with the new.
You'll need a tune in the 9-3 that knows about the new engine though. Fortunately the usual suspects can do that for you.
(Oh, and that's exactly what was in the 9-3 Viggen, a B235R)
Click to expand...
Click to collapse
Even though the Viggen has the same motor. That monster must have more to it. Viggen is the fastest Saab I know of. I own a 2002 convert.
---------- Post added at 05:44 PM ---------- Previous post was at 05:41 PM ----------
jsmith8858 said:
Most chefs have optimized their custom ROMS with a large "file system cache" to, in theory, increase performance. After much experimentation, I have found so far that this seems to directly correlate with some of the memory leaking we see in these ROMS! (perhaps the WM6.5 file caching algorithm is faulty?)
Anyway, you have nothing to loose but time, so please consider this simple tweak...
If your ROM has a HKLM\System\StorageManager\FATFS\CacheSize of a large value (4096, or 0x1000 in hex, seems to be common) change this instead to 0x100 (256) and soft-reset.
Now, use the phone a bit, and notice how much free RAM you get back after closing everything down. Even if the free RAM doesn't initially jump right back up to almost where it was at boot, you'll notice that CleanRAM does a *much* better job of getting it right back there.
To me, the phone doesn't feel slower in any way with this small of a file system cache. Turning it off completely did feel a bit slower, but I could have just been imaging things.
Either way, I've had a cache value of 0x100 since my last reset several hours ago, and have had Opera, CorePlayer, IE, YouTube, Adobe Reader, and several other things opening and closing and running concurrently, and once I shut them all down, I am right back to about where I was at boot. The one time it didn't get there, cleanRAM gave me back 18MB and there I was!
Try it !
* UPDATE: I don't claim this will completely fix memory leaks -- I'm sure there's many factors at play here -- but it does seem to really help!
Click to expand...
Click to collapse
If the transmission is good in the 95. I would use it and swap ecus. Have to make sure the motor mounts are in the same location. I would also use the CV shafts from your 95. I have thought about that when we still had our 2001 93. Going with a newer motor to get out of the sludge year Ect. 93 would be a sleeper though. Vroom vroom!!!

VM heap size?

Which VM heap size are you using? 16mb 24mb or 32mb?
I found that with a high VM heap size like 32mb, the phone runs smoothly after starting up. But after one day or two days' use, it becomes so much slower that I have to reboot.
With 16mb there is some FCs on some apps. So now I set it to 24mb. Is that a better choice? I think I need some days to test it out.

Categories

Resources