Jump to content











Photo
- - - - -

imdisk startup ram disk for swap


  • Please log in to reply
20 replies to this topic

#1 Kolia Landscape

Kolia Landscape
  • Members
  • 6 posts
  •  
    Russian Federation

Posted 06 August 2011 - 08:10 AM

i`d like to make ram disk 1000mb in size for windows swap purposes. i make task in windows scheduler, that runs from SYSTEM account with highest rights. Configure it for Windows 7/Windows Server 2008 R2. Choose to run at system startup Here is line: imdisk -a -t vm -o rw -s 1000M -p "/fs:ntfs /q /y" -m Z: In device manager - Non-plug and play devices - imdisk startup is set to System.
Ram disk appears in my computer, but windows try to create swap a little bit earlier, and swap file doesn`t appearing. Then Windows display warning that there is no swap file in system... Can you advice something? What i do wrong?
Sorry for obscure language - English is not my native one:)

#2 Kolia Landscape

Kolia Landscape
  • Members
  • 6 posts
  •  
    Russian Federation

Posted 06 August 2011 - 08:47 AM

windows warning like this:
Posted Image

#3 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1358 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 06 August 2011 - 09:37 AM

i`d like to make ram disk 1000mb in size for windows swap purposes. i make task in windows scheduler, that runs from SYSTEM account with highest rights. Configure it for Windows 7/Windows Server 2008 R2. Choose to run at system startup Here is line: imdisk -a -t vm -o rw -s 1000M -p "/fs:ntfs /q /y" -m Z: In device manager - Non-plug and play devices - imdisk startup is set to System.
Ram disk appears in my computer, but windows try to create swap a little bit earlier, and swap file doesn`t appearing. Then Windows display warning that there is no swap file in system... Can you advice something? What i do wrong?
Sorry for obscure language - English is not my native one:)


You also need to schedule "swapadd" to run after ram disk has been created. Also, it is better ("safer") to use awealloc driver for allocating memory for a ram disk that holds a swap file. Search this forum for swapadd and awealloc.

#4 Kolia Landscape

Kolia Landscape
  • Members
  • 6 posts
  •  
    Russian Federation

Posted 06 August 2011 - 11:14 AM

thank for advance..i`ve done the following..

i downloaded swapadd, place it in windows directory.
Added to imdisk schedule in actions like 2nd command:
swapadd Z:\pagefile.sys 888M 888M

here is actions tab:
Posted Image

here is virtual memory screen:
Posted Image

Z: drive appearing in my computer, with pagefile.sys -it is normal, but i still getting this message:
Posted Image

any thoughts? can you help me in this situation?

Edited by Kolia Landscape, 06 August 2011 - 11:15 AM.


#5 Kolia Landscape

Kolia Landscape
  • Members
  • 6 posts
  •  
    Russian Federation

Posted 06 August 2011 - 12:53 PM

file-hosting where i uploaded screens is down, and i was blocked to add pictures to forum anymore:) awesome!

#6 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1358 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 06 August 2011 - 07:32 PM

thank for advance..i`ve done the following..
any thoughts? can you help me in this situation?


Can you first check if swapfile gets created anyway? Type swapadd without parameters on command prompt.

Otherwise, put both lines in one cmd script and schedule that cmd script instead. That way you ensure that swapadd does not run before imdisk has finished creating the virtual disk.

#7 Kolia Landscape

Kolia Landscape
  • Members
  • 6 posts
  •  
    Russian Federation

Posted 06 August 2011 - 08:41 PM

yes it is created, i see it.
here is cmd:
swapadd
Swapfile '\??\Z:\pagefile.sys' usage: 105 MB.

Registry quota allowed: 2048 MB
Registry quota used: 77 MB
Paged pool size: 0 MB

#8 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1358 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 06 August 2011 - 08:52 PM

yes it is created, i see it.
here is cmd:
swapadd
Swapfile '\??\Z:\pagefile.sys' usage: 105 MB.

Registry quota allowed: 2048 MB
Registry quota used: 77 MB
Paged pool size: 0 MB


