Home > Archive > alt.os.linux > July 2002 > Increasing number of Record Locks available





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Increasing number of Record Locks available
RJ

2002-07-30, 11:25 am

Can anyone tell me how to increase the maximum number of record locks
available in linux. We are running RedHat 7.3. A software program we are
using for e-mail (CommuniGate Pro) gives us the error: Failed to Lock

/usr/include/asm/erron.h:
#define ENOLCK 37 /* No record locks available */

If anyone can provide me with instructions to increase the max number
(and/or size) of record locks available it would be much appriciated.

Thanks in advance for any and all help.


Peter T. Breuer

2002-07-30, 1:25 pm

RJ </NoSpam\newsgrps@rjconnell.com> wrote:
> Can anyone tell me how to increase the maximum number of record locks


Record lock? What do you mean? A lock on a region of a file, rather
than on a whole file?

> available in linux. We are running RedHat 7.3. A software program we are
> using for e-mail (CommuniGate Pro) gives us the error: Failed to Lock


Well, look at the code and see where it gets its error from. Or ask
its authors! An error value in itself may mean nothing or something.

> /usr/include/asm/erron.h:
> #define ENOLCK 37 /* No record locks available */


> If anyone can provide me with instructions to increase the max number
> (and/or size) of record locks available it would be much appriciated.


What are they? Size? Eh? What?

The lock implemetation is in fs/locks.c. As far as I can see, ENOLCK
is returned when getting a lock failed for some reason, not necessarily
when we are out of lock structs. Indeed, the errors list for fcntl
(man 2 fcntl) bears that out:


ENOLCK Too many segment locks open, lock table is full,
or a remote locking protocol failed (e.g. locking
over NFS).

"segment lock"! Ahhh yes. That's the right word.

Talk to the authors.

* linux/fs/locks.c
*
* Provide support for fcntl()'s F_GETLK, F_SETLK, and F_SETLKW calls.
* Doug Evans (dje@spiff.uucp), August 07, 1992

As far as I can see, it's a list, not a table. So I don't see how one
can run out. What does /proc/locks say to you?

LIST_HEAD(file_lock_list);
static LIST_HEAD(blocked_list);

Uh .. each _process_, however, has a lmit on the number of locks it can
make! That should be settable in your shell (e.g. via ulimit in bash?).

current->rlim[RLIMIT_LOCKS]

By default, it looks as though each process can only hold 10 locks
simultaneously:


include/asm/resource.h:#define RLIMIT_LOCKS 10 /* maximum file locks held */


You may want to recompile. Talk to the authors of your software.


Peter
RJ

2002-07-30, 1:25 pm

Thanks for your help, I believe the problem (as you brought to my attn) is
the default limit of 10 locks per process ... The e-mail program we are
using is currently set to use external mailboxes (which I believe is what
started this whole mess in the first place by requiring more locks) ... the
authors haven't been that helpful to this point, your help was actually much
more helpful. I apologize for the vagueness and technical incorrectness of
my post. I am in comparison novice to intermediate in linux/unix skills,
never the less your help is much appriciated.

Thanks Again,
RJ


"Peter T. Breuer" <ptb@oboe.it.uc3m.es> wrote in message
news:hgl6ia.v4l.ln@news.it.uc3m.es...
> RJ </NoSpam\newsgrps@rjconnell.com> wrote:
> > Can anyone tell me how to increase the maximum number of record locks

>
> Record lock? What do you mean? A lock on a region of a file, rather
> than on a whole file?
>
> > available in linux. We are running RedHat 7.3. A software program we

are
> > using for e-mail (CommuniGate Pro) gives us the error: Failed to Lock

>
> Well, look at the code and see where it gets its error from. Or ask
> its authors! An error value in itself may mean nothing or something.
>
> > /usr/include/asm/erron.h:
> > #define ENOLCK 37 /* No record locks available */

>
> > If anyone can provide me with instructions to increase the max number
> > (and/or size) of record locks available it would be much appriciated.

>
> What are they? Size? Eh? What?
>
> The lock implemetation is in fs/locks.c. As far as I can see, ENOLCK
> is returned when getting a lock failed for some reason, not necessarily
> when we are out of lock structs. Indeed, the errors list for fcntl
> (man 2 fcntl) bears that out:
>
>
> ENOLCK Too many segment locks open, lock table is full,
> or a remote locking protocol failed (e.g. locking
> over NFS).
>
> "segment lock"! Ahhh yes. That's the right word.
>
> Talk to the authors.
>
> * linux/fs/locks.c
> *
> * Provide support for fcntl()'s F_GETLK, F_SETLK, and F_SETLKW calls.
> * Doug Evans (dje@spiff.uucp), August 07, 1992
>
> As far as I can see, it's a list, not a table. So I don't see how one
> can run out. What does /proc/locks say to you?
>
> LIST_HEAD(file_lock_list);
> static LIST_HEAD(blocked_list);
>
> Uh .. each _process_, however, has a lmit on the number of locks it can
> make! That should be settable in your shell (e.g. via ulimit in bash?).
>
> current->rlim[RLIMIT_LOCKS]
>
> By default, it looks as though each process can only hold 10 locks
> simultaneously:
>
>
> include/asm/resource.h:#define RLIMIT_LOCKS 10 /*

