Author Topic: [OpenBSD 5.7] Solving chrashing browser (firefox, chromium) problem  (Read 1477 times)

0 Members and 1 Guest are viewing this topic.

Offline v32itas

  • Peasant
  • *
  • Posts: 123
  • Cookies: -4
  • coup de grâce
    • View Profile
Another one guide for noobs like myself. This was the biggest problem
I ran into while playing with OpenBSD. My browser was laggy and
randomly crashing under higher loads with many tabs. So I googled
and have found an answer here:
http://undeadly.org/cgi?action=article&sid=20070508003748&mode=flat

But that answer is not very noob friendly. So I have decided to simplify it.

Quote
> Firefox often crashes because it tries to crunch more memory than your current user limits.
>
> Try to edit /etc/login.conf, bump up the values, logout, login, and Firefox should be rock solid.
> You can also put yourself in the staff class : usermod -L staff yourlogin

So you need to edit /etc/login.conf

Quote
#nano /etc/login.conf
Quote
# $OpenBSD: login.conf,v 1.4 2015/02/17 10:18:36 sthen Exp $

#
# Sample login.conf file.  See login.conf(5) for details.
#

#
# Standard authentication styles:
#
# passwd        Use only the local password file
# chpass        Do not authenticate, but change users password (change
#               the YP password if the user has one, else change the
#               local password)
# lchpass       Do not login; change user's local password instead
# radius        Use radius authentication
# reject        Use rejected authentication
# skey          Use S/Key authentication
# activ         ActivCard X9.9 token authentication
# crypto        CRYPTOCard X9.9 token authentication
# snk           Digital Pathways SecureNet Key authentication
# tis           TIS Firewall Toolkit authentication
# token         Generic X9.9 token authentication
# yubikey       YubiKey authentication
#

# Default allowed authentication styles
auth-defaults:auth=passwd,skey:

# Default allowed authentication styles for authentication type ftp
auth-ftp-defaults:auth-ftp=passwd:

#
# The default values
# To alter the default authentication types change the line:
#       :tc=auth-defaults:\
# to be read something like: (enables passwd, "myauth", and activ)
#       :auth=passwd,myauth,activ:\
# Any value changed in the daemon class should be reset in default
# class.
#
default:\
        :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin:\
        :umask=022:\
        :datasize-max=2048M:\
        :datasize-cur=1536M:\
        :maxproc-max=512:\
        :maxproc-cur=256:\
        :openfiles-cur=1536:\
        :stacksize-cur=4M:\
        :localcipher=blowfish,8:\
        :ypcipher=old:\
        :tc=auth-defaults:\
        :tc=auth-ftp-defaults:

#
# Settings used by /etc/rc and root
# This must be set properly for daemons started as root by inetd as well.
# Be sure reset these values back to system defaults in the default class!
#
daemon:\
        :ignorenologin:\
        :datasize=infinity:\
        :maxproc=infinity:\
        :openfiles-cur=128:\
        :stacksize-cur=8M:\
        :localcipher=blowfish,9:\
        :tc=default:

#
# Staff have fewer restrictions and can login even when nologins are set.
#
staff:\
        :datasize-cur=1536M:\
        :datasize-max=infinity:\
        :maxproc-max=512:\
        :maxproc-cur=256:\
        :ignorenologin:\
        :requirehome@:\
        :tc=default:

#
# Authpf accounts get a special motd and shell
#
authpf:\
        :welcome=/etc/motd.authpf:\
        :shell=/usr/sbin/authpf:\
        :tc=default:

#
# Override resource limits for certain daemons started by rc.d(8)
#
bgpd:\
        :openfiles-cur=512:\
        :tc=daemon:

unbound:\
        :openfiles-cur=512:\
        :tc=daemon:

Only interesting part for you is(NOTICE VALUES IN THIS EXAMPLE ARE ALREADY INCREASED):

Quote
default:\
        :path=/usr/bin /bin /usr/sbin /sbin /usr/X11R6/bin /usr/local/bin /usr/local/sbin:\
        :umask=022:\
        :datasize-max=2048M:\
        :datasize-cur=1536M:\
        :maxproc-max=512:\
        :maxproc-cur=256:\
        :openfiles-cur=1536:\
        :stacksize-cur=4M:\
        :localcipher=blowfish,8:\
        :ypcipher=old:\
        :tc=auth-defaults:\
        :tc=auth-ftp-defaults:

After this little tweak your browser gonna be rock solid. Of course you can make
values even higher. And my laptop produces less heat after this.

Inspirational puffy song www.openbsd.org/songs/song36.mp3
« Last Edit: May 10, 2015, 04:47:26 am by v32itas »
"There is nothing more deceptive then an obvious fact." - SH

“There was no such thing as a fair fight. All vulnerabilities must be exploited.”
― Cary Caffrey





Offline bones

  • Serf
  • *
  • Posts: 32
  • Cookies: 8
    • View Profile
Another Slackware and OpenBSD user, nice! Yup, definitely gotta bump up the defaults for FF. Also consider some of the less bloated browsers:

Code: [Select]
pkg_add conkeror
pkg_add surf
pkg_add xombrero

With surf and xombrero, you'll end up dragging webkitgtk in along with it, but they're great browsers. Conkeror uses gecko, like FF.
BSD is what you get when a bunch of UNIX hackers sit down to try to port a UNIX system to the PC.
Linux is what you get when a bunch of PC hackers sit down and try to write a UNIX system for the PC.

Offline v32itas

  • Peasant
  • *
  • Posts: 123
  • Cookies: -4
  • coup de grâce
    • View Profile
Another Slackware and OpenBSD user, nice! Yup, definitely gotta bump up the defaults for FF. Also consider some of the less bloated browsers:

Code: [Select]
pkg_add conkeror
pkg_add surf
pkg_add xombrero

With surf and xombrero, you'll end up dragging webkitgtk in along with it, but they're great browsers. Conkeror uses gecko, like FF.

Thanks for updating. Looking for lighweight gui torrent client now. But I have one cli just havent learned how to use it yet. BTW OpenBSD forces me to learn some things that slackware doesnt so I love OpenBSD nearly as much as I love slackware. Fkn sexy.
« Last Edit: May 10, 2015, 09:11:10 pm by v32itas »
"There is nothing more deceptive then an obvious fact." - SH

“There was no such thing as a fair fight. All vulnerabilities must be exploited.”
― Cary Caffrey