Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 23, 2013, 05:33:40 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Boot optimizing for multibooters, Layout.ini util  (Read 7386 times)
jonib
JkDefrag Hero
*****
Posts: 810


View Profile
« on: April 03, 2009, 01:47:23 am »

Hi again. Wink
If you have more then one Windows installation (or boot from a WinPE disk), you might want to use the layout.ini in the non booted Windows to optimize the boot files but MyDefrag's ImportListFromBootOptimize() Boolean only supports using layout.ini on the current system volume.

So I made this tool AltLayout.zip that can read the layout.ini from any Windows installation and make a filelist that MyDefrag can use to defrag the boot files.

Example use in a MyDefrag script:
Code:
RunProgram("AltLayout.exe", "E:\Windows")

VolumeSelect
  CommandlineVolumes() And Removable(no) and Writable(yes) and Mounted(yes)
VolumeActions
  FileSelect # Boot Optimize
    ImportListFromBootOptimize()
    Or ImportListFromFile("AltLayout.txt")
  FileActions
    SortByImportSequence(Ascending)
  FileEnd
VolumeEnd
This is only a part of a script but shows how to boot optimize the current
Windows volume and a Windows on the E: volume.

jonib
Logged

SledgeHammer
JkDefrag Senior
****
Posts: 43


Trust me - I know what I'm doing!


View Profile
« Reply #1 on: April 03, 2009, 06:25:44 am »

Thx for this nice tool.

As suspected, on my rig the layout.ini holds a whole bunch of files definetively not needed for a fast boot (e.g. two 80+ MB zip files).
Logged
jonib
JkDefrag Hero
*****
Posts: 810


View Profile
« Reply #2 on: April 03, 2009, 11:46:56 am »

Thx for this nice tool.
Thanks for trying it, how did you run it?
Quote
As suspected, on my rig the layout.ini holds a whole bunch of files definetively not needed for a fast boot (e.g. two 80+ MB zip files).
I agree some stuff seems to not belong for boot optimizing, like for example I had some mp3 files listed and I thought wtf are they doing there, then I remembered that Winamp starts automatically and starts playing when I start Windows Embarrassed , but there are other files that don't seem to belong there.

And I think I forgot to mention that the resulting list will only contain file paths that reference the system drive, as the layout.ini can contain references to other volumes.

jonib
Logged

SledgeHammer
JkDefrag Senior
****
Posts: 43


Trust me - I know what I'm doing!


View Profile
« Reply #3 on: April 06, 2009, 07:28:27 am »

Thanks for trying it, how did you run it?

Well, I just ran "AltLayout.exe c:\windows" from a command line.
Logged
jonib
JkDefrag Hero
*****
Posts: 810


View Profile
« Reply #4 on: April 06, 2009, 05:05:42 pm »

Well, I just ran "AltLayout.exe c:\windows" from a command line.
OK, but you do know that the layout.ini is a normal Unicode textfile, so you don't need my util just to read it.

jonib
Logged

SledgeHammer
JkDefrag Senior
****
Posts: 43


Trust me - I know what I'm doing!


View Profile
« Reply #5 on: April 06, 2009, 06:04:22 pm »

OK, but you do know that the layout.ini is a normal Unicode textfile, so you don't need my util just to read it.

Whoopsie! I didn't know that. Until now, I always used strings.exe from the Sysinternals suite when I wanted to take a look at the file.  Roll Eyes
Logged
gemisigo
JkDefrag Hero
*****
Posts: 110


View Profile
« Reply #6 on: August 11, 2009, 09:22:22 am »

Hi jonib Smiley

I tried AltLayout and compared its result with the original Layout.ini. I've seen that it removed many entries from the original file. My question is which ones and based upon what conditions?
Logged
tonne
JkDefrag Hero
*****
Posts: 55


View Profile
« Reply #7 on: August 11, 2009, 09:56:25 am »

Quote
some stuff seems to not belong for boot optimizing
The prefetch folder is not exclusively used for boot optimizing.

Whenever a program is started the prefetcher creates or update a corresponding pf files in this folder.
If, i.e., wmplayer is called with an mp3 file the filename is saved in the prefetch file and eventually written to the layout.ini (IdleTask).

This is controlled by the EnablePrefetcher registry key.


Logged
gemisigo
JkDefrag Hero
*****
Posts: 110


View Profile
« Reply #8 on: August 11, 2009, 10:21:18 am »

The prefetch folder is not exclusively used for boot optimizing.
Yes, that's true. Its purpose is not to improve system boot but the overall system performance by having initial information about what/when/how to load when an application is started. Though many of those information is used already at boot. That is why it's called PREfetch Wink

I read many things about it at several forums and it does some "magical" things (there are some I doubt it does, but then again, who knows?). One of them is that (at least under Vista) it monitors when you start certain applications and collects data about day/time/etc. Let's say you used to start your machine at i.e. 8.00 am when you arrive at your office and start excel and word at 8.10 am (though I don't see any reason why Wink ). Vista learns that you do that every morning (at least on workdays) so it loads files necessary to those applications into memory so it starts a lot faster. Or this is how it should work... Alas, it does not do all the time Huh
Logged
Darlis
JkDefrag Hero
*****
Posts: 1707


View Profile WWW
« Reply #9 on: August 11, 2009, 10:31:12 am »

Thats SuperFetch, a new bug feature of Vista. Instead of just keeping a list with the files to (pre)fetch, Superfetch also loads them directly into the RAM. So, the RAM usage will grow overtime, until the the slow pagefile has to be used again. I always disable this.
Logged

Need help creating a script? Try MyDefrag Script Creator.
jonib
JkDefrag Hero
*****
Posts: 810


