DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 28th October 2018
hanzer's Avatar
hanzer hanzer is offline
Real Name: Adam Jensen
just passing through
 
Join Date: Oct 2013
Location: EST USA
Posts: 314
Default sysctl, login class and ulimit settings for a modern machine

$ doas usermod -L staff hanzer

When compiling some ports, even a staff class user hits resource limits that stops the build. What are some good settings for a modern machine? (4 cores, 32GB RAM)
Reply With Quote
  #2   (View Single Post)  
Old 28th October 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

I'm guessing you have a non-standard port build configuration. To narrow down the possible causes:
  • What are the contents of /etc/mk.conf?
  • What port(s) is(are) failing to build?
  • What is the failure?
Reply With Quote
  #3   (View Single Post)  
Old 28th October 2018
hanzer's Avatar
hanzer hanzer is offline
Real Name: Adam Jensen
just passing through
 
Join Date: Oct 2013
Location: EST USA
Posts: 314
Default

Quote:
Originally Posted by jggimi View Post
I'm guessing you have a non-standard port build configuration. To narrow down the possible causes:
  • What are the contents of /etc/mk.conf?
  • What port(s) is(are) failing to build?
  • What is the failure?
I haven't done anything funky (yet ) with the ports setup. It is configured to build as a user in the wsrc group.

1) $ cat /etc/mk.conf
Code:
SUDO=doas
CLEANDEPENDS=Yes
2) /usr/ports/devel/ipython - there are many dependencies. The stop occurs fairly deep into the process.

3) $ env FLAVOR="python3" make install clean - attempting to reproduce the failure now. It might take an hour or so for the build to get to the fail point. I will post the exact message then. But if I recall correctly, the failure did mention something about ulimit -d, suggesting (it seemed at the time) insufficient resources.
Reply With Quote
  #4   (View Single Post)  
Old 28th October 2018
ibara ibara is offline
OpenBSD language porter
 
Join Date: Jan 2014
Posts: 783
Default

You could set ulimit -d to something outrageous, like
$ ulimit -d 8000000
Reply With Quote
  #5   (View Single Post)  
Old 28th October 2018
hanzer's Avatar
hanzer hanzer is offline
Real Name: Adam Jensen
just passing through
 
Join Date: Oct 2013
Location: EST USA
Posts: 314
Default

Quote:
Originally Posted by jggimi View Post
* What is the failure?
Code:
===>  Compiler link: clang -> /usr/bin/clang                                                                                                  
===>  Compiler link: clang++ -> /usr/bin/clang++
===>  Compiler link: cc -> /usr/bin/cc                                                                                                        
===>  Compiler link: c++ -> /usr/bin/c++
===>  Configuring for rust-1.29.2                                                                                                             
Using /usr/ports/pobj/rust-1.29.2/config.site (generated)                                                                                     
datasize limit is too low - amd64 build takes approx 4GB                                                                                      
*** Error 1 in /usr/ports/lang/rust (Makefile:123 'pre-configure': @if [ `ulimit -d` -lt 3145728 ]; then  echo datasize limit is too low - a...
)
$ ulimit -d
Code:
1572864
So, $ ulimit -d 3200000 followed by $ env FLAVOR="python3" make install clean and the build resumes.

Where are the default ulimit values set? That number (1572864) doesn't look like it came from /etc/login.conf.
Reply With Quote
  #6   (View Single Post)  
Old 29th October 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Per ksh(1), data limits are shown in kilobytes, and, from the amd64 /etc/login.conf v1.9, February 2017:
Code:
staff:\
        :datasize-cur=1536M:\
1536 x 1024 = 1572864
Reply With Quote
  #7   (View Single Post)  
Old 29th October 2018
fvgit's Avatar
fvgit fvgit is offline
Spikes in tights
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("U2hlcndvb2QgRm9yZXN0")'
Posts: 314
Default

Quote:
Originally Posted by hanzer View Post
Code:
                                                                                    
datasize limit is too low - amd64 build takes approx 4GB
Just an additional observation. In this context it might be possibly of interest to point out the limits login.conf sets for the pbuild user:

Code:
#
# Building ports with DPB uses raised limits
#
pbuild:\
        :datasize-max=infinity:\
        :datasize-cur=4096M:\
        :maxproc-max=1024:\
        :maxproc-cur=256:\
        :tc=default:
Reply With Quote
  #8   (View Single Post)  
Old 29th October 2018
hanzer's Avatar
hanzer hanzer is offline
Real Name: Adam Jensen
just passing through
 
Join Date: Oct 2013
Location: EST USA
Posts: 314
Default

Quote:
Originally Posted by jggimi View Post
Per ksh(1), data limits are shown in kilobytes, and, from the amd64 /etc/login.conf v1.9, February 2017:
Code:
staff:\
        :datasize-cur=1536M:\
1536 x 1024 = 1572864
Nice catch! Thanks. I guess I had too much going on at the end of a long day.
Reply With Quote
  #9   (View Single Post)  
Old 29th October 2018
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

fvgit's catch was better than mine.
Reply With Quote
Old 29th October 2018
hanzer's Avatar
hanzer hanzer is offline
Real Name: Adam Jensen
just passing through
 
Join Date: Oct 2013
Location: EST USA
Posts: 314
Default

Quote:
Originally Posted by fvgit View Post
Just an additional observation. In this context it might be possibly of interest to point out the limits login.conf sets for the pbuild user:
$ perl -MMIME::Base64 -le 'print decode_base64("WWVzLCBpbmRlZWQuIFRoYW5rcyE=")'
Reply With Quote
Old 29th October 2018
fvgit's Avatar
fvgit fvgit is offline
Spikes in tights
 
Join Date: May 2016
Location: perl -MMIME::Base64 -le 'print decode_base64("U2hlcndvb2QgRm9yZXN0")'
Posts: 314
Default

Not at all.
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
Is it possible to change login class ? LeFrettchen OpenBSD General 2 14th October 2015 11:15 PM
correct ulimit stack value DaBSD NetBSD General 9 28th January 2014 03:54 AM
Login class 'staff' datasize limits Martillo OpenBSD General 7 13th May 2013 05:54 PM
could ulimit value make them start faster ? daemonfowl OpenBSD General 0 16th August 2012 09:15 PM
sysctl.conf settings not loading on boot Kuboaa FreeBSD General 2 18th November 2010 08:35 AM


All times are GMT. The time now is 03:39 PM.


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