03-21-2006, 11:00 AM
|
Executive Editor, Android Thoughts
Join Date: Aug 2006
Posts: 3,233
|
|
What is a Compaction Thread?
"I've received a few questions from users who have said that their WM5 device seems to slow down and speed up erratically. Some have dug in and found that "filesys.exe" is using a lot of CPU power and that it appears to be running something called a "Compaction Thread." There have also been questions about a registry key called CompactionPrio256. I can't explain some of the bigger problems people are describing, but I can at least tell you what these things are and what they're trying to do."
A bit of elightenment on File System operations and the mysterious Compaction Thread. Couple this with this article for all you ever wanted to know about speeding up file system operations, and more!
__________________
Dr. Jon Westfall, MCSE, MS-MVP
Executive Editor - Android Thoughts
News Editor - Windows Phone Thoughts
|
|
|
|
|
03-21-2006, 12:26 PM
|
Contributing Editor
Join Date: Feb 2007
Posts: 3,111
|
|
That second article was especially interesting - now I know why all installed programs are placed in the root directory of a flash card. Having them in a nicely organised Programs folder will slow execution times.
__________________
"A planner is a gentle man, with neither sword nor pistol.
He walks along most daintily, because his balls are crystal."
|
|
|
|
|
03-21-2006, 02:23 PM
|
Intellectual
Join Date: May 2007
Posts: 146
|
|
very interesting reading.............
|
|
|
|
|
03-21-2006, 03:20 PM
|
Theorist
Join Date: Aug 2006
Posts: 267
|
|
Interesting....I may reconsider whether I want to upgrade my iPAQ 4700 to WM5. I don't have any RAM shortage problems, so if my device is faster because user data is stored in RAM when running WM2003SE and the WM5 upgrade will change this, I need to look carefully at the benefits of WM5 to see if the upgrade is worth doing.
|
|
|
|
|
03-21-2006, 04:59 PM
|
Ponderer
Join Date: Apr 2005
Posts: 69
|
|
Quote:
Originally Posted by hishamh
That second article was especially interesting - now I know why all installed programs are placed in the root directory of a flash card. Having them in a nicely organised Programs folder will slow execution times.
|
From my experience, at least on WM5, when I pick to install an app on the storage card, it goes under \storage card\program files\ and not the root.
Also, I don't think it will hurt performance if you install all your programs under the \Program Files\ folder as long as each program is in its own subfolder. If you like to collect lots of single-file utilities and put them all under \Program Files\, then that may slow things down a bit when accessing that folder.
|
|
|
|
|
03-21-2006, 05:43 PM
|
Contributing Editor
Join Date: Feb 2007
Posts: 3,111
|
|
Quote:
Originally Posted by badbob001
From my experience, at least on WM5, when I pick to install an app on the storage card, it goes under \storage card\program files\ and not the root.
|
I use File Dialog Changer and Cabinstl to stuff all my program folders and files into a Program Files directory - this is under WM2003SE. The default behaviour for this and other older OS's is to install apps in the root directory.
I might go back to the default location after this - I have noticed a slowdown in program launches.
Quote:
Originally Posted by badbob001
Also, I don't think it will hurt performance if you install all your programs under the \Program Files\ folder as long as each program is in its own subfolder. If you like to collect lots of single-file utilities and put them all under \Program Files\, then that may slow things down a bit when accessing that folder.
|
The following quote implies that a sub-directory structure will impede performance:
Quote:
If your program requires all the files be stored in one directory, perhaps you can write a file system filter that will hide the subdirectories for you.
|
__________________
"A planner is a gentle man, with neither sword nor pistol.
He walks along most daintily, because his balls are crystal."
|
|
|
|
|
03-21-2006, 09:35 PM
|
Ponderer
Join Date: Apr 2005
Posts: 69
|
|
Quote:
Originally Posted by hishamh
I use File Dialog Changer and Cabinstl to stuff all my program folders and files into a Program Files directory - this is under WM2003SE. The default behaviour for this and other older OS's is to install apps in the root directory.
|
I use WM5 now so I've stopped using cabinstl. When I was using cabinst, one annoying thing was that if you change the install location, you have to create the subfolder for the program manually. So say I wanted to install acrobat on \storage card\program files\, I would need to create a acrobat folder and then select that in cabinstl.
If you're installing everything in \program files\, wouldn't programs that use files with the same name overwrite each other?
Quote:
Originally Posted by hishamh
The following quote implies that a sub-directory structure will impede performance:
Quote:
If your program requires all the files be stored in one directory, perhaps you can write a file system filter that will hide the subdirectories for you.
|
|
If you look at the article, you'll see that the title of each subsection is what TO DO to improve performance:
- Know your block size
- Memory Mapped files for caching
- Use sub-directories (FATFS)
- Expensive APIS: ...
So the author wants you to use sub-directories. The quote above is saying that if your program needs to see all 15,000 files in the same directory, then you can speed it up by hiding the sub-directories, assuming there are subdirectories and that the program doesn't need the the subdirectories to work. This would be important if you have 10,000 subdirectories.
|
|
|
|
|
03-21-2006, 11:23 PM
|
Neophyte
Join Date: Dec 2005
Posts: 4
|
|
Sad, sad. He specifically mentions the Dell Axim in his posting. My condolences to all Dell Axim owners. Wait .... I have one myself!
Why, oh why had HTC to screw this one up? All the other PDAs run fine, but the Axims suffer from the compaction thread hogging the CPU.
And why is Dell letting its customers down?
Rhetorical questions, of course. The reasons are obvious.
|
|
|
|
|
03-22-2006, 02:05 AM
|
Contributing Editor
Join Date: Feb 2007
Posts: 3,111
|
|
Quote:
Originally Posted by badbob001
When I was using cabinst, one annoying thing was that if you change the install location, you have to create the subfolder for the program manually.
|
That's where FDC comes in - you don't need to anymore. The correct folders and sub-folders are automatically created, just as if you were installing to the default location.
Quote:
Originally Posted by badbob001
If you're installing everything in \program files\, wouldn't programs that use files with the same name overwrite each other?
|
See above.
Quote:
Originally Posted by badbob001
So the author wants you to use sub-directories. The quote above is saying that if your program needs to see all 15,000 files in the same directory, then you can speed it up by hiding the sub-directories, assuming there are subdirectories and that the program doesn't need the the subdirectories to work. This would be important if you have 10,000 subdirectories.
|
Good point.
__________________
"A planner is a gentle man, with neither sword nor pistol.
He walks along most daintily, because his balls are crystal."
|
|
|
|
|
04-04-2006, 02:29 PM
|
Pupil
Join Date: Aug 2004
Posts: 16
|
|
I don't understand why filesys.exe can't do the work a little bit at a time instead of waiting until it has a lot of work to do. What is it about flash memory exactly that forces the file system driver on our iPaq's to que up a lot of rewrites and then, all at once, uses up 90% - 100% of the CPU to run through the compaction? Why can't Microsoft run the thread on a lower priority, restrict it's CPU usage or like I said, have it compact the memory a little at a time?
|
|
|
|
|
|
|