DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 11th May 2013
Martillo Martillo is offline
Semper deinceps corda
 
Join Date: Apr 2013
Location: Madrid, Spain
Posts: 65
Thanked 0 Times in 0 Posts
Question Login class 'staff' datasize limits

Hello, my main user is assigned to the login class staff, as I can see issuing a userinfo command. File /etc/login.conf is the default and unchanged.

The problem is that I hit the datasize-cur memory limit of 512 Mb as expected and the process dies, but then I wonder why is the datasize-max limit set to infinity for, if the system does not allows a process to go farther than datasize-cur.

I am puzzled.
Reply With Quote
  #2   (View Single Post)  
Old 12th May 2013
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 332
Thanked 9 Times in 9 Posts
Default

datasize-cur is the CURRENT limit. datasize-max is what this class is allowed to raise the datasize-cur limit to:

$ whoami
rocket357
$ userinfo rocket357 | grep class
class staff
$ ulimit -d
524288
$ ulimit -d 710000
$ ulimit -d
710000

By default datasize is 512 MB, but I am allowed to raise it to datasize-max...
__________________
Linux Admin by Profession. OpenBSD user by choice.
Reply With Quote
  #3   (View Single Post)  
Old 12th May 2013
Martillo Martillo is offline
Semper deinceps corda
 
Join Date: Apr 2013
Location: Madrid, Spain
Posts: 65
Thanked 0 Times in 0 Posts
Default

So you mean it is not automatic, and one have to raise the limit oneself using ulimit?

Thanks!

Last edited by Martillo; 12th May 2013 at 01:12 AM.
Reply With Quote
  #4   (View Single Post)  
Old 12th May 2013
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 332
Thanked 9 Times in 9 Posts
Default

What would be the point of having a *limit* if it automatically rose with use?

It's designed such that you can do something like the following:

alias firefox='ulimit -d 768000; firefox'

It allows you to configure per-process limits (while maintaining sane default settings).
__________________
Linux Admin by Profession. OpenBSD user by choice.
Reply With Quote
  #5   (View Single Post)  
Old 13th May 2013
Martillo Martillo is offline
Semper deinceps corda
 
Join Date: Apr 2013
Location: Madrid, Spain
Posts: 65
Thanked 0 Times in 0 Posts
Default

Good to know. Thanks again!
Reply With Quote
  #6   (View Single Post)  
Old 13th May 2013
Martillo Martillo is offline
Semper deinceps corda
 
Join Date: Apr 2013
Location: Madrid, Spain
Posts: 65
Thanked 0 Times in 0 Posts
Default

I have tried to alias some commands like your example, upping datasize limits, and they work from command line as expected. However when I tried them from spectrwm's dmenu (using xdm to log in), the processes crash when they reach the limits in login.conf, not the specified in the aliases.

Alias are set in ~/.profile
Reply With Quote
  #7   (View Single Post)  
Old 13th May 2013
rocket357's Avatar
rocket357 rocket357 is offline
Real Name: Jonathon
Wannabe OpenBSD porter
 
Join Date: Jun 2010
Location: 127.0.0.1
Posts: 332
Thanked 9 Times in 9 Posts
Default

You'll have to get someone who is familiar with spectrwm to answer that one.
__________________
Linux Admin by Profession. OpenBSD user by choice.
Reply With Quote
  #8   (View Single Post)  
Old 13th May 2013
Martillo Martillo is offline
Semper deinceps corda
 
Join Date: Apr 2013
Location: Madrid, Spain
Posts: 65
Thanked 0 Times in 0 Posts
Default

It happens in WindowMaker too.

I think it is something related to xdm.

edit: 2013-05-17: BTW, in the end, having 6 GB of memory, I raised datasize-cur to 5 GB, enough for most desktop applications. Lazy me

Thanks again, rocket357, I had not thought about ulimit without your help. I was more familiar with csh than with ksh.

Last edited by Martillo; 17th May 2013 at 05:05 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
25,000 Danish hospital staff to move to LibreOffice J65nko News 0 20th August 2011 08:15 PM
Private connection class problem majkelos OpenBSD Security 7 22nd September 2010 08:10 PM
UML Class Diagrams with umbrello corey_james Programming 1 19th May 2008 04:13 AM
Going to my First Solaris Class roundkat Solaris 9 6th May 2008 02:23 AM


All times are GMT. The time now is 12:33 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick