For console logins (typical desktop or laptop), the relevant settings are for staff in /etc/login.conf. I cranked up a few settings:
#
# Staff have fewer restrictions and can login even when nologins are set.
#
staff:\
:datasize-cur=infinity:\
:datasize-max=infinity:\
:datasize=infinity:\
:openfiles-cur=1024:\
:stacksize-cur=16M:\
:maxproc-max=512:\
:maxproc-cur=512:\
:ignorenologin:\
:requirehome@:\
:tc=default:but for real effect in /etc/sysctl.conf I kept doubling kern.shminfo.shmall= until I had
kern.shminfo.shmall=268435456
Then I swithched browsers (to firefox). Using Libreoffice is still a gamble inside 4GB RAM, though.
Also see http://marc.info/?l=openbsd-ports&m=139448326727922&w=2