Feature Requests

Here you can provide suggestions on how to improve the product, website, etc.
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Post by Technologov »

Windows XP requires 64 MB during install phase, but after install it can run with 32 MB of RAM.
kilou
Posts: 53
Joined: 14. May 2007, 10:16

Post by kilou »

Technologov wrote:Windows XP requires 64 MB during install phase, but after install it can run with 32 MB of RAM.
Great! So only 32Mb of hard RAM assignment and all the rest through the pagefile on the dynamic ramdisk! I've seen that it is possible to set the xp pagefile on a particular folder rather than on a partition. This can be achieved with regedit. Therefore if we share the ramdisk with xp via the built-in sharing feature of VirtualBox, it should be possible to tell XP to place the pagefile on a network drive such as the shared ramdisk :P

Technologov, I can create the ramfs in Ubuntu with:
sudo mkdir /mnt/ramdisk
sudo mount -t ramfs My_ramfs /mnt/ramdisk -o maxsize=10000

but then when I try to copy data in /mnt/ramdisk as root Ubuntu tells me that there is no space left on ramdisk :?: I tried to copy a very small file (less than 1 ko) and I get the same. If I look at the file systems information in System Monitor, the ramdisk 0 bytes total, 0 bytes free and 0 bytes available! Am I doing something wrong??
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Post by Technologov »

Try not using maxsize

Try using:
mount -t ramfs My_ramfs /mnt/ramdisk
kilou
Posts: 53
Joined: 14. May 2007, 10:16

Post by kilou »

I got the same problem without using maxsize: not enough space. It seems the ramdisk is created with 0 size :shock:
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Post by Technologov »

Look at my system:

tux@opensuse:~> df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hdd3 11266360 10288552 405496 97% /
udev 516360 132 516228 1% /dev
/dev/hdd9 7740832 5369720 1977924 74% /home
/dev/hdd1 1228768 276288 952480 23% /C
/dev/hdd6 33262352 31640448 1621904 96% /E
/dev/hdd7 110326352 100306744 10019608 91% /F
/F/vz/myimage107.img 9612252 2761108 6362864 31% /vz/private/107
/F/OSes/openSUSE-10.2-GM-DVD-i386.iso
3789858 3789858 0 100% /var/adm/mount/AP_0x00000010


tux@opensuse:~> mount
/dev/hdd3 on / type ext3 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/hdd9 on /home type ext3 (rw)
/dev/hdd1 on /C type vfat (rw,noexec,nosuid,nodev,gid=100,umask=0002,utf8=true)
/dev/hdd6 on /E type vfat (rw,noexec,nosuid,nodev,gid=100,umask=0002,utf8=true)
/dev/hdd7 on /F type fuse (rw,nosuid,nodev,noexec,noatime,allow_other,default_permissions)
/F/vz/myimage107.img on /vz/private/107 type ext3 (rw,loop=/dev/loop0)
proc on /vz/private/107/proc type proc (rw)
sysfs on /vz/private/107/sys type sysfs (rw)
/F/OSes/openSUSE-10.2-GM-DVD-i386.iso on /var/adm/mount/AP_0x00000010 type iso9660 (ro,loop=/dev/loop1)
My_ramfs on /mnt/ramdisk type ramfs (rw)

On my system Ramdisk is visible throught "mount" command but not via "df".
What about yours?
kilou
Posts: 53
Joined: 14. May 2007, 10:16

Post by kilou »

Same here:

kilou@kilou-laptop:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 15124868 4994496 9362068 35% /
varrun 501876 252 501624 1% /var/run
varlock 501876 0 501876 0% /var/lock
procbususb 501876 108 501768 1% /proc/bus/usb
udev 501876 108 501768 1% /dev
devshm 501876 0 501876 0% /dev/shm
/dev/sda6 26422968 11880936 13199804 48% /home
/dev/sda2 15366172 9607640 5758532 63% /windows
/dev/scd0 139918 139918 0 100% /media/cdrom0
tmpfs 501876 359916 141960 72% /mnt/tmpdisk

kilou@kilou-laptop:~$ mount
/dev/sda1 on / type ext3 (rw,noatime,nodiratime,errors=remount-ro,data=writeback)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda6 on /home type ext3 (rw)
/dev/sda2 on /windows type ntfs (rw,nls=utf8,umask=007,gid=46)
nfsd on /proc/fs/nfsd type nfsd (rw)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
none on /proc/fs/vmblock/mountPoint type vmblock (rw)
/dev/scd0 on /media/cdrom0 type iso9660 (ro,noexec,nosuid,nodev,user=kilou)
none on /mnt/ramdisk type ramfs (rw,maxsize=256000)
tmpfs on /mnt/tmpdisk type tmpfs (rw)

tmpfs is seen by both df and mount but ramfs is only seen by mount. Are you able to copy files on the ramdisk on your system??
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Post by Technologov »

Yes, easily. Look:

opensuse:/home/tux # free
total used free shared buffers cached
Mem: 1032724 1013296 19428 0 272960 520616
-/+ buffers/cache: 219720 813004
Swap: 2104472 56 2104416

opensuse:/home/tux # cp -v /F/OSes/WinXP.iso /mnt/ramdisk/
`/F/OSes/WinXP.iso' -> `/mnt/ramdisk/WinXP.iso'

opensuse:/home/tux # ll /mnt/ramdisk/WinXP.iso
-rwxr-xr-x 1 root root 512342016 2007-05-19 19:02 /mnt/ramdisk/WinXP.iso

opensuse:/home/tux # free
total used free shared buffers cached
Mem: 1032724 1018164 14560 0 118604 694740
-/+ buffers/cache: 204820 827904
Swap: 2104472 144 2104328