maximum file locks held */
>
>
> You may want to recompile. Talk to the authors of your software.
>
>
> Peter



Peter T. Breuer

2002-07-30, 2:25 pm

RJ </NoSpam\newsgrps@rjconnell.com> wrote:
> Thanks for your help, I believe the problem (as you brought to my attn) is
> the default limit of 10 locks per process ... The e-mail program we are


Well, launch more processes. Any email program of any kind will be
prepared to launch umpteen gazillion processes. The problem
is stopping it doing that when you don't want it to!

> using is currently set to use external mailboxes (which I believe is what


?? What? External? What are "internal" mailboxes? All the email
programs in the world use external mailboxes .. they're called "files"!
A delivery process will open a mailbox and deliver mail to it, then
die. One process, one mailbox, of course, becuase it must setuid
to the owner of the mailbox in order to deliver.

> started this whole mess in the first place by requiring more locks) ... the
> authors haven't been that helpful to this point, your help was actually much


If they're not helpful, then don't use their software. Are you sure
you're not just trying to do something silly, like use fcntl
locks on an nfs v2 mount? I.e. a file system that doesn't support them?

Peter
RJ

2002-07-31, 10:25 am


"Peter T. Breuer" <ptb@oboe.it.uc3m.es> wrote in message
news:jhr6ia.m4s.ln@news.it.uc3m.es...
> ?? What? External? What are "internal" mailboxes? All the email
> programs in the world use external mailboxes .. they're called "files"!


Sorry to confuse you with my terminology. "External mailboxes" is what the
author of the software (Stalker Software www.stalker.com) calls the setup we
have ... the difference being an "internal mailbox" is one single database
file that contains the e-mail for every user, and "external mailboxes" are
individual files for each user under /var/mail (similar to sendmail). (and
just incase your assuming that the product we are using is somthing youd
find in a cracker-jack box, perhapse you should look into it ... its used by
Harvard, McLeod USA, UUNet, Turbolinux, University of Chicago, and Megapath
Networks just to name a few ... the reason we are using the product dispite
the lack of what I would consider to be extremely good tech support is
because it has recieved higher ratings for reliability stability and
security than any other e-mail platform including sendmail, and exchange by
NetworkComputing, About.com, and NetworkWorld). Again, thanks for you help
never the less.

> A delivery process will open a mailbox and deliver mail to it, then
> die. One process, one mailbox, of course, becuase it must setuid
> to the owner of the mailbox in order to deliver.
>




Peter T. Breuer

2002-07-31, 11:25 am

RJ </NoSpam\newsgrps@rjconnell.com> wrote:
> Sorry to confuse you with my terminology. "External mailboxes" is what the
> author of the software (Stalker Software www.stalker.com) calls the setup we
> have ... the difference being an "internal mailbox" is one single database


I see. Databases .. hmm. And what is the advantage? Opening a file is
not a cpu intensive operation. Talking to a file system instead of
a DB on a raw disk (ir would have to be oracle, surely) is not cpu
intensive. Why all this hassle?

> file that contains the e-mail for every user, and "external mailboxes" are
> individual files for each user under /var/mail (similar to sendmail). (and
> just incase your assuming that the product we are using is somthing youd
> find in a cracker-jack box, perhapse you should look into it ... its used by
> Harvard, McLeod USA, UUNet, Turbolinux, University of Chicago, and Megapath
> Networks just to name a few ... the reason we are using the product dispite


But why? There are perfectly standard solutions to apply. Mail is not a
cpu-intensive operation, nor one that is taxing - thelimit on it is
probably the latency induced by checking the inverse DNS lookup. If
you ARE doing cpu intensive thinsg - like scanning it for viruses -
then that will dominate, and you can forget about questions of
file system suitability versus database suitability.

The normal thing is to have your MX as a round robin list of about 5-10
incoming servers all of which pass the mail on to designated secondary
hubs, from which people take the mail. You might even want to pass it on
to a third ring, and do some mail scanning in the second ring instead.

I don't think you need any more. That would be good for receiving
something like 40 or 50 mails a second if the first ring was as small as
five machines.

What's the reason for looking for a proprietary solution? There are
open source ones too!

Peter
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net