OpenBSD Journal

Running and tuning OpenBSD network servers in a production environment

Contributed by jose on from the faster-faster-FASTER dept.

Dan writes:
"Heavily loaded network servers can experience resource exhaustion. At best, resource exhaustion will slow server response, but left uncorrected, it can result in a crash of the server.

This paper by Philipp Buhler and Henning Brauer provides an understanding of the memory management of OpenBSD, how to monitor the current status of the system, why crashes occur and how to prevent them. Read more at http://www.bsdforums.org/forums/showthread.php?threadid=6640 ."

The paper is available (PS) from the OpenBSD website. PB and Henning will be at Fosdem this weekend, one of the larger and more popular Open Source meetings in Europe. Damn, we need a budget so I can attend and report on the event.
UPDATE : "Slide's are up here ," said Phillip.

(Comments are closed)


Comments
  1. By Anonymous Coward () on

    is this the same paper as eu bsdcon? if so, has the content changed?

    budget my butt :P

    Comments
    1. By schubert () on

      yup looks like the exact same paper.

    2. By TZ8 () on

      PB talked about new slides for the fosdem... probably they will be added to it after the presentation (Sat 4pm IMHO)

      tz8

    3. By Philipp () pb@ on mailto:pb@

      no, there's a new paper about new features
      in pf(4)

      it just got commited, so it should be
      "pretty soon" on the webserver, check
      http://www.openbsd.org/events.html
      for the upcoming mirroring

    4. Comments
      1. By Anonymous Coward () on

        thanks pp

  2. By Anonymous Coward () on

    In section 6 of tuning.pdf it talks about why blindly raising NBMCLUSTERS and NKMEMPAGES can be bad, but doesn't really say why; only that you need "very detailed knowledge about what is happening in the kernel" to understand its implications. I've seen similar references all over the place without a good description of why this is the case. Can anyone provide a link or explanation (other than read the fine source, please :) Or is it truly only understandable with intimate knowledge of the kernel?

    Regardless, it is the first decent writeup for OpenBSD performance tuning I've yet seen. Thanks to the authors for writing it (and OBSDJ for linking to it).

    Comments
    1. By Meoa () on

      http://www.derbian.org/pppoe/#table

      Comments
      1. By Anonymous Coward () on

        This is totally irrelevant in this discussion.
        This is a really rare occassion: PPPoE (who uses this?) and high speed PPPoE (for most ADSL connection OpenBSD userland pppoe will be enough).

        Comments
        1. By Anonymous Coward () on

          also, i dont trust that guy, who ive nicknamed 'mr couldnt install openbsd or ask for help'

          i know he did it later blah blah blah

      2. By RabidCow () on

        This seems to indicate that usermode PPPoE has poor performance, not that OpenBSD is particularly bad. Everything in the table with usermode is lousy, and the kernelmode stuff is great.

    2. By Henning Brauer () henning@openbsd.org on mailto:henning@openbsd.org

      ok, NMBCLUSTERS.
      you might know network data is traversing through the system in so-called mbufs, memory buffers of a fixed size - 256 bytes if memory serves me right. lots of them linked together (linked list) represent a packet then. As most stuff the kernel needs to do with network data only needs access to the header data and this is completely withing the first mbuf usually, that is very efficient.
      HOWEVER, the payload may be bigger, and it would be very inefficient to split it into 265 bytes chunks. That's why mbuf clusters exist, which are bigger - 2048 bytes if memory serves me right, and the mbufs only contain a reference to the mbuf cluster then.
      keep in mind this memory space is only needed as long as the network data is travelling through the system. once it is send out on some NIC or written to some socket where some deamon is listening, or dropped for whatever reason, the mbufs and mbuf clusters occupied by the packet are freed. if they are not freed then we have a mbuf leak, just like the one I fixed some days ago ;-)
      thus, the amount of NMBCLUSTERS you need is usually _very_ small.
      I have exactly 3 machines out of 60 or so that need increased NMBCLUSTERS...

      oh, and the mbuf(9) manpage is a very good read on that.

      Comments
      1. By Anonymous Coward () on

        Hey, thanks for the reply. I've got more reading to do :)

  3. By Anonymous Coward () on

    I hate to be thick, but what is an .mgp file?

    Comments

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]