How to increase size of vn-device swapfile?

How to increase size of vn-device swapfile?

Post by Sohail Asl » Tue, 22 Apr 1997 04:00:00



I followed the instructions in the FAQ on adding a vn-device to increase
swap size:

  1.  create a vn-device
           cd /dev; sh ./MAKEDEV vn0
  2.  create a swapfile (/var/swap0)
           dd if=/dev/zero of=/var/swap0 bs=1024k count=64
  3.  put into /etc/rc.local the line
           vnconfig -ce /dev/vn0c /var/swap0 swap

Questions:
1. How can increase the size of /var/swap0 (the file)?
2. How can I disable swapping to the vn-device?
3. Is the performance of swapping/paging on a vn-device the same as on
   a hard partition?

For the time being, I created another vn-device (vn1c) and another 64MB
file in /var (swap1) and vnconfig'd swap on it.

--
Sohail Aslam                  
Department of Computer Science, Lahore University of Management Sciences (LUMS)
Lahore, Pakistan    tel: 92-42-572-2670   fax: 92-42-572-2591

 
 
 

How to increase size of vn-device swapfile?

Post by Philippe Caus » Tue, 22 Apr 1997 04:00:00


: I followed the instructions in the FAQ on adding a vn-device to increase
: swap size:

:   1.  create a vn-device
:            cd /dev; sh ./MAKEDEV vn0
:   2.  create a swapfile (/var/swap0)
:            dd if=/dev/zero of=/var/swap0 bs=1024k count=64
:   3.  put into /etc/rc.local the line
:            vnconfig -ce /dev/vn0c /var/swap0 swap

: Questions:
: 1. How can increase the size of /var/swap0 (the file)?
No ! If you expand the file, it may corrupt the data already placed
in the active swap file...
Just add a second swap file :-)

: 2. How can I disable swapping to the vn-device?
There isn't any swapoff command! The only solution is to edit your
/etc/vntab (to disable it), then reboot, increase the size of the swap-file,
and re-activate-it !

: 3. Is the performance of swapping/paging on a vn-device the same as on
:    a hard partition?
No ! Swapping on a file is many times slower than swapping on a disk
partition because pagings requests have to go through the VFS/FFS layer.
Swapping on the disk is considerably faster and should be used as much
as possible.
Another improvement is to define swapping areas on two different discs (or
more) since it will reduce bottlenecks. (same principle as RAID-0).

: For the time being, I created another vn-device (vn1c) and another 64MB
: file in /var (swap1) and vnconfig'd swap on it.
That's the only reasonable thing to do, if you can't afford a new disk!

: --
: Sohail Aslam                  
: Department of Computer Science, Lahore University of Management Sciences (LUMS)
: Lahore, Pakistan    tel: 92-42-572-2670   fax: 92-42-572-2591

--
-------------------------------------------------------------------
P. Causse                       http://www.fdn.fr/~pcausse


 
 
 

How to increase size of vn-device swapfile?

Post by H. Ecke » Tue, 22 Apr 1997 04:00:00



Quote:>   3.  put into /etc/rc.local the line
>            vnconfig -ce /dev/vn0c /var/swap0 swap

> 1. How can increase the size of /var/swap0 (the file)?

Simply boot into single-user mode so the file isn't in use
as a swap-area.

Quote:> 2. How can I disable swapping to the vn-device?

You can't when it has been attached.  This is a design limitation
that presumably can't be removed easily.  To fix this it would be
necessary to designate a swap-area as "dying" so that nothing will
be stored to it anymore.  Every time a page is read from a dying
swap-area it should be transferred to a living one and eventually
nothing is stored in the dying area, so it can be marked dead.  Only
a truly dead area could be detached at all.
Another approach would be to kill all processes that have some pages
in a dying area (not really a good idea) or actively transferring the
pages to a living area (possibly freezing the whole machine in the
meantime).
Anyway, a solution would be quite complicated and would need severe
changes on the heart of the system...

Quote:> 3. Is the performance of swapping/paging on a vn-device the same as on
>    a hard partition?