opensuse:/home/tux # rm /mnt/ramdisk/WinXP.iso

opensuse:/home/tux # free
total used free shared buffers cached
Mem: 1032724 517860 514864 0 118672 194484
-/+ buffers/cache: 204704 828020
Swap: 2104472 144 2104328
opensuse:/home/tux #
kilou
Posts: 53
Joined: 14. May 2007, 10:16

Post by kilou »

Oh OK it works for me as well with the command line:

sudo cp -v ./file /mnt/ramdisk/file

However it didn't work with Nautilus launch as root.....

Anyway we are able to copy files on the ramdisk and it appears that the ramdisk grows/shrinks according to needs. Now we'd need to share /mnt/ramdisk with XP with "VBoxManage sharefolder" and modify XP registry to put the pagefile on this shared folder and do some benchmarks to see if this works and how well or bad it works.
kilou
Posts: 53
Joined: 14. May 2007, 10:16

Post by kilou »

It doesn't seem to work: XP doesn't want to put the pagefile on the shared folder (ramdisk) although this one is accessible in XP :?

more info here (post #3): http://ubuntuforums.org/showthread.php? ... ost2684306
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Post by Technologov »

Today my turn for brilliant idea: Just create a virtual Hard Disk on the Linux RAMdisk !

That is: use VBox to create second virtual Hard Disk on /mnt/ramdisk add it to the VM, and use it for swap.

Update:
VBox Disk Manager can create Hard Disks as small as 4 MB in size.

There was a problem because we *thought* that there was a problem. In reality there is no problem. he-he

Update2:
But using this will raise another problem: shrinking of the virtual Hard Disks is currently impossible.
kilou
Posts: 53
Joined: 14. May 2007, 10:16

Post by kilou »

you mean that if you create a Virtual hard disk on the ramdisk and share it with XP, you were able to move the pagefile on it?? Since the virtual harddisk is shared with VBoxManage sharefolder it should appear in the Network drives in XP, right?

I thought the problem was that XP did not allow to put the pagefile on a network drive but if you were able to move the pagefile on it then the problem lies somewhere else! I think we're close to the solution because it is possible to move the pagefile in a specific folder, now we just need to understand why it is not apparently possible to move the pagefile on a network drive.

Could you please detail the command you used to create the virtual disk in the ramdisk and share it with XP? And how did you move the pagefile on it, with registry editing?

Indeed if the virtual disk is not dynamically shrinkable then it won't bring many benefits but at least the RAM usage of the VM will start low and then grow depending on the applications you start. But the ability to give memory back is a nice feature IMHO. I'm sure there is a way to force XP put its pagefile on that shared ramdisk :roll:

EDIT: Maybe the problem is that when booting XP the network drives are not yet created when XP needs the pagefile. Therfore by default if the specified location of the pagefile is not available, it created a pagefile on C:\....
Last edited by kilou on 19. May 2007, 22:23, edited 1 time in total.
kilou
Posts: 53
Joined: 14. May 2007, 10:16

Post by kilou »

Is an XP guest able to directly access RAM or does it rely on VirtualBox to access the RAM? I ask this because rather than creating a ramdisk in Linux, what about creating a ramdisk directly in XP if it is able to access RAM directly?? This article mentions that the pagefile can be moved on a XP ramdisk if the ramdisk is built with Ramdisk Plus version 8 (see http://www.superspeed.com/desktop/faq.php#R001). So if we assign 32Mb of RAM to the VM with VirtualBox and then create a ramdisk within XP guest that would directly access the RAM (if this is possible), the pagefile could be placed on the RAM and would be shrinkable..

Is this possible or does XP guest get its RAM from VirtualBox??
Technologov
Volunteer
Posts: 3342
Joined: 10. May 2007, 16:59
Location: Israel

Post by Technologov »

XP guest gets it's RAM from VirtualBox, so this wont make sense.

It's almost directly because host's RAM is efficiently mapped to guest's RAM with very small overhead.

Still let's think for exmple:
you have 1 GB of RAM
you're VM will have 512 MB
you're swap in guest will be like 400 MB, but this will be reduced from guest's 512 RAM not from host's RAM.
You see ? it will be nonsense.

It short we will need improvement on the VBox end -- we need either:
1. direct access to physical hard disk (like VirtualPC or VMware)
or
2. dynamically shrinkable virtual hard disk (VDI)
or
3. Guest additions that manage RAM in guest (like achima said)
or
4. Improvement in the "shared folder" in VBox that allows Windows guest to recognize it as Physical Disk (not network disk), so we can use swap on it.

or all of above :)
kilou
Posts: 53
Joined: 14. May 2007, 10:16

Post by kilou »

Too bad XP doesn't support symlinking for network drives! The freeware Junction 1.04 allows symlinking on NTFS folders and that would have solved the problem (we could have symlinked the network drive on a folder on C:\ and move the pagefile to the link). But unfortunately network drive and non NTFS drives are not supported.

Is there no other way to do something similar as a symlink that would work with network drives??

Another path to explore is the use of mountvol in XP. This allows to mount a volume in a particular folder....but again the network drives are not seen as volume :(
kilou
Posts: 53
Joined: 14. May 2007, 10:16

Post by kilou »

Technologov, do you know if it would be possible to use Cygwin in XP guest to create a symlink of the network drive (ramdisk) on C:\......or mount the network drive on a local folder with mount //vboxsvr/ramdisk /ramdisk or similar ??? It seems Cygwin has many capabilities but I don't know much about it....
Post Reply