LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-17-2006, 04:00 PM   #1
linuxmandrake
Member
 
Registered: Sep 2004
Distribution: debian sarge 64bit (AMD)
Posts: 709

Rep: Reputation: 30
Using usb hdd as swap space


I want to able to develop java applications in linux. But the pcs availble to me dont have much memory. I was wondering if I use an usb hdd as swap space would it be very slow. The cpu can be as low as a pentium 2 cpu.

I expect mounting a usb hdd would be the same as mounting a usb pen drive. Is that right?
 
Old 05-17-2006, 04:14 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,831

Rep: Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402
How much memory is not much?
Do you presently have any swap space?

Is it USB 1.1 or USB 2.0 controller? I suspect USB 1.1 so the speed will be 12mb/s. which is very slow compared to an IDE drive. How much free space is on the internal hard drive? If you do not want to create a seperate swap partition then creating a swap file would be better then trying to use USB. The bus speed is the same no matter if you are using a flash device or a physical hard drive. I do not suggest using a flash drive. They have a limited number of write/erase cycles and using it as swap would destroy the device.
 
Old 05-17-2006, 04:21 PM   #3
linuxmandrake
Member
 
Registered: Sep 2004
Distribution: debian sarge 64bit (AMD)
Posts: 709

Original Poster
Rep: Reputation: 30
512mb but java,XFCE, and other background processes is using alot of memory i only get like 32mb left. No swap space because am not allowed to modify the partitions. Am not sure about the usb version but it's likely to be 1.1 yeah. Ok so how would I create a swap file for slax. Trouble is it's on live cd I belive it runs entirely off ram. So thats why I want a swap partition on external hard drive which is the only way am going to get extra space

Last edited by linuxmandrake; 05-17-2006 at 04:25 PM.
 
Old 05-17-2006, 05:34 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 17,831

Rep: Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402Reputation: 2402
Post the output of the free command. Unlike windows linux will use as much memory as it can. Some of the memory will be buffers and cache which will vary depending on the needs of the kernel.

To create a swap file (example 64MB)
dd if=/dev/zero of=/swapfile bs=1024 count=65536
mkswap /swapfile
swapon /swapfile

Change location of swapfile i.e /swapfile to where ever you desire.
 
Old 09-17-2006, 02:02 PM   #5
linuxmandrake
Member
 
Registered: Sep 2004
Distribution: debian sarge 64bit (AMD)
Posts: 709

Original Poster
Rep: Reputation: 30
It uses 300636 of memory ( without any programs) but I will be running slax on different hardware. So it wont necessarily be 512mb. I have a 40gig hdd within a usb enclosure which is unpartitioned. But I would like to keep a 20gig partition on it for files which have to be accessibile via windows. So with this swap file I could run any piece of software regardless of it's memory requirements right?

Last edited by linuxmandrake; 09-17-2006 at 02:11 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to reduce swap space and reclaim the space grantm Linux - Newbie 7 08-16-2012 08:05 AM
3Gb of disk space lost! Disk space problem or mother board conflicts with HDD Mistreated Linux - Hardware 4 12-06-2004 04:58 PM
Install directly to HDD from iso on HDD/USB, with out burning cd vivinuthappa DamnSmallLinux 7 11-16-2004 11:03 AM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 02:23 AM
swap space islandkid Linux - General 2 03-13-2002 06:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration