[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re:[cobalt-users] Making a swapfile
- Subject: Re:[cobalt-users] Making a swapfile
- From: Grant Stern <grant@xxxxxxxxxxxxxx>
- Date: Mon Feb 10 15:38:00 2003
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
thank you for the help on this gerald.
inre: kswapd went zombie and other bad things
i figure stuff really belongs under this thread though. i'll just fill
in my details to where i stopped.
Subject: [cobalt-users] Making a swapfile
From: Gerald Waugh <gwaugh () frontstreetnetworks ! com>
Date: 2002-09-10 1:49:20
My system has 512MB memory, I want a 1GB swapfile
This is the method I use to create the swapfile
#### look at meminfo ####
[root tmp]# cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 529395712 521211904 8183808 83701760 375746560 16183296
Swap: 237297664 2347008 234950656
MemTotal: 516988 kB
MemFree: 7992 kB
MemShared: 81740 kB
Buffers: 366940 kB
Cached: 15804 kB
*SwapTotal: 231736 kB*
SwapFree: 229444 kB
this is mine
[root tmp]# cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 263483392 216862720 46620672 74063872 71106560 61083648
Swap: 133885952 372736 133513216
MemTotal: 257308 kB
MemFree: 45528 kB
MemShared: 72328 kB
Buffers: 69440 kB
Cached: 59652 kB
SwapTotal: 130748 kB
SwapFree: 130384 kB
#### Check current swaps ####
[root tmp]# cat /proc/swaps
Filename Type Size Used
Priority
/dev/md6 partition 231736 1804 -1
tried this, but my raq2 doesn't have a /proc/swaps file. any other
way to get this info.
#### cd to /home/tmp ####
[root tmp]# cd /home/tmp
#### create the swap file, using dd insures no holes ####
[root tmp]# dd if=/dev/zero of=swapfile bs=1024 count=1048576
1048576+0 records in
1048576+0 records out
so far so good, i just made mine [root tmp]# dd if=/dev/zero
of=swapfile bs=512 count=524288
half a gig should be perfect to go with 130MB swap partition and 256
mb ram.
#### execute 'mkswap; ####
[root tmp]# /sbin/mkswap -c -v1 /home/tmp/swapfile
Setting up swapspace version 1, size = 1073737728 bytes
[root tmp]# /sbin/mkswap -c -v1 /home/tmp/swapfile
Usage: /sbin/mkswap [-c] /dev/name [blocks]
and there is the Uh-Oh. when i followed instructions blindly, that was
the result. not being good at following anything anyway, i proceeded
to try this:
[root tmp]# /sbin/mkswap -c -v1 /home/tmp/swapfile 524288
Usage: /sbin/mkswap [-c] /dev/name [blocks]
not much better, then this was mildly ok, but not good enough:
[root tmp]# /sbin/mkswap -c -/home/tmp/swapfile 524288
Setting up swapspace size = 133890048
which makes my 512 mb or so empty file into a 127 mb swap file.
the new questions are:
does the raq2 and its dinosauric version number of red hat allow such a
large swap?
the word of Linus himself seems to indicate otherwise here:
http://hegel.ittc.ukans.edu/topics/linux/man-pages/man8/mkswap.8.html
should i just accept a 127 mb swap file and quit bitching and make my
empty file accordingly?
or, am i just missing something incredibly obvious and deserve a
spanking (from female members of the list only!)???
after 90 smoothe slappy days of serving, my poor raq has had two hard
boots in 3 days from the kswapd crashing, even tho its barely using the
swap anymore . . . .
grant