How many pty's

How many pty's

Post by Dave » Fri, 28 Apr 2000 04:00:00



can be configured on a 2.x.x kernal?

I really want 512 or 1024 if I can get that many. I examined tty.h
in the kernal source and found that NR_PTYS is defined to be 256
and a warning not to mess with it unless .....

Is it really necessary to hack the kernal to increase the count?

I considered just hacking /dev/MAKEDEV to increase the number,
but I think this may confuse the kernal if I also don't hack pty.[ch] :-(

What a mess.

Am I stuck with 256?

I hate to say this but solaris is so easy here, just edit /etc/system
to change cnt_pty to what ever number you need and reboot.

Oh well, maybe on a later kernal release this sort of thing will
be dealt with.

Dave

 
 
 

How many pty's

Post by Anders Larse » Fri, 28 Apr 2000 04:00:00



> can be configured on a 2.x.x kernal?

> I really want 512 or 1024 if I can get that many. I examined tty.h
> in the kernal source and found that NR_PTYS is defined to be 256
> and a warning not to mess with it unless .....

> Is it really necessary to hack the kernal to increase the count?

No, not if you use the Unix98 pty's available in the 2.2.x kernel.

Quote:> I considered just hacking /dev/MAKEDEV to increase the number,
> but I think this may confuse the kernal if I also don't hack pty.[ch] :-(

> What a mess.

> Am I stuck with 256?

The maximum that can be configured is 2048.

: CONFIG_UNIX98_PTY_COUNT:
:
: The maximum number of Unix98 PTYs that can be used at any one time.
: The default is 256, and should be enough for desktop systems. Server
: machines which support incoming telnet/rlogin/ssh connections and/or
: serve several X terminals may want to increase this: every incoming
: connection and every xterm uses up one PTY.
:
: When not in use, each additional set of 256 PTYs occupy
: approximately 8 KB of kernel memory on 32-bit architectures.

Quote:> I hate to say this but solaris is so easy here, just edit /etc/system
> to change cnt_pty to what ever number you need and reboot.

> Oh well, maybe on a later kernal release this sort of thing will
> be dealt with.

See above.
BTW, it's kernel with two ees.
              ^

--
Cheers
  Anders Larsen
e-mail: alarsen AT baumerident DOT com

Q: What does the CE in Windows CE stand for?
A: Caveat Emptor

 
 
 

How many pty's

Post by H. Peter Anv » Sat, 29 Apr 2000 04:00:00




In newsgroup: comp.os.linux.development.system

Quote:

> : When not in use, each additional set of 256 PTYs occupy
> : approximately 8 KB of kernel memory on 32-bit architectures.

> > I hate to say this but solaris is so easy here, just edit /etc/system
> > to change cnt_pty to what ever number you need and reboot.

> > Oh well, maybe on a later kernal release this sort of thing will
> > be dealt with.

> See above.
> BTW, it's kernel with two ees.
>               ^

In a future release (2.5 series) this hopefully will either be a
sysctl or fully dynamic.

        -hpa

--

"Unix gives you enough rope to shoot yourself in the foot."

 
 
 

1. 'all network ports in use' or 'no pty available' solution

I have read numerous messages concerning telnetd and other remote access
programs having the error 'all network ports in use' or 'no pty available'.
I was haing this problem also with a minimal NFS boot setup I made.  The
solution turned out to be a missing device entry. Namely '/dev/ptmx'. Once I
created that entry in /dev the problem went away.

Steve

2. weird ksh behaviour on AIX

3. 'write' in combination with unix98 pty's

4. Install problems w/SuSE 6.3 on AS 500/500

5. rp-pppoe - unrecognized option 'pty'

6. lm_sensors-2.5.5

7. pts, pty, and 'xterm -Sccn'

8. Solaris patch - /var/sadm/pkg ?

9. 'pty' upgraded for POSIX based UNIX??

10. <defunct> process's eat up pty's

11. question about pppd, pty's and tty's

12. Can't see pty's > 16?

13. Can't open pty's