Networking Forums

Networking Forums > Computer Networking > Linux Networking > Swapfile over NFS

Reply
Thread Tools Display Modes

Swapfile over NFS

 
 
Hactar
Guest
Posts: n/a

 
      02-02-2004, 07:27 AM
I made a diskless workstation out of a laptop. It has 768M of RAM. I'm
trying to make a swap file. I did:

dd if=/dev/zero of=/swapfile bs=1M count=10
mkswap /swapfile
# returned "Setting up swapspace version 1, size = 10236 KiB"
# I guess it uses 4 KB for accounting
swapon /swapfile
# returned "rw_swap_page: bad swap file
# Unable to find swap-space signature
# swapon: /swapfile: Invalid argument"

This same file works from the host, running the same distribution and
kernel. Is there something special I have to do since it's over NFS? Or
is 768M enough that I don't need swap?

--
-eben (E-Mail Removed)m home.tampabay.rr.com/hactar

rm -f /bin/laden
 
Reply With Quote
 
 
 
 
Cameron Kerr
Guest
Posts: n/a

 
      02-02-2004, 08:27 AM
Andrey Asadchev <(E-Mail Removed)> wrote:

> I dont believe you can do swap over NFS. It might have changed in
> recent version of kernel, but i doubt it. There are couple of good
> reason why you should not do it. IMO the main one is it is not
> reliable enough.


You can, but you need a patch. The Linux Terminal Server Project has it
in their kernel, so there would be a good place to start.

Although I agree with what Andrey said, you probably don't need it.

--
Cameron Kerr
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
Reply With Quote
 
Andrey Asadchev
Guest
Posts: n/a

 
      02-02-2004, 08:30 AM
Hactar wrote:
> I made a diskless workstation out of a laptop. It has 768M of RAM. I'm
> trying to make a swap file. I did:
>
> dd if=/dev/zero of=/swapfile bs=1M count=10
> mkswap /swapfile
> # returned "Setting up swapspace version 1, size = 10236 KiB"
> # I guess it uses 4 KB for accounting
> swapon /swapfile
> # returned "rw_swap_page: bad swap file
> # Unable to find swap-space signature
> # swapon: /swapfile: Invalid argument"
>
> This same file works from the host, running the same distribution and
> kernel. Is there something special I have to do since it's over NFS? Or
> is 768M enough that I don't need swap?
>


768M is a lot of memory IMHO. You should not need swap for running X11
+ Gnome + Mozilla + etc. Only very memory intensive programs can eat up
that much memory. For comparison - i have about 500 Mb total (swap+ram)
and i never ran out of memory yet.

I dont believe you can do swap over NFS. It might have changed in
recent version of kernel, but i doubt it. There are couple of good
reason why you should not do it. IMO the main one is it is not
reliable enough.

I run diskless cluster with nodes having between 128 and 198 MB without
swap files. I have made few diskless X machines - they had about 64MB.
No problems related to memory running low on any of them.
 
Reply With Quote
 
Hactar
Guest
Posts: n/a

 
      02-02-2004, 05:13 PM
In article <(E-Mail Removed)>,
Cameron Kerr <(E-Mail Removed)> wrote:
> Andrey Asadchev <(E-Mail Removed)> wrote:
>
> > I dont believe you can do swap over NFS. It might have changed in
> > recent version of kernel, but i doubt it. There are couple of good
> > reason why you should not do it. IMO the main one is it is not
> > reliable enough.


It would be slow, if it worked.

> You can, but you need a patch. The Linux Terminal Server Project has it
> in their kernel, so there would be a good place to start.
>
> Although I agree with what Andrey said, you probably don't need it.


I won't be doing anything memory-intensive on this machine, and since Linux
gets along fine without swap, I won't bust my butt (or patch my kernel)
trying to get it.

--
-eben (E-Mail Removed)m home.tampabay.rr.com/hactar

Two atoms are walking along. Suddenly, one stops. The other says,
"What's wrong?" "I've lost an electron." "Are you sure?" "I'm positive!"
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are Off




1 2 3 4 5 6 7 8 9 10 11