From owner-freebsd-hackers Tue Oct 15 10:50:09 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id KAA23803 for hackers-outgoing; Tue, 15 Oct 1996 10:50:09 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id KAA23798 for ; Tue, 15 Oct 1996 10:50:07 -0700 (PDT) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by who.cdrom.com (8.7.5/8.6.11) with SMTP id KAA23572 for ; Tue, 15 Oct 1996 10:49:53 -0700 (PDT) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id SAA01147 for hackers@freebsd.org; Tue, 15 Oct 1996 18:13:00 +0100 From: Luigi Rizzo Message-Id: <199610151713.SAA01147@labinfo.iet.unipi.it> Subject: iijppp suggestion for a fix To: hackers@freebsd.org Date: Tue, 15 Oct 1996 18:13:00 +0100 (MET) X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk If someone is looking after iijppp: I noticed (in mbuf.c) that each packet causes two or more calls to malloc() and a corresponding number of free(). Now malloc seems to be relatively efficient (at least phkmalloc), I measured less than 50us per malloc/free pair on my 486. But while I am typing this message (after a 15 minutes session) ppp reports more than 25000 malloc for about 6000 total packets, and (hear, hear) a peak memory occupation of less than 10KB. If someone has a little time to work on it, rewriting the allocator by keeping its own free list looks like an easy way to improve performance. Luigi ==================================================================== Luigi Rizzo Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it Universita' di Pisa tel: +39-50-568533 via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 http://www.iet.unipi.it/~luigi/ ====================================================================