[comp.unix.xenix] tunable parameters problem?

barton@holston.UUCP (barton) (06/11/89)

Please pardon me if this is an obviosly naive question, but
I am curious if there is some sort of limit on the number
of times a single user can open the same file in SCO 2.2.1
on a 286.
My problem occurs when the vertical package I developed is
running with 4+ users doing inquirys in the same masterfile.
Problem: eventually the system will refuse to open the files
requested for a particular user, no errors are generated other
than those in the application.
The files are RM/Cobol indexed data files. 
Is there some parameter I can adjust? I am nowhere near the
limit of 300 open files systemwide.
Since all the users log in under the same name to start the
application, I suspect that I am bumping into some limit.
All suggestions appreciated.

Barton A. Fisk          | UUCP: {texbell,uunet}!warble!holston!barton
PO Box 1781             | DOMAIN: barton@holston.UUCP
Lake Charles, La. 70602 | ----------------------------------------
318-439-5984            | +++++ "Hal, open the pod bay doors" --- Dave

pfrennin@altos86.Altos.COM (Peter Frenning) (06/17/89)

In article <27@holston.UUCP> barton@holston.UUCP (barton) writes:
>Please pardon me if this is an obviosly naive question, but
>I am curious if there is some sort of limit on the number
>of times a single user can open the same file in SCO 2.2.1
>on a 286.
>My problem occurs when the vertical package I developed is
>running with 4+ users doing inquirys in the same masterfile.
>Problem: eventually the system will refuse to open the files
>requested for a particular user, no errors are generated other
>than those in the application.
>The files are RM/Cobol indexed data files. 
>Is there some parameter I can adjust? I am nowhere near the
>limit of 300 open files systemwide.
>Since all the users log in under the same name to start the
>application, I suspect that I am bumping into some limit.
>All suggestions appreciated.
>
>Barton A. Fisk          | UUCP: {texbell,uunet}!warble!holston!barton
>PO Box 1781             | DOMAIN: barton@holston.UUCP
>Lake Charles, La. 70602 | ----------------------------------------
>318-439-5984            | +++++ "Hal, open the pod bay doors" --- Dave

You are probably being hit by two factors simultaneously:
1. Every RM-Cobol indexed file is actually two files; a data file and an index
file.
2. Since all users log in under the same name the per user file limit apply, which is probably very small ==20 or so.

Thinking back I remember a third possibility; NFLOCKS number of file locks, this is probably it, due to Xenix/286's fairly restricted kernel space NFLOCKS is normally kept very small, and RM-Cobol is pretty lax with releasing locks, it even reserves a lock per open file, without even using it, try reconfiguring your system with a lower # of open files, more per user and more locks.

Good luck


+-----------------------------------------------------------------------+
|      Peter Frenning, Altos Computer Systems, San Jose                 |
+--------------------+--------------------------------------------------+
| I don't need a dis-| JackNet:        mgr.prodmkt!pfrennin             |
| claimer, since all | USENET:         pfrennin@altos86.UUCP            |
| my statements are  | VOICE:          (408) 496-6700                   |
| borrowed, and pro- | SNAILMAIL:      2641 Orchard Parkway             |
| bably already dis- |                 San Jose, CA 95134               |
| claimed by someone |                                                  |
| else!              | FAX:            (408) 433-9335                   |
|                PF  |                                                  |
+--------------------+--------------------------------------------------+

pcg@aber-cs.UUCP (Piercarlo Grandi) (06/19/89)

In article <27@holston.UUCP> barton@holston.UUCP (barton) writes:

    I am curious if there is some sort of limit on the number
    of times a single user can open the same file in SCO 2.2.1
    on a 286.

I would like to know too; there is a limit on the number of processes
the same userid can have, no matter how many times he is logged in, but files
ought to be openable without problems.

    My problem occurs when the vertical package I developed is
    running with 4+ users doing inquirys in the same masterfile.

Your masterfile is opened by four different instances of the application, or
it is a centralized server application attached to four terminals? If the
latter, check with the number of open file descriptors for that process.

    Problem: eventually the system will refuse to open the files requested
    for a particular user, no errors are generated other than those in the
    application.  The files are RM/Cobol indexed data files. 

    Is there some parameter I can adjust? I am nowhere near the
    limit of 300 open files systemwide.

A possibility is that you are bumping into a limit on the inode table or the
file table or the lock table. For the inode table, that is difficult; if the
same file is opened multiple times, only one inode is taken up. On the other
hand the file table usage grows with each open() because a different file
pointer needs to be allocated. I think it is probable that your Cobol library
rather does lock the file (especially as being indexed it wants to protect
its internal structure consistency), and by default most systems come with a
rather small lock table. Check that first.

    Since all the users log in under the same name to start the
    application, I suspect that I am bumping into some limit.

Yes, probably you bump into some limit, but probably not one related to the
fact that the same name is used (unless your cobol library spawns off
multiple processes to access the indexed seq file). It is a remote
possibility; just in case, check about that. The limit is tipically 20-25
processes per user id (number, not name -- look at ps -l).
-- 
Piercarlo "Peter" Grandi           | ARPA: pcg%cs.aber.ac.uk@nsfnet-relay.ac.uk
Dept of CS, UCW Aberystwyth        | UUCP: ...!mcvax!ukc!aber-cs!pcg
Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk

bill@bilver.UUCP (Bill Vermillion) (07/22/89)

In article <27@holston.UUCP> barton@holston.UUCP (barton) writes:
>Please pardon me if this is an obviosly naive question, but
>I am curious if there is some sort of limit on the number
>of times a single user can open the same file in SCO 2.2.1
>on a 286.

>My problem occurs when the vertical package I developed is
>running with 4+ users doing inquirys in the same masterfile.
>Problem: eventually the system will refuse to open the files
>requested for a particular user, no errors are generated other
>than those in the application.
>The files are RM/Cobol indexed data files. 

>Is there some parameter I can adjust? I am nowhere near the
>limit of 300 open files systemwide.
>Since all the users log in under the same name to start the
>application, I suspect that I am bumping into some limit.
>All suggestions appreciated.
>

You are running into the limit on the number of processes an individual user can
have open.  I have seen this before, all users signing on with the same name,
and typically with applications ported from a non Unix/Xenix environment.

Why not write the program so any user can log in under their own name - or
assigned name.  THis is in the spirit of the OS.   If you have to have
permission associated with the users make the program set used id so the user
runs with the effecive id of the program.  

You will probably see more problems in the future if they ever want to run
some other applications.  You can adjust the parameter for maxprocs using the
configure option, but you still ought to have the users have individual ids.

bill 

-- 
Bill Vermillion - UUCP: {uiucuxc,hoptoad,petsd}!peora!rtmvax!bilver!bill
                      : bill@bilver.UUCP

jbayer@ispi.UUCP (Jonathan Bayer) (07/22/89)

In article <27@holston.UUCP> barton@holston.UUCP (barton) writes:
>I am curious if there is some sort of limit on the number
>of times a single user can open the same file in SCO 2.2.1
>on a 286.
>My problem occurs when the vertical package I developed is
>running with 4+ users doing inquirys in the same masterfile.
>Problem: eventually the system will refuse to open the files
>requested for a particular user, no errors are generated other
>than those in the application.
>Is there some parameter I can adjust? I am nowhere near the
>limit of 300 open files systemwide.
>Since all the users log in under the same name to start the
>application, I suspect that I am bumping into some limit.
>All suggestions appreciated.


You have two problems here.  The first is that you are having multiple
people logging on as the same user id.  This is not a good idea.  There
are internal tables that will get filled up this way, and possible
prevent anybody from logging on in the future.

Your second problem can be solved by increasing the following parameters
by using the /usr/sys/conf/configure program:

Parameter	Description				System default
NINODE		maximum open inodes per file system	   100
NFILE		maximum open files per file system	   100

Try increasing them to 150, then to 200 if you need it.  BTW, where did
you get that figure of 300 for the maximum open files systemwide?


JB
-- 
Jonathan Bayer			      Beware: The light at the end of the
Intelligent Software Products, Inc.	      tunnel may be an oncoming dragon
500 Oakwood Ave.				...uunet!ispi!root
Roselle Park, NJ   07204    (201) 245-5922    jbayer@ispi.UUCP