Loading ...
Sorry, an error occurred while loading the content.

8565Re: Swap partition

Expand Messages
  • Bill
    Mar 2, 2012
    • 0 Attachment
      Sorry I should have been more specific /swap.img is just a place holder value. You need to actually create it somewhere that is externally mounted. I do not know if you are using SlugOS, or Optware with a custom firmware, Debian. With Debian /swap.img will work, because it won't be an in-memory device. If you / is a just a memory mount then it won't work, because linux is smart enough not to let you use a ramdisk or such as swapspace.

      Bill

      --- In nslu2-general@yahoogroups.com, "adamant628" <adam.suhy@...> wrote:
      >
      > I did use the mkswap command, just as noted in the how-to. I just tried again and got the same error message.
      >
      > Can you also address my other concern about the swap putting wear on the USB flash? Is it an issue to use the swapfile on the plug?
      >
      > So how does it work if the swapfile is larger than the actual memory?
      >
      > --- In nslu2-general@yahoogroups.com, "Bill" <yahoo@> wrote:
      > >
      > > You can make your swap file any size you want. (Within reason.) A small amount of non-swappable memory is used to map data in the swap file, so I would not recommend much more than 8 times the actual amount of memory you have on the device. Most people say 2 times the actual memory is a good size to use.
      > >
      > > Did you remember to use the mkswap command before activating your swap?
      > >
      > > Bill
      > >
      > >
      > > --- In nslu2-general@yahoogroups.com, "adamant628" <adam.suhy@> wrote:
      > > >
      > > > I am pretty sure that I need to create some swap space, as one of the programs I am running is complaining on not having enough memory. I was following the instructions on http://www.nslu2-linux.org/wiki/HowTo/AddAdditionalSwapSpace to add a swap file. I am a linux newbie, but I have been learning. I successfully have programs running on my optware enabled pogoplug.
      > > >
      > > >
      > > > Regarding the link above, the command: "dd if=/dev/zero of=/mnt/swapfile1 bs=1024 count=256k" is creating the swap file from the flash memory of the device? The how-to mentions that this will create a 256 MB swap file. I only have 125MB available on my device, so I assume that I shouldn't exceed that amount.
      > > >
      > > > I attempted to follow these instructions (made my swapfile 64MB), but when I used "swapon" I was given an error: "swapon failed: Invalid argument". This stumped me, so I don't know how to proceed at this point.
      > > >
      > > >
      > > > My basic understanding of swap is that it is basically the same as virtual memory in windows. I have also read that it can burn out a USB flash drive fairly quickly due to the increased read/write cycles. Is it safe to do this on the pogoplug itself, or should I dedicate a portion of one of my externals for the task? I assume that if I use an external, I would skip the part about making the file, then direct mkswap to that partition's mount?
      > > >
      > > > Thanks for your help.
      > > >
      > >
      >
    • Show all 10 messages in this topic