OpenVZ Forum


Home » General » Support » pts limit
pts limit [message #3185] Tue, 16 May 2006 16:26 Go to next message
molliver is currently offline  molliver
Messages: 30
Registered: May 2006
Member
Hi,

Can anyone please tell me what the limit is on pts's in a virtual system and whether they use the host pts's or their own. I.e can I have two virtual servers on the same host both with thoretically all 2048 pts used up?

I am considering using openvz to solve a login problem on our server where we can not get enough session due to the kernel restrictions on pts rather than lack of server resources.

Thanks

Mark
Re: pts limit [message #3197 is a reply to message #3185] Wed, 17 May 2006 05:42 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
There is option of vzctl to set number of pty:

--numpty items[:items]

Number of pseudo-terminals (PTY). Note that in OpenVZ each VPS can have not more than 255 PTYs. Setting the barrier and the limit
to different values does not make practical sense.
Re: pts limit [message #3199 is a reply to message #3197] Wed, 17 May 2006 05:58 Go to previous messageGo to next message
molliver is currently offline  molliver
Messages: 30
Registered: May 2006
Member
Hi,

Surly 255 seams a little low and would only allow me 255 ssh'd users? Is there no way to increase this? an option in the kernel configuration perhaps?
Otherwise how do i get all my users to log onto the server via ssh at the same time to do their work?

Thanks

Mark
Re: pts limit [message #3202 is a reply to message #3197] Wed, 17 May 2006 07:59 Go to previous messageGo to next message
molliver is currently offline  molliver
Messages: 30
Registered: May 2006
Member
I am a little confused,

I have just re-read you email and you have replied regarding pty's rather than pts's. I have just done a who on my machine it it shows me logged onto a pts not a pty. Is there a differance? and what is the maximum number ?

[root@mail ~]# w
08:55:25 up 7 days, 15:57, 1 user, load average: 0.01, 0.01, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
xxx pts/0 192.168.x.x 08:50 1.00s 0.02s 0.00s login -- xxx

The system also show the following for pty's
[root@mail ~]# sysctl -A|grep pty
kernel.pty.nr = 0
kernel.pty.max = 4096

Any ideas what / how this is controlled?

Thanks

Mark

Re: pts limit [message #3207 is a reply to message #3185] Wed, 17 May 2006 09:59 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Quote:

I am considering using openvz to solve a login problem on our server where we can not get enough session due to the kernel restrictions on pts rather than lack of server resources.

Quote:

[root@mail ~]# sysctl -A|grep pty
kernel.pty.nr = 0
kernel.pty.max = 4096


Hmmm... If you need more than 4096 pts (pty), why don't you enlarge the limit of ptys? You can do it using:
echo 10000 > /proc/sys/kernel/pty/max
command.


Re: pts limit [message #3209 is a reply to message #3199] Wed, 17 May 2006 10:18 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Quote:

...whether they[VPSs] use the host pts's or their own


They use their own, so no probelm to have 1000 pts in one VPS and 1000 pts in another, while the limit of pts on HN is 1000.

Quote:

Number of pseudo-terminals (PTY). Note that in OpenVZ each VPS can have not more than 255 PTYs. Setting the barrier and the limit
to different values does not make practical sense.


Sorry, I was wrong! This was written in man page on vzctl, which, I suppose, is depricated. Nowadays you can use > 255 as a limit.
Re: pts limit [message #3224 is a reply to message #3209] Wed, 17 May 2006 15:37 Go to previous messageGo to next message
molliver is currently offline  molliver
Messages: 30
Registered: May 2006
Member
Is there another limiting factor above these settings? Perhaps a device limit of 2048?
This is based on a realistic projection of users, rather than a wistful "will it work if everyone from never-neverland wants to ssh to it".

Mark
Re: pts limit [message #3225 is a reply to message #3224] Wed, 17 May 2006 15:51 Go to previous message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Quote:

Is there another limiting factor above these settings? Perhaps a device limit of 2048?


Well... Each process can open only 1024 files - so only 1024 terminals. It's per process limitation.

Maximum ptys number over the whole system is 2^20.
This is defined in pty-driver.

But, certainly, amount of your system resources, like memory, etc.,
is crutual too.

I don't think there can be any device limitation.

Quote:

This is based on a realistic projection of users, rather than a wistful "will it work if everyone from never-neverland wants to ssh to it".


=) You are always welcome with your questions! Good luck.
Previous Topic: *SOLVED* Debian compile problem
Next Topic: *SOLVED* moving vds on the another drive
Goto Forum:
  


Current Time: Sun Jun 29 22:14:27 GMT 2025

Total time taken to generate the page: 0.01869 seconds