Then the problem is merely the error message itself. If it annoys too much there is, if i recall correctly, a registry tweak that disables that particular error message. I cannot remember where I read about it though. It could have been here at boot-land/reboot.pro or some other place, but someone mentioned it. I have never tested myself.

#9 Kolia Landscape

Kolia Landscape
  • Members
  • 6 posts
  •  
    Russian Federation

Posted 06 August 2011 - 09:13 PM

thanks for quick response! i`ve search the net how to disable it.

#10 slowikps

slowikps
  • Members
  • 4 posts
  •  
    Poland

Posted 11 August 2011 - 08:17 PM

i`d like to make ram disk 1000mb in size for windows swap purposes. i make task in windows scheduler, that runs from SYSTEM account with highest rights. Configure it for Windows 7/Windows Server 2008 R2. Choose to run at system startup Here is line: imdisk -a -t vm -o rw -s 1000M -p "/fs:ntfs /q /y" -m Z: In device manager - Non-plug and play devices - imdisk startup is set to System.

I have the same configuration - system is windows 7 x64. But ram disk is not available after system starts.
When I am running task manually its work. What could be a problem?
Thanks
Pawel

Edited by slowikps, 11 August 2011 - 08:23 PM.


#11 Hercule18

Hercule18
  • Members
  • 4 posts
  •  
    France

Posted 12 September 2011 - 09:01 PM

Hi,

I try to do the same thing, and I'm facing the same problem:
Ramdisk created - ok
pagefile.sys created - ok
the system does not use the pagefile.sys created

This is my config (in task manager @ startup):

net start awealloc

C:\Windows\system32\imdisk -a -f C:\Windows\system32\awealloc.sys -s 4G -p "/fs:ntfs /v:ImDisk /q /y" -m Z:

C:\Windows\System32\swapadd.exe Z:\pagefile.sys 1000M 3500M


Thx bye advance for your help.

Herc.

Edited by Hercule18, 12 September 2011 - 09:03 PM.


#12 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1358 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 13 September 2011 - 06:28 AM

Have you checked with "swapadd" tool and see which pagefiles exist and which of them Windows is using?

#13 Hercule18

Hercule18
  • Members
  • 4 posts
  •  
    France

Posted 13 September 2011 - 12:02 PM

Hi Olof,

this what the command swapadd returns:

C:\Windows\system32>swapadd

Swapfile '\??\C:\pagefile.sys' usage: 0 MB.

Swapfile '\??\Z:\pagefile.sys' usage: 0 MB.

Registry quota allowed: 2048 MB

Registry quota used: 228 MB

Paged pool size: 0 MB


Thx

Herc.

#14 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1358 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 13 September 2011 - 12:05 PM

Looks allright then. No swap needed for the moment. Swap usage will be higher when more swap space is needed.

#15 Hercule18

Hercule18
  • Members
  • 4 posts
  •  
    France

Posted 13 September 2011 - 01:22 PM

Hi,

The problem, is that I have an error message telling that no pagefile is created and that windows will make an temporary pagefile.
And effectively I have a pagefile created on C: of 8Go, whereas non should be created. :cold:

Herc.

#16 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1358 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 13 September 2011 - 01:34 PM

That is much of a non-problem. That message is always shown if Windows cannot automatically create a swapfile at system startup. There is a registry tweak mentioned somewhere that can be used to disable that message. Search this forum and 911cd.net and similar. It was posted somewhere like that.

The system will primarily use the fastest swapfile so there should be no problem with your settings.

#17 Hercule18

Hercule18
  • Members
  • 4 posts
  •  
    France

Posted 13 September 2011 - 03:13 PM

Windows cannot automatically create a swapfile at system startup


Hmmm...So what is this huge 8GB file created on my C drive called pagefile.sys?

#18 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1358 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 13 September 2011 - 03:21 PM

Hmmm...So what is this huge 8GB file created on my C drive called pagefile.sys?


It is a pagefile that will not be used because the system will use your Z: pagefile first.

You can manually create a very small (just a few MB) pagefile at C: in Computer Settings applet to make it waste less space on your C: drive.

#19 badhat

badhat
  • Members
  • 2 posts
  •  
    United States

Posted 04 December 2011 - 11:09 PM

I found this particular thread very useful -- I have a few questions about my own setup as it is related to the thread topic.

I have disabled the use of a paging file in the "Virtual Memory" dialog in system properties. Even though this is true, if I run the swapadd program I can see a swap file

Microsoft Windows [Version 6.1.7601]

Copyright (c) 2009 Microsoft Corporation.  All rights reserved.



C:\Users\username>swapadd

Swapfile '\??\Z:\pagefile.sys': size: 4000 MB usage: 0 MB (0%)



Registry quota allowed: 2048 MB

Registry quota used: 63 MB

Paged pool size: 0 MB

So even though I have told the "Virtual Memory" settings to not use a paging file, my system is really using one, correct?

This is my startup script to make a ramdisk to use for swap (I have a gpedit.msc startup script to run it)
net start awealloc



imdisk -a -s 4G -f \\.\awealloc -m Z: -p "/fs:exfat /q /y"



swapadd Z:\pagefile.sys 4000M 8000M

I am seeing the error "Windows has created a temporary paging file" just like Kolia Landscape has mentioned. I've Googled, but I could find no such registry key to remove this notification. Is there another post that I haven't been able to find?

Thanks!

#20 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1358 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 04 December 2011 - 11:28 PM

I found this particular thread very useful -- I have a few questions about my own setup as it is related to the thread topic.

I have disabled the use of a paging file in the "Virtual Memory" dialog in system properties. Even though this is true, if I run the swapadd program I can see a swap file

Microsoft Windows [Version 6.1.7601]

Copyright (c) 2009 Microsoft Corporation.  All rights reserved.



C:\Users\username>swapadd

Swapfile '\??\Z:\pagefile.sys': size: 4000 MB usage: 0 MB (0%)



Registry quota allowed: 2048 MB

Registry quota used: 63 MB

Paged pool size: 0 MB

So even though I have told the "Virtual Memory" settings to not use a paging file, my system is really using one, correct?


Yes that is correct, swapadd shows "running configuration", not "stored configuration". That is, it shows what Windows is currently using, not what you have told it to do with virtual memory settings at system startup. Therefore swapadd output reflects what you have created or changed with this tool and that memory manager has began using. Another example is that if you delete a pagefile using virtual memory settings in Control Panel, then swapadd will still show the remaining old pagefile until you reboot because Windows will continue to use it until next reboot.

This is my startup script to make a ramdisk to use for swap (I have a gpedit.msc startup script to run it)

net start awealloc



imdisk -a -s 4G -f \\.\awealloc -m Z: -p "/fs:exfat /q /y"



swapadd Z:\pagefile.sys 4000M 8000M

I am seeing the error "Windows has created a temporary paging file" just like Kolia Landscape has mentioned. I've Googled, but I could find no such registry key to remove this notification. Is there another post that I haven't been able to find?


I don't remember really. For my own computer I have set Control Panel settings to create a pagefile on my system partition and then create a large imdisk/awealloc backed pagefile through a startup script. The swapadd tool reports that Windows practically only uses the imdisk/awealloc backed pagefile. But this setup makes sure that I don't have to see the error message you mention. (I don't think you need to create such a large pagefile on system partition as I have done in my case, but anyway.)

Here is my swapadd output. Notice that quite opposite to what you would expect, my C: drive is my imdisk/awealloc RAM disk and D: is my system partition:

D:\> swapadd

Swapfile '\??\D:\pagefile.sys': size: 1100 MB usage: 13 MB (1%)

Swapfile '\??\C:\pagefile.sys': size: 970 MB usage: 475 MB (48%)



Registry quota allowed: 118 MB

Registry quota used: 30 MB

Paged pool size: 354 MB



#21 badhat

badhat
  • Members
  • 2 posts
  •  
    United States

Posted 06 December 2011 - 04:12 AM

Thanks! I set another pagefile on C: to be only 16MB so the one that I have on the Z: ramdisk should be used instead -- and now the annoying error message is gone! This is such an incredible project, thanks for doing all this.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users