Brian Tao Posted May 7, 2007 Share Posted May 7, 2007 Hi, all... first post here. :yes: I have a specific set of requirements that I can't seem to fulfill with the software I've looked at. Maybe someone here can help. In the interests of performance (or at least researching performance), I would like to not only defrag Windows Vista's pagefile.sys and hiberfil.sys files (at least 2 GB each), but I would also like to relocate them to the very start of the drive. This is a 100GB 7200 rpm SATA drive in my Thinkpad T60p. I've looked at the various popular defraggers (DK, PD, O&O, contig/pagedfrg/PowerDefrag, UltimateDefrag, etc.) but none of them seem to be able to actually relocate those two files to the beginning of the disk. I realize this is something that needs to be performed offline and will likely involve lots of shuffling of files to make room at the beginning. That's fine... but I haven't found any software that will even attempt it. DiskTrix's UD promises the ability to customize file locations, but their trial software crashed immediately upon launch in Vista. Is the only solution to do an offline file-by-file copy to a new drive, manually selecting pagefile.sys and hiberfil.sys first? Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/ Share on other sites More sharing options...
+BudMan MVC Posted May 7, 2007 MVC Share Posted May 7, 2007 Is the only solution to do an offline file-by-file copy to a new drive, manually selecting pagefile.sys and hiberfil.sys first? An where would you have gotten the idea that doing that would place the files on the outer tracks??There is NO Point to doing what your asking.. there would be no noticeable increase in performance.. An for starters your pagefile an hibernation files are not 2 that you would want the most performance from in the first place... You mention research into performance.. Where did you get the crazy idea that putting those 2 files on the outer track could in any way shape or form make your machine run better???? :rolleyes: Theres a good reason your not finding any software to accomplish what you want -- because there is no point to doing it.. If there was, there would be plenty of methods to accomplish it.. ;) Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588535358 Share on other sites More sharing options...
Popcorned1 Posted May 7, 2007 Share Posted May 7, 2007 Brian, Ultimate Defrag does what you're after. Tools - Options - Under "High Performance" select "Custom" Select the files in the right pane. Move them over to the left pane, re-arrange them in the order of preference. Use the "Consolidate" defrag mode and select "Respect High Performance" in the option for that mode. Hope that helps. Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588535427 Share on other sites More sharing options...
[deXter] Posted May 8, 2007 Share Posted May 8, 2007 In addition to what BudMan said, defragging your pagefile won't make ANY difference at all, unless the file is fragmented in 1000s of little pieces around the drive. If it's 3 or 4 fragments, don't even bother. Why? Because the sectors of a pagefile are accessed randomly. It's not "loaded" or read sequentially like other files. Therefore the PF isn't affected by the performance hit that happens to normal files. Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588536163 Share on other sites More sharing options...
CPressland Posted May 8, 2007 Share Posted May 8, 2007 Yeah, just letting a defrag program put the files it thinks is best at the start if the drive would be far more effective than moving the pagefile to the start of the drive Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588536190 Share on other sites More sharing options...
Brian Tao Posted May 8, 2007 Author Share Posted May 8, 2007 An where would you have gotten the idea that doing that would place the files on the outer tracks?? Because NTFS will lay down extents based on first available free block that "best fits" the file. And if the volume is completely empty, it will preferentially write the first file at the beginning of the disk (any space already occupied by the MFT not withstanding, of course). No guarantees for files after that, but that's why we have defrag utilities. This is based on observations (albeit on XP) of the placement of large DVD ISO image files on empty NTFS partitions. There is NO Point to doing what your asking.. there would be no noticeable increase in performance.. An for starters your pagefile an hibernation files are not 2 that you would want the most performance from in the first place... I disagree... you want the fastest throughput, the least number of seeks and the shortest seeks. If I'm hibernating out a gigabyte or more of memory, I want those pages to be blasted out to disk as quickly as possible. The random access nature of pagefile I/O will also benefit from the longer tracks along the outer rim of the disk, with a lower occurrence of track-to-track seeks. You do say that there would be no noticeable increase in performance... that's what I'm trying to measure. It is entirely possible (and likely) that the bottleneck is not entirely with the disk anyway, so maybe we are only talking about a difference of only a few seconds when hibernating. I'd still like to know, though. Besides, there are thousands of folks who try to squeeze every last fps out of their gaming rigs... what's wrong with doing this sort of performance tuning where it really matters? :p You mention research into performance.. Where did you get the crazy idea that putting those 2 files on the outer track could in any way shape or form make your machine run better???? :rolleyes: Maybe you come from the future, when everyone is using SSDs and there is no longer any difference in performance between the beginning of a volume and the end of a volume. ;) It's a common optimization on OS's that use swap partitions (rather than the ill-conceived notion of a swap file) to place them as close as possible to the outer tracks of the drive. Heck, even the vendors participating in the SFS benchmarks will create artificial filesystems that concatenate together a small percentage of the outside of a large number of disks to boost their scores. Some have taken the same approach to create very fast RAID-0 sets that only use 15% or so of the actual capacity of the drives. Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588538110 Share on other sites More sharing options...
Brian Tao Posted May 8, 2007 Author Share Posted May 8, 2007 Brian, Ultimate Defrag does what you're after. Cool, thanks for confirming that! I'm hoping that DiskTrix will have a fully Vista-compatible UD available soon. The current trial version installs on Vista Ultimate 32-bit, but when I try to run it, I simply get the "program has unexpectedly quit" dialog (even explicitly running it as Administrator). :( Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588538133 Share on other sites More sharing options...
Habu Posted May 8, 2007 Share Posted May 8, 2007 Hi Brian, I would welcome you but I too am a newbie !! I believe you are going about this wrong. First, a page file on the same HDD as the OS is going to be slower, regardless as the read/write heads cannot do that as well as read/write to pagefile. I think the fastest you can achieve is a fixed page file size on it's own dedicated partition...the first partition on a second HDD. Then you have no need of software to move it; then you have simultaneous read/writes of both drives. I think as long as your page file is on same HDD as OS, you are spinning your wheels, even when you aren't playing a race car game !!! Course, the best is to have enough Ram to keep from using the page file ! For Vista I would say that's 4 G, and XP, probably 2 G. Just my humble opinion. I also direct temp internet files to my "swap" partition as it decreases fragmentation. rob Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588538142 Share on other sites More sharing options...
Brian Tao Posted May 8, 2007 Author Share Posted May 8, 2007 In addition to what BudMan said, defragging your pagefile won't make ANY difference at all, unless the file is fragmented in 1000s of little pieces around the drive. If it's 3 or 4 fragments, don't even bother. It's already in one piece, but near the end of the disk... one of the utilities I tried did a pagefile defrag pass after a free space consolidation, and plunked down the 3 GB pagefile.sys after everything else. It's all in one piece, but still... :crazy: Why? Because the sectors of a pagefile are accessed randomly. It's not "loaded" or read sequentially like other files. Therefore the PF isn't affected by the performance hit that happens to normal files. If the fragments are relatively close together, it won't be as much of an issue. But if for some reason you have half your pagefile at the beginning of the disk (e.g., the part that was created when you first installed the OS) and the second half is way over at the other end of the disk (e.g., you decided to grow the pagefile later), your drive is going to be doing a lot of full-bore seeks jumping between those two fragments. You'd be better off with more fragments that are spaced closer together. Yeah, just letting a defrag program put the files it thinks is best at the start if the drive would be far more effective than moving the pagefile to the start of the drive Yeah, that's probably the best practical answer... whatever work is needed to nudge the pagefile to the beginning of the disk may only result in negligible real-world performance gains anyway. But damnit, I want to try!!! :laugh: Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588538150 Share on other sites More sharing options...
Brian Tao Posted May 8, 2007 Author Share Posted May 8, 2007 Hi Brian, I would welcome you but I too am a newbie !! We have the same post count, so we'll just welcome each other. :yes: I think the fastest you can achieve is a fixed page file size on it's own dedicated partition...the first partition on a second HDD. This is practical if you can have two hard drives in your system. Most laptops do not have this option. As it happens, my T60p is currently running in such a configuration: two 100 GB 7200 rpm SATA drives in internal bays. But the second drive has Mac OS X installed on it, and I won't always have the drive installed. It gets swapped out for the DVD burner when I need it, so I cannot rely on always having that second drive. I think as long as your page file is on same HDD as OS, you are spinning your wheels, even when you aren't playing a race car game !!! On XP, at least, it is not unusual to have no other activity on the OS drive other than to the paging file itself. I'm not so sure this is the case with Vista... it always seems to be accessing the disk for one reason or another! Search indexer, shadow copies, background defrag, etc... I should just disable those services. :pinch: Ultimately, I would love to insert a large (32GB) SSD into the second drive bay and take advantage of Vista's ReadyBoost. There would be enough room on that device for Photoshop's scratch file as well as the mountains of cache files generated by the likes of Camera Raw, Bridge, Lightroom, Bibble, FastStone Image Viewer, etc. Just need to wait for prices to drop! For Vista I would say that's 4 G, and XP, probably 2 G. Just my humble opinion. Maybe once Santa Rosa laptops hit the streets, we'll see more options for 4GB or more on those systems... Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588538180 Share on other sites More sharing options...
[deXter] Posted May 9, 2007 Share Posted May 9, 2007 So why don't you just repartition your drive, and keep the first partition dedicated to the Swap File, the second for the OS, and so on? Ultimately, I would love to insert a large (32GB) SSD into the second drive bay and take advantage of Vista's ReadyBoost. but ReadyBoost can't use more than 4 GB :) Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588538688 Share on other sites More sharing options...
Brian Tao Posted May 9, 2007 Author Share Posted May 9, 2007 So why don't you just repartition your drive, and keep the first partition dedicated to the Swap File, the second for the OS, and so on? I was hoping to avoid a backup/repartition/restore dance. :) but ReadyBoost can't use more than 4 GB :) Yeah, and only one ReadyBoost device per system under Vista. S'alright... the rest of the SSD can hold Photoshop's scratch file. :) Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588539423 Share on other sites More sharing options...
Habu Posted May 9, 2007 Share Posted May 9, 2007 Hi Brian, First my apology for not realizing you were talking lappy !! I have used Ready Boost when I first built my Vista rig as I had 2 G Ram. It made a noticeable difference in loading Flight Sim FX !! I later added 2 more G Ram and didn't need Ready Boost anymore. I saw somewhere, a graph that showed if you had 4 G Ram Ready Boost did zero ! I experienced that and quit using it. The odd part is not all USB2 thumb drives are equal. A new PNY 2 G wasn't fast enough for Vista to use it as Ready Boost. Yet a older 1 G Lexar I had was fast enough as was my 512 Lexar. So if you go this route, first visit a store with Vista computers and try the one you want to buy. When you put it in USB, Vista will detect it, open a menu and if it's fast enough, it will give you the option to prepare it for Ready Boost. Try a 2 G and I believe it will be beneficial. G Luck, rob Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588540757 Share on other sites More sharing options...
Brian Tao Posted May 13, 2007 Author Share Posted May 13, 2007 I just received an e-mail from DiskTrix about UltimateDefrag 1.5.2 which officially supports Vista. I installed the 30-day demo, but it still crashes on launch, so I'm not sure what's going on there. If I can get it to work, it looks like it will do what I want. Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588549576 Share on other sites More sharing options...
Brandon Live Veteran Posted May 13, 2007 Veteran Share Posted May 13, 2007 I was hoping to avoid a backup/repartition/restore dance. :) Yeah, and only one ReadyBoost device per system under Vista. S'alright... the rest of the SSD can hold Photoshop's scratch file. :) If I had one of those I'd just put my whole OS on there. At the very least, you should focus on things that really benefit from fast random I/O, like the system index. I was hoping to avoid a backup/repartition/restore dance. Why not just resize your existing partition down a bit and make a new one for the swap file? Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588549776 Share on other sites More sharing options...
Brian Tao Posted May 13, 2007 Author Share Posted May 13, 2007 If I had one of those I'd just put my whole OS on there. At the very least, you should focus on things that really benefit from fast random I/O, like the system index. Yeah, I'd go for a larger SSD if I wanted OS, apps and paging/scratch files all on one volume. 32GB might be a bit of a tight fit... :no: Why not just resize your existing partition down a bit and make a new one for the swap file? Because that would put the new partition at the end of the disk, not at the beginning. Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588549892 Share on other sites More sharing options...
sean222 Posted May 31, 2007 Share Posted May 31, 2007 Yeah, I'd go for a larger SSD if I wanted OS, apps and paging/scratch files all on one volume. 32GB might be a bit of a tight fit... :no: Because that would put the new partition at the end of the disk, not at the beginning. Did you ever find a solution to your original post? I was also wondering the same thing. Despite the people who responded to your thread saying it was useless and what not, I still wanted to move my page file to the most outer tack on my hard drive for the best possible read/write/access times. This is what I did: 1) I created two 1024MB static page files, one on C: and one on D: [Restart computer] 2) I then specified NO page files [Restart computer] 3) This is where I realized that Windows left those 2 files in place, and didn't delete them. I renamed both pagefiles from pagefile.sys to pagefile.sy 4) Now I ran UltimateDefrag (consolodate), and I specified pagefile.sy at the top of the list under high performance options. 5) UD will now defrag pagefile.sy as a normal file and place at the outer track. 6) After defrag, rename both files to pagefile.sys. 7) Go into pagefile options and recreate the pagefiles exactly as in step 1. That's it, Windows will use the pagefile.sys that you moved. I now have two static pagefiles of 1024MB, each on the outer tracks of my hard drives. And yes, people have made valid points that the performance increase is extremely small and not noticeable, but I'm a Windows tweaker...I enjoy tweaking my OS even if it means a quarter of a second faster boot time or what not! haha. Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588593835 Share on other sites More sharing options...
cpl183 Posted May 31, 2007 Share Posted May 31, 2007 is it possible to move the pagefile for the os to another partition than c: (or where vista is installed)? vista gives me a error message when i try to do so. i read somewhere that it is best to move the pagefile to a separate drive, so that reading from it doesn't interfere with reading/writing on the os drive. Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588594085 Share on other sites More sharing options...
KNIGHT Posted May 31, 2007 Share Posted May 31, 2007 is it possible to move the pagefile for the os to another partition than c: (or where vista is installed)? vista gives me a error message when i try to do so. i read somewhere that it is best to move the pagefile to a separate drive, so that reading from it doesn't interfere with reading/writing on the os drive. What kind of error do you get? Is it the "If you do this the sky will fall" kind of error, or the "You broke the machine" kind of error? Automatically, when I install Windows (XP, Vista, et al), I partition the drive. On small partition is for the swap file and the other for Windows. Right now my swap file starts out at 4GB and can grow up to 9.8GB. After I install Windows, I tell it to create a new swap file on the small partition and the after doing that I get rid of the swap file on the OS partition. I get a window that pops up and tells me "If you do this the sky will fall" (or something like that), but no real error. I took that road rather than trying to physically move the file on the disc. As for performance, I don't really see a hit on performance with both the partitions on the same disc. EDIT:: After thinking about it, how are you trying to move the swap file? Cut and paste wont work. Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588594130 Share on other sites More sharing options...
cpl183 Posted May 31, 2007 Share Posted May 31, 2007 its some message that says "blabla, pagefile not less than 200mb, or else, blabla" (something about vista not being able to log systemfailures). i created a pagefile as i said, on a separate drive, but i dont really know if it works or not. i am moving the pagefile like this: (ignore the 5xxx mb at the bottom, i played with the settings :D ) Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588594166 Share on other sites More sharing options...
Grope for Luna Posted June 1, 2007 Share Posted June 1, 2007 Speed Disk from Norton used to be able to move selected files/types to outer/inner tracks of a disk but I doubt if it works on Vista yet. Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588594674 Share on other sites More sharing options...
Brandon Live Veteran Posted June 1, 2007 Veteran Share Posted June 1, 2007 Because that would put the new partition at the end of the disk, not at the beginning. What advantage would that possibly bring? Do HDDs write from the outside inward? Are you expecting that the linear velocity is going to be higher at the outer tracks as with a CD? Even if that were the case, it wouldn't really help to have your pagefile there. I rather doubt that your assumptions amount to any perceivable difference. Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588595067 Share on other sites More sharing options...
Grope for Luna Posted June 1, 2007 Share Posted June 1, 2007 Are you expecting that the linear velocity is going to be higher at the outer tracks as with a CD Of course. Check the transfer graph of any hard drive in HDTune/HDTach. The real-life performance increase is largely negligible however. Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-588595171 Share on other sites More sharing options...
Conquerz Posted January 13, 2008 Share Posted January 13, 2008 (edited) Sorry for bringing back an old topic but I felt like replying to this as there are people still out there who are looking for a solution to this problem (such as myself!) Brian, Ultimate Defrag does what you're after.Tools - Options - Under "High Performance" select "Custom" Select the files in the right pane. Move them over to the left pane, re-arrange them in the order of preference. Use the "Consolidate" defrag mode and select "Respect High Performance" in the option for that mode. Hope that helps. Thanks for your little "guide" but I tried this and it doesn't work. When you add pagefile.sys to the left pane in the "high performance" options, the file is removed from the list. You can see this if you go back into "high performance" options again.I think the reason is because windows locks the pagefile and makes it read-only. I used the following tip from sean222 to come up with a solution: Did you ever find a solution to your original post? I was also wondering the same thing. Despite the people who responded to your thread saying it was useless and what not, I still wanted to move my page file to the most outer tack on my hard drive for the best possible read/write/access times.This is what I did: 1) I created two 1024MB static page files, one on C: and one on D: [Restart computer] 2) I then specified NO page files [Restart computer] 3) This is where I realized that Windows left those 2 files in place, and didn't delete them. I renamed both pagefiles from pagefile.sys to pagefile.sy 4) Now I ran UltimateDefrag (consolodate), and I specified pagefile.sy at the top of the list under high performance options. 5) UD will now defrag pagefile.sy as a normal file and place at the outer track. 6) After defrag, rename both files to pagefile.sys. 7) Go into pagefile options and recreate the pagefiles exactly as in step 1. That's it, Windows will use the pagefile.sys that you moved. I now have two static pagefiles of 1024MB, each on the outer tracks of my hard drives. And yes, people have made valid points that the performance increase is extremely small and not noticeable, but I'm a Windows tweaker...I enjoy tweaking my OS even if it means a quarter of a second faster boot time or what not! haha. I first tried your method as well but that didn't work either. When I reboot at step 2 and then log back into the system to rename the pagefile, I found that it was deleted!!! But I had an idea. Why don't I create an empty file of my choice with a specified size, defragment that using the high performance mode in UltraDefrag and then rename the file to pagefile.sys. I did this using the following command: fsutil file createnew FileName Size Where the size is in bytes. (So 1024Mb would be 1024x1024x1024 = 1073741824 bytes) I'm in the process of defragmenting the file as I write this! Hope this helps others who are trying to get the page file to the outer track of the disk. :) Edit: UltraFrag just finished defragmenting the file I created just now and I checked the position of the file, but something wierd. The file has been placed at the center of the disk. Here's the diagram (the white area is the file I created): Edited January 13, 2008 by Conquerz Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-589132179 Share on other sites More sharing options...
Grope for Luna Posted January 13, 2008 Share Posted January 13, 2008 JKDefrag has an option to move everything to the end of the disk. Then you can recreate the pagefile and it will be near the front of the disk. Link to comment https://www.neowin.net/forum/topic/558898-vista-pagefile-defrag-and-relocation/#findComment-589133014 Share on other sites More sharing options...
Recommended Posts