The effects of the CacheSize tweak with the hx4700 WM5 upgrade

As many of you already know, I’m working on an all-in-one roundup of everything related to the sluggish WM5 upgrade of the HP iPAQ hx4700. The article will only be published tomorrow (or even later) because I still need to make some tests; nevertheless, some final results worth publishing, independent of the rest of the article, are already available.

One of the things I’ve tested is setting the cache size. This is a well-known hack to anyone ever tweaked the hx4700 and the Dell Axim x50 implementation of WM5. Well-known Windows Mobile blogger Mike Calligaro from Microsoft has pointed out that the HKEY_LOCAL_MACHINE\ System\ StorageManager\ FATFS\ CacheSize (and EnableCache) registry values should only speed up access to memory cards, not to that of the main storage.

To test this, I’ve also made some extensive tests to find out whether this is the case with the HP iPAQ hx4700.

Testing methology

In my tests, I used the CAB installer file of the trial version of Smart Tennis by SimbSoft (also see this blog post on the title). I’ve chosen this title because it installs some 235 files; therefore, the CAB file is highly useful in testing file creation and I/O speed. Flash ROM's are known for having pretty low file creation speed; with using an installer that has tons of files the speed difference between unoptimized and optimized cases more easily comes out. Please also see this article on all these questions if interested.

I've always made sure my results are not influenced by the 'kicking-in' filesys. If it started, then, I just waited for it to end. I haven't installed anything else on the hx4700 (it was cleanly hard reset) except for Resco File Explorer and Registry Editor and I haven't done any other registry hacks/changes either (except for the well-known NavPoint hack).

I’ve tested the following scenarios:

  1. main storage to main storage CAB install (and, then, uninstall, to see the file deletion speed). In this test, I’ve installed from the main storage to the main storage, not using any memory card as either the source or the target. The main aim of this is to make sure that the (hopefully) improved memory card file access speed has absolutely no effect on the results. As can be seen, there is some performance increase in this case too – as opposed to what you would except, based on Mike’s explanation.
  2. SD to SD (un)install. The SD card was an 1Gbyte, optimized (FAT16, 16k, no backup FAT) card
  3. SD to CF (un)install. The CF card was a 256 Mbyte, 4.5-year-old, at its time (and even now, for that matter, in-PDA speed-wise) high-end, optimized (FAT32, 4k, backup FAT) Ridata card.
  4. SD to main memory filecopy (just the 2.425.513-byte CAB install file) to see the plain file copy speed

I’ve tested either two or three scenarios with the above tests. One of them was benchmarked with 2Mbyte in-RAM cache, another (seeing it being definitely inferior to the 2Mbyte case, not tested with all cases) with a 125 kbyte one and the third was without any cache. All the time values are given in minutes: seconds; the bigger, the worse.

TestInstallation (copy) timeDeletion (uninstall) time
Main mem to main mem filecopy, no cache1:491:30; filesys.exe lasting for about 5 additional minutes
cache: 40961:381:22; filesys.exe lasting for about 5 additional minutes
2.5M filecopy from SD to main memory, no cache0:18n/a
cache: 40960:17n/a
Installing to (uninstalling from) CF, no cache1:201:08
cache: 2561:201:07
cache: 40961:141:01
Installing to (uninstalling from) SD, no cache2:34 (measured 2 times)0:50
cache: 2562:380:58
cache: 40962:000:50

Result Evaluation and Conclusions

As can clearly be seen, raising the cache to 2 Mbytes (with the registry value 4096) does speed up things a bit, even accessing the built-in storage. That is, with the hx4700, you may want to increase the cache – it will help not only with the cards, but also with the main storage. The speed increase this all delivers, however, is in no way outstanding, as opposed to what some people say. That is, not using any kind of cache won’t render your Pocket PC useless.

On the other hand, using a much smaller (125 kbyte with the value 256) cache will be of almost no help. It should also be pointed out that some people have misinterpreted Mike’s above-linked post and think using the value '256' is enough. That’s not the case – if you do use cache, use a 2Mbyte one to have some real effects. With the SD card as the installation target, file operations have even become slower with a 125-kbyte cache than without any cache.

Solnyshok, I've run exactly the same tests with 8M cache (0x4000). The OS indeed reserved 8M for the cache. The results are as follows:

File copy from SD to main storage: 0:14 m:s
Main-main install: 1:32 m:s; after this, filesys.exe immediately kicked in and lasted for about 7 minutes
Uninstall from main memory: 1:25 m:s; filesys.exe didn’t immediately kick in after this

That is, the results are a bit better than with the lower/no-cache settings except for deletion.

UPDATE: This article has become outdated.

In the meantime, I've found out a lot more about all this stuff. The cache values have turned out to be hugely interdependent and their value also depending on the actual sector size. That is, a, say, x50v setting not necessarily is any good on a hx4700 and vice versa.

As, so far, almost all the public tweaks have just copied the x50v settings verbatim, I've decided to dive into the problem more and found out a lot.

Actually, almost all the public cache and other file system tweaks (except for the NaviPoint, the fake server and the filesys.exe throttler app), being "just" copied from the x50v, have turned out to be not the best for the hx4700.

I'll write a big, heavily updated report and tutorial on all this. Please stay tuned.

Juhani, will test ASAP and report back.

Syndicate content