[comp.unix.admin] vi file size limit?

cruff@ncar.ucar.edu (Craig Ruff) (10/05/90)

In article <6126@plains.NoDak.edu> bfoushe@plains.NoDak.edu (Bill Foushee) writes:
>I'm trying to find out the definitive answer to... Is there a size
>limit for a file that can be edited using vi?

Vi has a limit based on the size of the pointers used to indicate the
start of lines in the temporary file.  The size of the pointers can
be either 16 or 32 bits in size.  The low-order bit is not used as part
of the index.  The index is shifted left by some configurable amount
before being used as the offset in the temporary file.  The basic
(non-VMUNIX version) handles upto 256Kb.  It could be recompiled for
up to 512Kb.  For versions with VMUNIX defined, the limit is based
on available memory and disk space.  Note: for those with source, the
parameters are in ex_temp.h.
-- 
Craig Ruff      	NCAR			cruff@ncar.ucar.edu
(303) 497-1211  	P.O. Box 3000
			Boulder, CO  80307

bill@bilverbilver.uucp (Bill Vermillion) (10/05/90)

In article <6126@plains.NoDak.edu> bfoushe@plains.NoDak.edu (Bill Foushee) writes:
>I'm trying to find out the definitive answer to... Is there a size
>limit for a file that can be edited using vi?
 
>I'm using an AT&T 3B2/600g with Sys V 3.2.2, with 32M ram, a ulimit
>of 65536, and 21M swap space.
 
>The largest size file I can edit is about 250K.  The AT&T hotline
>tells me that vi can only handle files less than 200K,

It really depends on how you vi was compiled.  On an 68000 based
system I could get about 200k.  On this system a '386 running Esix.
I can get about 300-400k.  I have 8 megs of real memory and about
20 megs of swap.  I just tested it, and it quite just about 400k
with 9500+ lines from termcap cat'ed upon itself.

I also have a '386 Xenix system with 2 megs of ram and 6 megs of
swap.  I have edited files over 2 megs long on that machine.  I
copied it'x executeable over to here (xenix executeable running on
a Unix platform) and I just tested and got over a 1 meg file with
22000+ lines, before I decided that was a sufficient test to answer

It all depends on the vendor.

-- 
Bill Vermillion - UUCP: uunet!tarpit!bilver!bill
                      : bill@bilver.UUCP

cpcahil@virtech.uucp (Conor P. Cahill) (10/05/90)

In article <6126@plains.NoDak.edu> bfoushe@plains.NoDak.edu (Bill Foushee) writes:
>I'm trying to find out the definitive answer to... Is there a size
>limit for a file that can be edited using vi?

It depends upon whos vi it is.  Here is a snippit from the comp.unix.sysv386
FAQ posting that talks about it:

11. Why doesn't vi work on large files?

	There are two possible problems.  The first problem may be
	that you are running into a ULIMIT problem.  See the discussion
	under question 12 to figure out how to change/correct it.

	If this is not the probem, you may be running into a bug/feature
	of some VIs.  The problem is that there are compiled in limits
	as to the number of lines in the data file. 
	
	This problem is known to exist in the following Unix packages:

		AT&T System V Rel 3.2
		Bell Technologies System V Rel 3.2 (was ok in 3.1)

>I'm using an AT&T 3B2/600g with Sys V 3.2.2, with 32M ram, a ulimit
>of 65536, and 21M swap space.

I think AT&T broke it when they went from 3.1 to 3.2.  I had a BT 
system running SVR3.1 and vi would handle monstrous files (and nice 
big windows) and when I upgraded to 3.2 it no longer worked (of course
I then reloaded the vi that I had on 3.1 and everything was peachy keen.

>The largest size file I can edit is about 250K.  The AT&T hotline
>tells me that vi can only handle files less than 200K, but I know

I think they say that their vi can only handle files less than 200k.
Under ISC Unix, (which, by the way has a string in it "Version SVR3.1")
I routinely edit files larger than 1MB.

>computer using BSD 4.3 Unix.  Is this a difference in vi on the
>two systems, or should I be able to change the size of the file
>vi can edit on my 3B2/600g?  The system prints the message "Tmp

The real problem is that you can't change it.  They are compiled
into the binary.


-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.,
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 

lied@cbnewsc.att.com (Bob Lied) (10/08/90)

In article <194@camco.Celestial.COM>, bill@camco.Celestial.COM (Bill Campbell) writes:
> In article <6126@plains.NoDak.edu> bfoushe@plains.NoDak.edu (Bill Foushee) writes:
> :I'm trying to find out the definitive answer to... Is there a size
> :limit for a file that can be edited using vi?

It depends on the version and how it was compiled.  A peek at our
sources shows a #define for VMUNIX that will take advantage of
virtual memory and let you edit files as large as you can stand
the start-up time.  If your version tops out around 200K, see
if you can get it recompiled.  I know this to be true for SV system
on VAX, 3B1, and Amdahl.  Our vi version is 3.9.