Page 1 of 1
USB and swap partitions and cloud
Posted: 29 Nov 2012 23:56
by Nacht
i was wondering a few things.
i have a 1gig USB stick and was installing embedded +swap+data. if the install takes 120mg can i use the rest for swap or how much is the maximum (install defaulted to 543). (my physical system memory is 768)
Is it possible to change the swap partition size after install?
is it possible to use a second USB drive just for swap?
why after install does it only show 543mg of my 768mg on the system info page?
and last question... I really loved iDisk and was sad to see it go away. I have tried dropbox and others like it but nothing gives me that mountable drive like idisk had and worked so well on my iPhone/macs ect. I was looking at barracuda drive
http://barracudadrive.com which seems to be a nice personal use replacement. is there a way to install this into NAS4Free, or do something like this that can offer access both on and off network for laptops and iPhones?
thanks
Re: USB and swap partitions and cloud
Posted: 30 Nov 2012 17:03
by davidb
using swap on a usb stick can kill it quickly, too much I/O.
(technically, you can choose your swap device from the system>advanced>swap menu, but again, swap on USB stick will not do good things for its lifespan)
Give us more info about your setup, drives: size/quantity, do you intend to use ZFS or softRAID?
for installing extras software , use jails. quick search in the forums will show up some nice tutorials on jail setup.
Re: USB and swap partitions and cloud
Posted: 30 Nov 2012 17:14
by armandh
one would be better off with a small Hdd for the swap
besides the problem of flash memory write wear
one is far better off with more ram memory
using usb memory for swap is an all around bad idea.
Re: USB and swap partitions and cloud
Posted: 30 Nov 2012 18:39
by Onichan
Also you aren't required to have a swap partition at all. So as the others said do not use swap on USB and I would just disable it.
Re: USB and swap partitions and cloud
Posted: 01 Dec 2012 13:07
by armandh
PS
768 Mb of memory is more than enough for USF formatted storage
even using embedded N4F. I have done FN7 on as little as 256 Mb.
Re: USB and swap partitions and cloud
Posted: 01 Dec 2012 18:41
by raylab
In regards to your question about why only 543M shows in the system info page. As I understand it, this is due to part of the 768M physical memory being used for a RAMdisk to hold the running embedded OS. Take a look at the page Diagnostics->Information->Space Used. There should be a /dev/md0 and /dev/md1, which are the RAMdisks for the OS. The total size of them should be about equal to the "missing" space.
Hope this helps you better understand what is going on in the system.
Re: USB and swap partitions and cloud
Posted: 27 May 2014 20:39
by Flappjakk
I'm sorry to revive this old thread.
What about the swap on a USB rotational hard drive? Since it isn't flash the repeated reads/writes to swap would have no real impact on the life of the drive, but would the slower bandwidth on USB versus SATA have any real impact on the system. I'm currenlty booting embedded from a 512MB USB flash drive, my system has 16GB RAM and I have 1 GB swap enabled on a ZFS device. The system always reports that swap is 0% utilized. I've been considering replacing the 512MB USB flash drive with a 256GB USB hard drive and using some space on the HDD for swap.
So back to the real question, this topic discourages swap on USB flash. Is it more accurrate to interpret this as discouraging swapping on flash regardless of connection due to wearing out the part, or discouraging swapping on USB in general because of the lesser bandwidth?
Re: USB and swap partitions and cloud
Posted: 27 May 2014 21:36
by raulfg3
Flappjakk wrote:my system has 16GB RAM and I have 1 GB swap enabled on a ZFS device. The system always reports that swap is 0% utilized.
In my experience, no swap is needed, if you think that need swap, buy more RAM, if you have enought RAM you do not need swap. but is only my experience.
Re: USB and swap partitions and cloud
Posted: 28 May 2014 17:29
by Flappjakk
You're right swap is most likely not needed, as evidenced by it being 0% utilized. I have more than enough space with 4 4TB SATA HDDs and 1 250GB USB HDD boot disk to allocate at least 1GB (or more) to swap, just in case.
But I'm more interested in the discussion that was happening in this thread regarding swap on USB flash. In the case that swap becomes necessary on my or any system, should I/we avoid swap on flash, avoid swap on USB, or avoid some combination of USB and flash?
Re: USB and swap partitions and cloud
Posted: 31 May 2014 07:13
by armandh
swap through usb will be slow
most anything through usb is a performance killer.
but an embedded OS on a USB device can be slow through the boot up if it wants
but once done it is very fast in RAM