Results 1 to 4 of 4

Thread: Virtual Memory

  1. #1
    Alexwijn NNTP User

    Default Virtual Memory


    I'm using OpenSUSE, i would like to use some virtual memory of the hard
    drive, so i can use more memory for my applications. I cant add an new
    memory block in the computer, bcoz its an virtual computer.

    So is there any command i can use to use a part of the hard drive as
    virtual memory?


    Alexwijn's Profile:
    View this thread:

  2. #2
    JosipBroz NNTP User

    Default Re: Virtual Memory

    GNU/Linux can use swap files as well as swap partitions. It shouldn't be
    difficult to find the exact procedure with uncle Google (it involves
    creating the file with dd, using mkswap and putting it in your fstab).
    In addition, if your virtual partition is filling up, you could perhaps
    add another virtual drive to your guest OS and place the swap file

    *Even if free software were *****, it should still get our preference
    over the non-free **** secreted by IT corporations.
    -A free rephrasing of RMS-
    JosipBroz's Profile:
    View this thread:

  3. #3
    tsu2 NNTP User

    Default Re: Virtual Memory

    If this is a Virtual Machine (you said virtual computer) running on
    another machine, then

    1. The virtual machine application(eg vmware, xen, virtualbox, etc)
    manages the physical resources on the Host machine used by the Guests

    2. There is little purpose to trying to manage memory usage in the
    Guest VMs themselves. You might partition for other purposes but don't
    waste energy specially modifying swap files/partitions for the purpose
    of memory management.

    tsu2's Profile:
    View this thread:

  4. #4
    brunomcl NNTP User

    Default Re: Virtual Memory

    How much RAM the host has? And how much is allocated to the VM?
    The best way is to increase the VMs allocated memory. You may have to
    add more RAM to the host.

    Besides that, in linux you can create a temporary swap file, similar to
    windows. You are not limited to swap partitions, although they work much

    To create a 128 MB swap file in /swap, for example, type as root:

    # dd if=/dev/zero of=/swap bs=1024 count=131072
    # mkswap /swap
    # swapon /swap

    Change the number 131072 (128 x 1024) to the size you want. It doesnt
    have to be a multiple of 1024, you can use 250000 for example, to make a
    ~244 MB file.

    The /swap file is temporary, should deactivate after rebooting. You can
    remove it at any time with:

    # swapoff /swap
    # rmdir /swap

    See the respective man pages for more info.

    brunomcl's Profile:
    View this thread:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts