usb as swap

Ask questions about Arch Linux ARM. Please search before making a new topic.

usb as swap

Postby tritron » Thu Jun 23, 2011 12:18 am

I wonder if anyone had tried usb drive as only swap drive ? I wonder if that will improve performance? I have 2tb esata drive for my pogoplug pro. Now if I add usb and set it us swap will that improve performance. Linux always recomends swap on separate drive.
tritron
 
Posts: 83
Joined: Thu Jun 16, 2011 7:16 pm

Re: usb as swap

Postby WarheadsSE » Thu Jun 23, 2011 1:20 am

at worst, create a swap file on that usb drive, and try it.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: usb as swap

Postby slycat » Thu Jun 23, 2011 5:53 pm

Any time I've loaded a linux distro into a computer they suggest having a swap but I've never had it explicitly suggest a separate platter, altogether. Makes sense though. As it stands my plug uses 16mb of swap when idle and +40mb during audio/video conversion.

Just to make sure you are talking bout putting a swap file on a USB HARDDRIVE, not a flash?
Pogoplug Pro w/ Wireless User -> decomm.
Cubox-i4pro User
4TB eSATA HDD (8g/3700+ Sw/Storage)
Kodi / Transmission / Minidlna / Samba / Batch-audio-conversions / Lighttpd
------------------------------
Rollback Machine - Thanks to impatt
slycat
 
Posts: 169
Joined: Wed Feb 09, 2011 3:07 am
Location: Miami, FL

Re: usb as swap

Postby kmihelich » Thu Jun 23, 2011 8:35 pm

On a fast hard drive, IDE or SATA, it doesn't really matter as much that it's on the same drive. The idea of swap is it's overflow for when you run out of physical RAM. Even Linux desktops have to start up a lot of stuff to overflow the amount of RAM that comes in systems nowadays. Now, specifically addressing plugs, swapping to the same drive, or even two drives.. if they're connected through USB it's going to cause a bottleneck because USB and the drives connected can only perform so many operations so fast. USB doesn't multitask like a direct SATA connection, and with plugs there is only one hub that everything is going through. With SATA plugs like the Pro, eSATA Sheeva, or GoFlex's, this is less of an issue because SATA can handle it. I mentioned in another thread that the way I get around this for development purposes is to swap to a file on my laptop attached using iSCSI. This way it all goes through the network and doesn't negatively impact compiling when a preprocessing or linking operation starts chewing up hundreds of megs of memory.

In answer to the original question, if your main drive is connected to the Pro via SATA, leave swap on that drive. Moving it to USB will negatively impact your performance.
Arch Linux ARM exists and continues to grow through community support, please donate today!
kmihelich
Developer
 
Posts: 1133
Joined: Tue Jul 20, 2010 6:55 am
Location: aka leming #archlinuxarm


Return to User Questions

Who is online

Users browsing this forum: Google [Bot] and 23 guests