View Profile
« Reply #10 on: August 11, 2009, 11:26:58 am »

I tried AltLayout and compared its result with the original Layout.ini. I've seen that it removed many entries from the original file. My question is which ones and based upon what conditions?
It is supposed to remove any entries that is not on the boot drive, the idea is that you have those in the current layout.ini, but I could add them back if needed.
And also it removes any files not on the disk.
But it also adds some missing files used at booting manly in XP as Vista already has them included.

You can look in the script AltLayout.ahk as its a simple textfile.

jonib
Logged

jonib
JkDefrag Hero
*****
Posts: 810


View Profile
« Reply #11 on: August 11, 2009, 11:52:54 am »

The prefetch folder is not exclusively used for boot optimizing.
Lets call it start optimizing  Smiley
Quote
Whenever a program is started the prefetcher creates or update a corresponding pf files in this folder.
If, i.e., wmplayer is called with an mp3 file the filename is saved in the prefetch file and eventually written to the layout.ini (IdleTask).
The problem is that at least on my XP system, the layout.ini contains some weird stuff, like right now there are a bunch of K:\WINXP\SYSTEM32\* files, and I might have mounted a Windows drive in K: some time ago but not for a long time and they are still in the layout.ini file and updating hasn't helped, and it also includes many files I have used/opened one time, so it seems it should be a little smarter about what to put there, maybe it's better in Vista/W7.

jonib
Logged

gemisigo
JkDefrag Hero
*****
Posts: 110


View Profile
« Reply #12 on: August 11, 2009, 12:35:50 pm »

It is supposed to remove any entries that is not on the boot drive, the idea is that you have those in the current layout.ini, but I could add them back if needed.
And also it removes any files not on the disk.
That sounds reasonable. I wonder what does MyDefrag do with files that are loaded with ImportListFromBootOptimize() but are not on the disk? Does that slows it down or is it only an insignificant performance loss?

Lets call it start optimizing  Smiley
Or rather optimizing just to be simple and more precise Tongue

Thats SuperFetch, a new bug feature of Vista. Instead of just keeping a list with the files to (pre)fetch, Superfetch also loads them directly into the RAM. So, the RAM usage will grow overtime, until the the slow pagefile has to be used again. I always disable this.
Yes, the feature is called SuperFetch under Vista, still the folder is named Prefetch. And yes, it should (I'm not sure it really does) load them into the RAM, when they are going to be needed (according to collected data, not right after booting). Not doing that would be the same as if you were to make a cake and having a shopping list with the ingredients you would not buy them all at once but buying them one at a time exactly when it is needed. Those files are loaded because it is assumed they are going to be needed in the near future. Of course, it is blunder to load them sometimes but in most of the cases there is more gain than pain.

And yes, the memory usage will grow over time, that's natural, it occurs whether you enable or disable Superfetch.

There are so called "memory managers" that do contrary to that, they state that they remove "unnecessary" things from the RAM to "flood" you with large quantity of free RAM. And they do that by requiring themselves a large quantity of free RAM (which results in paging since the place now it occupies was occupied by something else and it has to go somewhere, doesn't it?) and freeing that memory right away.

You see, the problem is, and it's a big one, I must tell, that you cannot predict which things will eventually become unnecessary. Yes, you could make an educated guess, but that's time consuming too, and in the end it would take more than it would give. And never forget, empty memory is the biggest waste possible. It should contain what you need Wink (yeah, who knows that, auguries are quite rare Tongue) and releasing the dll/exe/whatever from it that you will probably need in a few seconds is the dumbest thing to do.

So my suggestion is not to disable Superfetch. If you use your machine consistently (and not quite random as some of us do) Superfetch will help your work. Surely there should be a better memory management but it is not as bad as you think and having it is definitely better than having none (that is, disabling it completely as you did). At least this is my experince right now. It may change in the future, of course Wink
Logged
jonib
JkDefrag Hero
*****
Posts: 810


View Profile
« Reply #13 on: August 11, 2009, 12:49:19 pm »

I wonder what does MyDefrag do with files that are loaded with ImportListFromBootOptimize() but are not on the disk? Does that slows it down or is it only an insignificant performance loss?
I think it just skips any missing files, I guess it depends on the number of files, but I don't think there is any big performance penalty.

jonib
Logged

Darlis
JkDefrag Hero
*****
Posts: 1707


View Profile WWW
« Reply #14 on: August 11, 2009, 01:41:02 pm »

Surely there should be a better memory management ...
Yes, there is. If you want a program to occupy some memory, just start it Wink . Usually, my most frequently used programs then stay open and even Superfetch cannot prevent them to be written to the pagefile, if free memory gets short.
... but it is not as bad as you think and having it is definitely better than having none (that is, disabling it completely as you did). At least this is my experince right now.
I just disabled the SuperFetch service. The normal prefetch is still active.

The problem is, that I always hated it when I ran a memory consuming program (usually games) and after that, other files have been written to the pagefile so that it takes an already opened program a long time to be ready to use again. I have now 4GB RAM and with all my regular used programs open, it is already occupied with 2,5GB (Vista itself needs about 1GB). Playing games or working with virtual machines would not be possible if I would have disabled the pagefile because the RAM usage is too high. So I don't want prefetch to occupy more RAM with programs I don't want to use right now, enforcing the use of the slow pagefile. Thats also why I don't use the "Memory Managers" too.

Of course, SuperFetch is a good invention for normal users, but not if you use memory consuming programs.

Talking about wasting something: Normal office-pcs already have Quadcores build in. Thats a real waste of electricity.
Logged

Need help creating a script? Try MyDefrag Script Creator.
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!