Guru3D.com Forums

Go Back   Guru3D.com Forums > General > Operating Systems
Operating Systems Is Windows 2000, XP or Vista giving you a hard time ? Wanna try out Linux ?


Reply
 
Thread Tools Display Modes
[GUIDE] Using ImDisk to set up RAM disk(s) in Windows with no limit on disk size
Old
  (#1)
k1net1cs
Ancient Guru
 
Videocard: Radeon HD 5650m (550/800)
Processor: Intel Core i5-520M 2.4GHz
Mainboard: Sony VAIO VPCEA16FG
Memory: 2x4GB CMSO4GX3M1A1333C9
Soundcard: ASUS Xonar U3
PSU: n/a
Lightbulb [GUIDE] Using ImDisk to set up RAM disk(s) in Windows with no limit on disk size - 12-21-2011, 20:27 | posts: 3,711

Ever since I have 8GB of RAM (yes, hi, I'm late to the party... =b), I've been looking for ways to actually use the extra resource properly.
AFAIK, most people use Dataram RAMDisk (which I'll call 'DR' from this point onward), which is limited to 4GB a disk and doesn't support multiple RAM disks at once.

And that is where ImDisk comes into play.
Also, this guide is about a 'RAM disk', not DR a.k.a. 'RAMDisk' which is another software to create RAM disks; just to clarify things. =b

Yes, I do realize that most people with 8GB or more RAM don't need a RAM disk more than 4GB nor even multiple RAM disks, and I'm not suggesting that you should, but this is just to show that it's possible, and how to do it.

In short, it's because we can, not necessarily because it's better.

Before we start, I'd like to point out that I use Windows 7 Home Premium 64-bit.
So, Vista 64-bit users may also follow the same steps.
XP users...well, seriously, why bother having more than 4GB?


Installation

In case you haven't visited the ImDisk link above, go here.
Download the installer, and then run it; pretty self-explanatory.
ImDisk, like DR, runs in background by installing itself as a device driver.


Setting up a RAM disk

You can either use the command prompt (cmd) and then run imdisk, or from the ImDisk panel in Control Panel; you might have to set the Control Panel view from Category to icons to find it.
But this guide is all about using the command-line version a.k.a. imdisk.

Remember, you have to run cmd with an administrative privilege.
This also goes for when you're deleting a RAM disk.
The easiest way is to type cmd at the Start Menu search box and then press Ctrl+Shift+Enter.
And no, Ctrl+Shift+Enter doesn't work on Win+R a.k.a. Run box.

Now that you've installed ImDisk, open up cmd as described above.
To make a 512MB disk on drive X: using NTFS, type this :

imdisk -a -s 512M -m X: -p "/fs:ntfs /q /y"
  • -a initializes the virtual disk.
  • -s 512M is the size, 512 MegaBytes.
    The full choices are b, k, m, g, t, K, M, G, or T.
    These denote a number of 512-byte blocks, thousand bytes, million bytes, billion bytes, trillion bytes, KB, MB, GB, and TB, respectively.
  • -m X: sets up the mount point a.k.a. the drive letter, X:.
  • -p "fs:ntfs /q /y" formats the drive.
    -p's parameters are actually for Windows' format program.
    So, if you want the RAM disk in a different filesystem, just change ntfs to fat (FAT16) or fat32 (FAT32).
After you run that command, you should be able to see it with Windows Explorer, formatted and ready to be used.
Any additional disks can be made by simply changing -m's parameter to another letter, changing the size & filesystem parameters if you want to, and run it again.


Deleting a RAM disk

Run imdisk -d -m X:, or imdisk -D -m X: to force a removal.
X: is of course the drive letter of the RAM disk you want to detach/delete/remove.


Setting up RAM disk(s) automatically when Windows starts

The surefire way to do this without using Group Policy Editor (gpedit.msc, which only exists in Professional version and up) is to define a task in Task Scheduler (taskschd.msc).
As usual, Start Menu's search box should make it easy to find and start Task Scheduler.

But before creating a schedule, it's advisable to create a command script first a.k.a. .cmd file, especially if we're going to start multiple RAM disks.

For example, we want to create 3 RAM disks with drive letters X:, Y:, and Z:.
X: is 1GB in NTFS, Y: is 256MB in FAT16, and Z: is 768MB in FAT32.
Therefore, we need to create a simple text file (Notepad will do fine) and put this :

Code:
imdisk -a -s 1G -m X: -p "/fs:ntfs /q /y"
imdisk -a -s 256M -m Y: -p "/fs:fat /q /y"
imdisk -a -s 768M -m Z: -p "/fs:fat32 /q /y"
...then save it as imdisk-start.cmd, or any other name as long as it ends with .cmd.
Personally, I'd save the file inside a directory I created under C: or system drive.
i.e C:\ImDisk\ directory.

When that is done, let's go back to Task Scheduler.
Using the left-most pane, browse to Task Scheduler Library -> Microsoft -> Windows.



Like so.

Then right-click on the upper middle pane (which is usually empty) and Create New Task....
I'll explain what to do in each tab.
  • General
    Name
    The name of your schedule; I named mine 'ImDisk Start'.

    Description
    Leaving it blank is fine.

    Security options
    Click Change User or Group.
    Enter the object name SYSTEM, all capitals, then click OK.
    The user account should now read NT AUTHORITY/SYSTEM.
    Turn on Run with highest privileges.
    Turn on Hidden, then choose the OS you're currently using in Configure for:.
  • Triggers

    Click New....
    On Begin the task:, choose At startup.
    Click OK.
  • Actions

    Click New....
    Click Browse....
    Look for the .cmd file you created earlier to start the RAM disks; i.e imdisk-start.cmd.
    Double-click the file, then click OK.
  • Conditions

    Turn off Start the task only if the computer is on AC power.
  • Settings

    Turn on Run task as soon as possible after a scheduled start is missed.
Click OK to create the schedule.

That's it!


Setting up a page file in a RAM disk when Windows starts

For this, we need an extra tool called swapadd.
We need to go back to the website where we downloaded ImDisk, but to its command-line utilities section.
Look for swapadd.zip, and download that.
Extract the content to C:\Windows\System32\ to make things easier.

Remember that .cmd file we created earlier?
We're going to edit it a bit.
Say we want to have 1GB of RAM disk dedicated for a page file formatted in NTFS assigned to W:.
Then we need to add these two lines.

Code:
imdisk -a -s 1G -m W: -p "/fs:ntfs /q /y"
swapadd W:\pagefile.sys 990M 990M
First line, by now, is self-explanatory.
The second line is basically adding pagefile.sys to the RAM disk in W:, sized 990MB.
The first 990M is the minimum size, or lower limit.
The second is the maximum size for the page file.
When you set both to the same number, it sets a page file with a static size.
Similar to imdisk, you can set the size to KB, MB, or GB, by using K, M, or G after the number, respectively.


Setting a persistent RAM disk across restarts and shutdowns

Now, what if we want to set a RAM disk as a browser cache, but we don't want it getting 'reset' every time we start Windows?
Or maybe even our account's temporary folder (which is different from Windows' temporary folder)?

As before, we need to visit here again.
Look for rawcopy.zip, and extract its content to C:\Windows\System32\ directory.

Now, for this, we need to create both a new .cmd file and a new schedule.
This is because we need to run the command(s) when Windows is shutting down in order to restart or shutdown, which requires a separate schedule along with a different trigger.
Then, edit the imdisk-start.cmd to reflect these changes.

First, the new .cmd file.
Say we're planning to preserve Y: and Z: contents.
We need to put this in the .cmd file :

Code:
rawcopy -mld \\.\Y: "C:\RAM disks\Y.img"
rawcopy -mld \\.\Z: "C:\RAM disks\Z.img"
...and then save it as, for example, imdisk-save.cmd.
You can save it in the same directory as where you've saved imdisk-start.cmd.
As for the parameters, you only need to understand the last two.
\\.\Z: is the drive letter of the RAM disk which contents we want to preserve.
"C:\RAM disks\Z.img" means that rawcopy will write the image file (named Z.img; it's up to you, though) in a directory called C:\RAM disks\.

Next, setting up the schedule.
Aside from the schedule name (I named mine 'ImDisk Save'), the steps and settings are similar to when we created the schedule for starting the RAM disks.
Except that at :
  • Triggers

    Click New....
    On Begin the task:, choose On an event.

    Settings
    On Log:, choose System.
    On Source:, choose USER32.
    On Event ID:, type 1074.

    Click OK.
  • Actions

    Click New....
    Click Browse....
    Look for the .cmd file you created earlier to save the RAM disks; i.e imdisk-save.cmd.
    Double-click the file, then click OK.
  • Settings

    Turn off If the running task does not end when requested, force it to stop.
    Don't forget turn on Run task as soon as possible after a scheduled start is missed.
Click OK to create the new schedule, and that's it.

If you're wondering why the trigger is like that, open up Event Viewer (eventvwr.msc).
Navigate to Windows Logs -> System, then look for events with the source USER32.
And the reason we need to turn off 'If the running task does not end when requested, force it to stop' option is to prevent Windows from prematurely ending imdisk-save.cmd, which could make rawcopy stopping halfway or not starting at all.

Lastly, we need to edit the imdisk-start.cmd file again.
Replace these lines :

Code:
imdisk -a -s 256M -m Y: -p "/fs:fat /q /y"
imdisk -a -s 768M -m Z: -p "/fs:fat32 /q /y"
...with these :

Code:
imdisk -a -t vm -f "C:\RAM disks\Y.img" -m Y:
imdisk -a -t vm -f "C:\RAM disks\Z.img" -m Z:
The new codes are basically telling imdisk to make RAM disks using the image files that were saved when Windows was shutting down.
Of course, the directory and image file names should be according to what you've set in imdisk-save.cmd before.


Closing notes

This is about as 'advanced' as I can explain, since my own usage is basically what I've written above.
If you have any questions about things I've not covered, it's better to consult with ImDisk's author in this forum.
Most of the explanations I have here are also from there, including ImDisk settings (parameters and whatnots).
The only thing I thought up myself was the task scheduling, along with the triggers.

It also goes without saying that the storage device you're saving the RAM disk image(s) into shouldn't be external storage devices like thumb drives or external HDDs.
Aside from a noticeable slow down when saving the image(s) due to USB's transfer speed (which is still slower than SATA even with USB 3.0), we have no way to ensure that at Windows start up the external storage device is ready when our schedule runs imdisk-start.cmd to load the images.
This is why it's better to save the image(s) on an internal HDD/SSD.

And in case you haven't noticed, creating those two little .cmd files saves you from having to create a schedule in Task Scheduler for each and every command you're trying to run at Windows startup or shutdown.

With that said, have fun trying ImDisk.
Just don't hold me responsible when your PC implodes or anything.
And if you could, donate to ImDisk's author.

Thanks for reading this colorful wall of text.
And so much for using the 'DR' abbreviation.

Last edited by k1net1cs; 12-22-2011 at 08:19.
   
Reply With Quote
 
Old
  (#2)
gammelhat
Member Guru
 
Videocard:
Processor:
Mainboard:
Memory:
Soundcard:
PSU:
Default 12-21-2011, 23:41 | posts: 96

Is your logic not a bit faulty? You take away usable memory from Windows to store a page file in...
   
Reply With Quote
Old
  (#3)
Black_ice_Spain
Ancient Guru
 
Black_ice_Spain's Avatar
 
Videocard: 7850 1gb @ 1120mhz
Processor: 2500K @ 4.4 / 1.28v
Mainboard: Z77P-D3
Memory: 8gb 1600 CL9
Soundcard: Xonar DG
PSU: AC Strike-X 600W
Default 12-22-2011, 00:00 | posts: 4,361 | Location: Spain

Quote:
Originally Posted by gammelhat View Post
Is your logic not a bit faulty? You take away usable memory from Windows to store a page file in...
its windows logic what's faulty, it uses pagefile even when RAM is not full...

altho idk if this actually degrades performance, never experienced any speedup when disabling PF
   
Reply With Quote
Old
  (#4)
k1net1cs
Ancient Guru
 
Videocard: Radeon HD 5650m (550/800)
Processor: Intel Core i5-520M 2.4GHz
Mainboard: Sony VAIO VPCEA16FG
Memory: 2x4GB CMSO4GX3M1A1333C9
Soundcard: ASUS Xonar U3
PSU: n/a
Default 12-22-2011, 00:02 | posts: 3,711

Quote:
Originally Posted by gammelhat View Post
Is your logic not a bit faulty? You take away usable memory from Windows to store a page file in...
Which part of "it's because we can, not necessarily because it's better" did you not understand?
And when I have 8GB of RAM on my laptop and 16GB of RAM on my desktop, worrying about memory usage is a bit moot.


Quote:
Originally Posted by Black_ice_Spain View Post
altho idk if this actually degrades performance, never experienced any speedup when disabling PF
I also didn't feel any difference with page file on or off with 16GB of RAM.
But since I have the spare RAM space, then I guess why not.

Putting the page file on RAM is purely out of curiosity, not practicality. =b

Last edited by k1net1cs; 12-22-2011 at 00:06.
   
Reply With Quote
 
Old
  (#5)
Lethal Abz
Maha Guru
 
Lethal Abz's Avatar
 
Videocard: Geforce GTX 470
Processor: Intel i7 950 @ 3.0 Ghz
Mainboard: Asus P6X58D
Memory: 16GB DDR3 Triple Channel
Soundcard: X-Fi Extreme Music
PSU: Corsair HX 620W
Default 12-22-2011, 00:18 | posts: 1,187 | Location: London

Nice article easy to follow and very technical!. I use Ramdisk too and been testing it for a while and I havent noticed a big difference with PF on and off,
   
Reply With Quote
Old
  (#6)
gammelhat
Member Guru
 
Videocard:
Processor:
Mainboard:
Memory:
Soundcard:
PSU:
Default 12-22-2011, 00:26 | posts: 96

Quote:
Originally Posted by k1net1cs View Post
And when I have 8GB of RAM on my laptop and 16GB of RAM on my desktop, worrying about memory usage is a bit moot.
Disabling it would benefit you more.
   
Reply With Quote
Old
  (#7)
Zer0K3wL
Banned
 
Videocard: gtx 480 850/1700/2000 h2o
Processor: i7 920 c0 @ 3,8 ghz h2o
Mainboard: P6X58D Premium
Memory: 3x 2gb ddr3 1603 9-9-9-24
Soundcard: tx-nr609+S606 HCS3+sub
PSU: Antec TPQ-850
Default 12-22-2011, 03:34 | posts: 3,088

should use it to store temp files saves the hasle off cleaning up every time
   
Reply With Quote
Old
  (#8)
CPC_RedDawn
Ancient Guru
 
CPC_RedDawn's Avatar
 
Videocard: 3GB HD7970OC/2GB HD7770
Processor: 4770K@4.5GHz/Q6600@3.6GHz
Mainboard: Z87-GD65 / P5K PREMIUM
Memory: 16GB@1866MHz/4GB@1066MHz
Soundcard: Creative SoundBlaster Z
PSU: 1200W/900W
Default 12-22-2011, 03:41 | posts: 5,810 | Location: Wolverhampton/United Kingdom

So technically, please correct me if I am wrong here, RAMdisk simply lets you disable PF in Windows and create your own PF using HDD space... This seems a little silly as this is what PF already does...

I am so confused! :S lol
   
Reply With Quote
Old
  (#9)
k1net1cs
Ancient Guru
 
Videocard: Radeon HD 5650m (550/800)
Processor: Intel Core i5-520M 2.4GHz
Mainboard: Sony VAIO VPCEA16FG
Memory: 2x4GB CMSO4GX3M1A1333C9
Soundcard: ASUS Xonar U3
PSU: n/a
Default 12-22-2011, 08:13 | posts: 3,711

Quote:
Originally Posted by gammelhat View Post
Disabling it would benefit you more.
And enabling it on a RAM disk doesn't make any difference nor makes it slower, so I can't see why I should disable it.
It's not like DDR3 RAM is slow or anything.


Quote:
Originally Posted by Zer0K3wL View Post
should use it to store temp files saves the hasle off cleaning up every time
The problem with 'resetting' temp files is that some apps do store regularly used or log files there that they use from time to time.
Some installer that asks for a restart also usually relies on a copy of the installer inside the user's temp directory to continue the installation post-restart, so if the directory is 'emptied' on a restart, 'hilarity' ensues.
This is why I need the RAM disk(s) to be persistent through restarts and shutdowns.


Quote:
Originally Posted by CPC_RedDawn View Post
So technically, please correct me if I am wrong here, RAMdisk simply lets you disable PF in Windows and create your own PF using HDD space... This seems a little silly as this is what PF already does...
No, RAM disk is not the one disabling the page file.
Any Windows user can disable it via System Properties in Control Panel.

A RAM disk is basically a formatted amount of space in your RAM that Windows sees as a disk drive.
So, 1GB of RAM disk means it's using 1GB of your RAM and nothing of your HDD/SSD.

So, this guide is about one of the many ways (read: the cheap-ass way, since most other RAM disk software are priced ridiculously) to create a page file without wasting any HDD/SSD space, because it uses a RAM disk.
   
Reply With Quote
Old
  (#10)
gammelhat
Member Guru
 
Videocard:
Processor:
Mainboard:
Memory:
Soundcard:
PSU:
Default 12-22-2011, 08:35 | posts: 96

Quote:
Originally Posted by k1net1cs View Post
And enabling it on a RAM disk doesn't make any difference nor makes it slower, so I can't see why I should disable it.
You lower the amount of memory Windows can use. When you get to the point where Windows needs the extra amount of memory, it will need to access it through your page file in memory (instead of accessing the memory directly). This is what is called a large overhead = slower.
   
Reply With Quote
 
Old
  (#11)
Pill Monster
Ancient Guru
 
Pill Monster's Avatar
 
Videocard: 7950 Vapor-X 1175/1550
Processor: AMD FX-8320 @4.8
Mainboard: ASUS Sabertooth 990FX R2
Memory: 8GB Kingston HyperX 2400
Soundcard: X-Fi Fatal1ty
PSU: AcBel M8 750
Default 12-22-2011, 09:12 | posts: 23,980 | Location: NZ

What's the difference between moving the PF to a Ram disk and disabling the PF?
   
Reply With Quote
Old
  (#12)
gammelhat
Member Guru
 
Videocard:
Processor:
Mainboard:
Memory:
Soundcard:
PSU:
Default 12-22-2011, 10:06 | posts: 96

Quote:
Originally Posted by Pill Monster View Post
What's the difference between moving the PF to a Ram disk and disabling the PF?
A lot of overhead. Data must to be moved around, before the memory can be used, and access must go through the ram disk.

It should be clear that direct access to memory and no movement of data is faster.
   
Reply With Quote
Old
  (#13)
gammelhat
Member Guru
 
Videocard:
Processor:
Mainboard:
Memory:
Soundcard:
PSU:
Default 12-22-2011, 10:17 | posts: 96

The primary reason why some use a ram disk for a page file is because they use 32bit Windows and have more than 4GB RAM. The memory above 4G can then be made of use for a page file.
   
Reply With Quote
Old
  (#14)
Pill Monster
Ancient Guru
 
Pill Monster's Avatar
 
Videocard: 7950 Vapor-X 1175/1550
Processor: AMD FX-8320 @4.8
Mainboard: ASUS Sabertooth 990FX R2
Memory: 8GB Kingston HyperX 2400
Soundcard: X-Fi Fatal1ty
PSU: AcBel M8 750
Default 12-22-2011, 10:23 | posts: 23,980 | Location: NZ

Quote:
Originally Posted by gammelhat View Post
A lot of overhead. Data must to be moved around, before the memory can be used, and access must go through the ram disk.

It should be clear that direct access to memory and no movement of data is faster.
A ram disk is made of ram which means the PF is located in memory, so can you explain why data needs to be moved around before the PF can be accessed?

When the PF is disabled, virtual memory is moved from the HDD into ram, so to me this seems no different than storing the PF on a Ram disk...
   
Reply With Quote
Old
  (#15)
gammelhat
Member Guru
 
Videocard:
Processor:
Mainboard:
Memory:
Soundcard:
PSU:
Default 12-22-2011, 10:31 | posts: 96

Quote:
Originally Posted by Pill Monster View Post
A ram disk is made of ram which means the PF is located in memory, so can you explain why data needs to be moved around before the PF can be accessed?
For a memory management point of view there is no difference between a page file in memory and on the hard drive.

When you are low on memory, data must be moved to the page file (data must be moved around in memory), before new data can be stored in the same place in memory.

The point is: If you don't reserve memory for a ram disk/page file then you have that much more usable memory.

Quote:
When the PF is disabled, virtual memory is moved from the HDD into ram, so this would appear to be no different to storing the PF on a Ram disk...
The entire process of moving data to a page file is no longer in effect when you disable it.

Last edited by gammelhat; 12-22-2011 at 10:34.
   
Reply With Quote
Old
  (#16)
k1net1cs
Ancient Guru
 
Videocard: Radeon HD 5650m (550/800)
Processor: Intel Core i5-520M 2.4GHz
Mainboard: Sony VAIO VPCEA16FG
Memory: 2x4GB CMSO4GX3M1A1333C9
Soundcard: ASUS Xonar U3
PSU: n/a
Default 12-22-2011, 11:50 | posts: 3,711

Quote:
Originally Posted by gammelhat View Post
You lower the amount of memory Windows can use.
It's exactly what I'm trying to do.



And that is with multiple RAM disks worth 3GB in total.

Quote:
Originally Posted by gammelhat View Post
When you get to the point where Windows needs the extra amount of memory, it will need to access it through your page file in memory (instead of accessing the memory directly).
'When' is the keyword here.
One of the many ways I could ever run out of 16GB of RAM is to run multiple VMs or run Notmyfault, in which I don't.

My Firefox usage tops at around ~2GB because of it being 'awesome', and whenever I play a game I usually close it down.
Putting it on SSD and its caches on a RAM disk makes it a snap to restart it after a game.
Even if I decided to run both at the same time (FF and a game), how much a game would use at max in average? 2GB? 4GB?

Quote:
Originally Posted by gammelhat View Post
This is what is called a large overhead = slower.
0.1 m/s slower than speed of light is also slower, but would we notice it?
Now, if you could provide concrete numbers for comparison purposes, that'd be great.
Personally I'd like to see how much does this 'large' overhead affects anything.

Quote:
Originally Posted by gammelhat View Post
The primary reason why some use a ram disk for a page file is because they use 32bit Windows and have more than 4GB RAM. The memory above 4G can then be made of use for a page file.
Depending on a user need(s), it's not the primary reason, just one of the many reasons.
ImDisk can also be used for that purpose, though it may not be as robust a solution compared to paid software.
And since I don't use it for that purpose, I didn't put it in my guide, in which I already noted in the 'Closing notes' section.

Quote:
Originally Posted by gammelhat View Post
The point is: If you don't reserve memory for a ram disk/page file then you have that much more usable memory.
And the point of my guide is to show how to use those useable memory.

Look at it this way.
You can talk about MPG all you want in a supercar thread, but how should that matter when what's more important is maximum speed?
It'd be more relevant if you talk about MPG in a city car thread.

And I hate car analogies. =/
   
Reply With Quote
Old
  (#17)
gammelhat
Member Guru
 
Videocard:
Processor:
Mainboard:
Memory:
Soundcard:
PSU:
Default 12-22-2011, 12:07 | posts: 96

Quote:
Originally Posted by k1net1cs View Post
It's exactly what I'm trying to do.
You missed the point. Why remove memory to use it for a page file?

The purpose of the page file is to increase the commit limit. You lower the limit by reserving ram for a ram disk. You then increase it again by putting a page file on that ram disk - but now you have introduced a large overhead when that ram needs to be used.

Quote:
0.1 m/s slower than speed of light is also slower, but would we notice it? Now, if you could provide concrete numbers for comparison purposes, that'd be great. Personally I'd like to see how much does this 'large' overhead affects anything.
How much slower it is, is not relevant. The relevant part is that it is faster to use the memory directly.
   
Reply With Quote
Old
  (#18)
k1net1cs
Ancient Guru
 
Videocard: Radeon HD 5650m (550/800)
Processor: Intel Core i5-520M 2.4GHz
Mainboard: Sony VAIO VPCEA16FG
Memory: 2x4GB CMSO4GX3M1A1333C9
Soundcard: ASUS Xonar U3
PSU: n/a
Default 12-22-2011, 12:26 | posts: 3,711

Quote:
Originally Posted by gammelhat View Post
You missed the point. Why remove memory to use it for a page file?
No, you missed the point of my guide.
How many times should I reiterate it to you that, in my guide, performance is not the goal?
That I only wanted to show what we could do with RAM disks provided we have the extra amount of memory available for use?
Do I really have to explain it slower with a wall of text?

Quote:
Originally Posted by gammelhat View Post
The purpose of the page file is to increase the commit limit. You lower the limit by reserving ram for a ram disk. You then increase it again by putting a page file on that ram disk - but now you have introduced a large overhead when that ram needs to be used.
Then show me, with numbers, where that large overhead affects a system's performance if you really want to make a point.

Quote:
Originally Posted by gammelhat View Post
How much slower it is, is not relevant. The relevant part is that it is faster to use the memory directly.
If how much it being slower is not relevant, then why how much it being faster is relevant?
They aren't exactly two mutually exclusive things.
And how are you going to show the relevancy of how much faster it is to use the memory directly if you're not going to post some numbers?

If you need me to run some benchmarks on my system to prove your point, then by all means.
Just show me what tools I'd need and how I should run it.
Since in this case you are in the know more than me, then I assume you're also better than me at knowing which and what parts to test, and how.

Don't worry, I'll wait.
   
Reply With Quote
Old
  (#19)
gammelhat
Member Guru
 
Videocard:
Processor:
Mainboard:
Memory:
Soundcard:
PSU:
Default 12-22-2011, 12:43 | posts: 96

I am not sure how to explain it to you. You accomplish nothing but an overhead. Why do something, if all you get is an overhead?

I understand the need to experiment and that your guide is not about performance, but others reading this are obviously confused about the part with a page file on a ram disk (I think you are also).

A ram disk can be good for many things, but a page file?
   
Reply With Quote
Old
  (#20)
Pill Monster
Ancient Guru
 
Pill Monster's Avatar
 
Videocard: 7950 Vapor-X 1175/1550
Processor: AMD FX-8320 @4.8
Mainboard: ASUS Sabertooth 990FX R2
Memory: 8GB Kingston HyperX 2400
Soundcard: X-Fi Fatal1ty
PSU: AcBel M8 750
Default 12-22-2011, 13:10 | posts: 23,980 | Location: NZ

Quote:
Originally Posted by gammelhat View Post
For a memory management point of view there is no difference between a page file in memory and on the hard drive.

When you are low on memory, data must be moved to the page file (data must be moved around in memory), before new data can be stored in the same place in memory.

The point is: If you don't reserve memory for a ram disk/page file then you have that much more usable memory.
That doesn't make sense...the amount of usable memory will be the same whether a PF is created in Ram or not...
If a 2GB PF is allocated to a Ram disk it's still a portion of the total amount of memory available to the system.

Example: 8GB of ram with 2GB allocated as a PF is still 8GB of usable memory, not 6GB.


Quote:
Originally Posted by gammelhat View Post
The entire process of moving data to a page file is no longer in effect when you disable it.
You misunderstood me, I'm saying the whole thing is moved to ram - I didn't mean data constantly moves between the HDD and RAM.

TBH I think you're splitting hairs in relation to the overhead, we're talking nano-seconds not seconds....

I don't see the point in a PF in ram myself, but I can appreciate why the OP brought it up...it's food for thought, nothing more...

Last edited by Pill Monster; 12-22-2011 at 13:17.
   
Reply With Quote
Old
  (#21)
gammelhat
Member Guru
 
Videocard:
Processor:
Mainboard:
Memory:
Soundcard:
PSU:
Default 12-22-2011, 13:15 | posts: 96

Quote:
Originally Posted by Pill Monster View Post
That doesn't make sense...the amount of usable memory will be the same whether a PF is created in Ram or not...
If a 2GB PF is allocated to a Ram disk it's still a portion of the total amount of memory available to the system.
That is my entire point. You have the same usable memory, but to get to some of it, you need to go through the ram disk (large overhead).

No page file - you have the same usable memory, but all of it is now directly addressable by Windows. No overhead.

Quote:
You misunderstood me, I'm saying the whole thing is moved to ram - I didn't mean data constantly moves between the HDD and RAM.
Moved to ram? Nothing is "moved" when you disable the page file. There is just no page file.
   
Reply With Quote
Old
  (#22)
Pill Monster
Ancient Guru
 
Pill Monster's Avatar
 
Videocard: 7950 Vapor-X 1175/1550
Processor: AMD FX-8320 @4.8
Mainboard: ASUS Sabertooth 990FX R2
Memory: 8GB Kingston HyperX 2400
Soundcard: X-Fi Fatal1ty
PSU: AcBel M8 750
Default 12-22-2011, 14:00 | posts: 23,980 | Location: NZ

Quote:
Originally Posted by gammelhat View Post
That is my entire point. You have the same usable memory, but to get to some of it, you need to go through the ram disk (large overhead).
What do you mean "go through the ram disk"?

It doesn't "go through anything" as it's all located in ram...

Quote:
Originally Posted by gammelhat View Post
No page file - you have the same usable memory, but all of it is now directly addressable by Windows. No overhead.
Maybe, but I can't see that being a big problem unless there was less than 2GB of ram available...if I'm following you correctly...



Quote:
Originally Posted by gammelhat View Post
Moved to ram? Nothing is "moved" when you disable the page file. There is just no page file.
Not quite true.

With the PF disabled on the HDD it is simply kept in physical ram. Unless you mean swap space - and no they are not the same thing...

An application can still page fault even when all memory is located in physical ram, this usually happens when the program accesses pages kept in the virtual address space.

Last edited by Pill Monster; 12-22-2011 at 14:16.
   
Reply With Quote
Old
  (#23)
gammelhat
Member Guru
 
Videocard:
Processor:
Mainboard:
Memory:
Soundcard:
PSU:
Default 12-22-2011, 14:11 | posts: 96

Quote:
Originally Posted by Pill Monster View Post
What do you mean "go through the ram disk"?

It doesn't "go through anything" as it's all located in ram...
I explained it in an earlier post. Windows cannot address the memory directly in this manner. Data must be copied to the ram disk, before ram can be reused (that is the function of the page file).

Quote:
Not quite true.

With the PF disabled on the HDD it is simply kept in physical ram. Unless you mean swap space - and no they are not the same thing...

An application can still page fault even when all memory is located in physical ram, this usually happens when the program accesses pages kept in the virtual address space.
The page file is a file on some secondary storage media (usually). Its purpose is to temporarily hold data from ram when you are running out of it. I am not sure where you get "it is simply kept in physical ram" from.

Yes, page faults exist even without a page file, but the page file is not the source of them (because there is none, it is disabled - so no data has been copied out to it). Memory mapped files (ie. exe and dll files) generate page faults.

I can add: The virtual address space is where the application lives. Everything is about it, but the page file is not the virtual address space.

Last edited by gammelhat; 12-22-2011 at 14:32.
   
Reply With Quote
Old
  (#24)
rrblum
Newbie
 
Videocard: HD5870-E6 w/3 screens
Processor: I5-760 @4 Ghz
Mainboard: Asus P7P55D-E LX
Memory: 16Gb DDR3-1600
Soundcard: On Board Via HD
PSU: Corsair TX650
Default 12-23-2011, 02:34 | posts: 6 | Location: Florida

Wow - what a great guide - thanks so much. Too bad the page file flamers hijacked the thread.

I had tried DataRam Ramdisk but it really slowed startup and the 4 Gb limit was a drag. I also messed around with ImDisk but I couldn't get it to save an image and start up with the saved image so I gave up. Your guide really helped me set up and run a ImDisk ram disk. I use my ram disk for windows and browser temp files and printer spool. Makes window and browser snappier. I'm running x64 Vista with 16 Gb ram (no page file - so I won't join in that discussion). How can you beat free unlimited size ram disk software?

Anyway, thanks again for the guide, nice work.
   
Reply With Quote
Old
  (#25)
gammelhat
Member Guru
 
Videocard:
Processor:
Mainboard:
Memory:
Soundcard:
PSU:
Default 12-23-2011, 04:47 | posts: 96

Quote:
Originally Posted by rrblum View Post
Too bad the page file flamers hijacked the thread.
This is what I am talking about. This is not the first time I have seen people being misguided. When people put their page file on a ram disk "to speed things up" it based on bad information.
   
Reply With Quote
Reply

Tags
imdisk, ram disk, windows

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com
Copyright (c) 1995-2014, All Rights Reserved. The Guru of 3D, the Hardware Guru, and 3D Guru are trademarks owned by Hilbert Hagedoorn.