AFAIK direct swapping is more efficient since it doesn't have to
go through the filesystem.

Quote:> For the time being, I created another vn-device (vn1c) and another 64MB
> file in /var (swap1) and vnconfig'd swap on it.

Unless you reboot the machine there isn't another way to do it.
Dynamically appending NULs to the active swap-file is something
I'd avoid, too.  I don't think the system would like it.

Greetings,
                                Ripley
--
H. Eckert, 10777 Berlin, Germany
ISO 8859-1: ?=Ae, ?=Oe, =Ue, ?=ae, ?=oe, =ue, ?=sz.
"(Technobabbel)" (Jetrel) - "Mssen wir uns diesen Schwachsinn wirklich
anh?ren?" (Neelix)

 
 
 

How to increase size of vn-device swapfile?

Post by Nick Say » Tue, 29 Apr 1997 04:00:00



>I followed the instructions in the FAQ on adding a vn-device to increase
>swap size:
>  1.  create a vn-device
>           cd /dev; sh ./MAKEDEV vn0
>  2.  create a swapfile (/var/swap0)
>           dd if=/dev/zero of=/var/swap0 bs=1024k count=64
>  3.  put into /etc/rc.local the line
>           vnconfig -ce /dev/vn0c /var/swap0 swap
>Questions:
>1. How can increase the size of /var/swap0 (the file)?

You must stop using it, then increase its size.

Quote:>2. How can I disable swapping to the vn-device?

You must remove the vnconfig from rc.local and reboot.

Quote:>3. Is the performance of swapping/paging on a vn-device the same as on
>   a hard partition?

It can't help but be a little less, since it has to figure out what
blocks are swap rather than simply using a range.

It's not so terrible, though. It interleaves the swap devices
so that if they're on different spindles you can win from that.

Quote:>For the time being, I created another vn-device (vn1c) and another 64MB
>file in /var (swap1) and vnconfig'd swap on it.

Ick. If you interleave two swap chunks on the same disk, you do a lot of
seeking between them.

>--
>Sohail Aslam                  
>Department of Computer Science, Lahore University of Management Sciences (LUMS)
>Lahore, Pakistan    tel: 92-42-572-2670   fax: 92-42-572-2591


--
Nick Sayer  http://www.kfu.com/~nsayer/ |
nsayer [at] quack [dot] kfu [dot] com   | "Hate Crime" == "ThoughtCrime"
UNSOLICITED BULK EMAIL IS UNACCEPTABLE  |
AND WILL BE CONSIDERED AS HARASSMENT    |
 
 
 

1. Why throughput increases as MTU size is increased

Hi All,
 I have a question which I am not able to answer myself.I request you all to
give
me some input.
 When I measure the performance of iSCSI on XScale with MTU size = 1500 bytes,
a throughput of 32 Mbps was observed. As the MTU size was increased, the
throughput also increased.
1500 -> 32 Mbps
3000 -> 56
4500 -> 80
6000 -> 100
7500 -> 108
9000 -> 108

Actually the throughput saturates. I thought, the per-packet overhead
decreases as the MTU
size increases. This contributes to the performance improvement. And the
saturation is achieved because, the iSCSI max PDU size is 8k. Even if
we increase the MTU size beyond 8k, we will not see any change because,
iSCSI
devivers a max of 8K PDU to TCP. Therefore a saturation in throughput is
observed.

But  the question is, Am I thinking correctly?
secondly, if yes,does the per-packet over head decrease the performance so
much. we are observing, somewhere like 4 times improvement in throughput. Can
there be any other reason for this observation.

Thanking you
Shesha

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. "startx" log file?!?

3. /var is size 100% how to increase the Size

4. Help with second serial terminal

5. hardrive removed, including swapfile how to stop mounting swapfile and make another

6. History of Linux

7. swapfile size for 24 Megs ram

8. Using printcap fax with wordperfect and star office

9. Swapfile sizes

10. UMSDOS swapfile size?

11. Maximum size of swapfile?

12. Swapfile sizes

13. Max Swapfile Size???