From nobody Tue Apr 23 21:58:53 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VPGH101TQz5J8my for ; Tue, 23 Apr 2024 21:59:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VPGH04qh6z509w for ; Tue, 23 Apr 2024 21:59:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a588fba6c78so15357966b.2 for ; Tue, 23 Apr 2024 14:59:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1713909546; x=1714514346; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ZDSzqdx0sV5ZK1nKKfWoGCthT4U7JdRSc4QZldGi05I=; b=OPev8bYAMF39uarT3vZHnokTLzGQLvy8gfBTrhBlomgbb+Zwz3YYfHCn7ZZ/uA9PPO qleAPyANj0c2eDsDa+Fo48INMD9TPdUnOo0u9IPAbAlbIHexq1z7r8h//VFWeF/RdjVL GrqCdgrZuuPuRo1e3dEmzpGSXQw0ZB5PdkUvJOdtCaDOIRnWH07y0OLhfV8EJkknVnvY hlCEKSgOlgqAUKk+00NDQbuNZIm/J3CKPXiEYz/0hP10URZgs7ydA8/V0D/JA+23IHBB 7vXAhe7eFtNsuv33dcrDpQmvmbcE/zeTcc6vRQT26x8EW4PiAZq2SEYU7Um42gkvpIzb UCXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713909546; x=1714514346; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZDSzqdx0sV5ZK1nKKfWoGCthT4U7JdRSc4QZldGi05I=; b=vlKJJ8uZW5mT/t7yvGwRDdawg+8VzfreNq8pnZxxpiNfYDrCjMKLcm1fC39ce/AeuD Yol8hbHpN3iPzTnJRNmAr2qL2n9im8keiEd+SHWT8cmtsuGcWiXlkgK0ORRqTBdvEwxB JwoglsG5neBC4dPDWEsP4bvoebwu5F3YYwOcFeR8QvEDF3Frvi0gDqL1zBlwOFv13kNd q1HRIykOyHaY433RQnNa6tcJHg9FTMS1151+w9ck8JSkXVrCjDMGi0b0JSuUkobNaT63 /qOdfXby2ZeagQdMrxR3A1So1BfmA1KBqriGUDyZSJk4e9CgBnx2J8kZGd3uFxATAAUz mOlw== X-Forwarded-Encrypted: i=1; AJvYcCWbQFg/UXSfssJRiFW5IJSK9h1qPs06LnhnoONkoBIBllcl4JnuSWO/UhDMMgcy2vvnzFYcDvYaVC1eD8N/DwSnTwo9t5ckyhHnhXs= X-Gm-Message-State: AOJu0Yzd4CrT+jiXl3kMAM5cMViBE4IEpb1GhRo5VHW0XYafOmgkc29l 3deVBehKMuxtFUOI1rwMCI7jozo1PpkyxJ26EH9ysoq7PKxgc5I2taU4hZesGBJD47yAt652mFV 8enPK/rD43GgPG+CIv6h9yI5t2m/CDuTBRW1jwDOuBkGRCySK+AL9eA== X-Google-Smtp-Source: AGHT+IHZ3DoCLs6jatUYIJS/LNZb+/2lOPAP/GBhQ9maugqOJJUsHa8YpT+Yj5wg8OUfSygs+B5vQy1IRHc+OdvNv84= X-Received: by 2002:a17:906:f1d1:b0:a52:1432:b790 with SMTP id gx17-20020a170906f1d100b00a521432b790mr352510ejb.31.1713909545853; Tue, 23 Apr 2024 14:59:05 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 References: <2b72c4f749e93dfec08a164d5a664ee3@Leidinger.net> <5abe7eb5b80ab164b91c858bfd8121d7@Leidinger.net> In-Reply-To: <5abe7eb5b80ab164b91c858bfd8121d7@Leidinger.net> From: Warner Losh Date: Tue, 23 Apr 2024 15:58:53 -0600 Message-ID: Subject: Re: Stressing malloc(9) To: Alexander Leidinger Cc: Alan Somers , Karl Denninger , freebsd-hackers@freebsd.org Content-Type: multipart/alternative; boundary="000000000000a882910616caa977" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4VPGH04qh6z509w --000000000000a882910616caa977 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 23, 2024 at 7:30=E2=80=AFAM Alexander Leidinger wrote: > Am 2024-04-23 14:47, schrieb Alan Somers: > > On Tue, Apr 23, 2024 at 2:37=E2=80=AFAM Alexander Leidinger > > wrote: > > >> You basically say, that it is not uncommon to have such large > >> allocations with kernels we ship (even in releases). > >> Wouldn't it make sense to optimize the kernel to handle larger uma > >> allocations? > >> > >> Or do you expect it to be specific to ZFS and it may be more sane to > >> discuss with the OpenZFS developers to reduce this default setting? > > > > Yes, both of those things are true. It might make sense to reduce the > > setting's default value. OTOH, the current value is probably fine for > > people who don't use geli (and possibly other transforms that require > > allocating data). And it would also be good to optimize the kernel to > > perform these allocations more efficiently. My best idea is to teach > > g_eli_alloc_data how to allocate scatter/gather lists of 64k buffers > > instead of contiguous memory. The memory doesn't need to be > > contiguous, after all. But that's a bigger change, and I don't know > > that I have the time for it right now. > > -Alan > > Do you have time do make a nice description of what would have to be > done in the wiki? > https://wiki.freebsd.org/IdeasPage I've added the super-brief verrsion to https://wiki.freebsd.org/WarnerLosh which has my crazy ideas list... Warner --000000000000a882910616caa977 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Apr 23, 2024 at 7:30=E2=80=AF= AM Alexander Leidinger <Alexa= nder@leidinger.net> wrote:
Am 2024-04-23 14:47, schrieb Alan Somers:
> On Tue, Apr 23, 2024 at 2:37=E2=80=AFAM Alexander Leidinger
> <Alexa= nder@leidinger.net> wrote:

>> You basically say, that it is not uncommon to have such large
>> allocations with kernels we ship (even in releases).
>> Wouldn't it make sense to optimize the kernel to handle larger= uma
>> allocations?
>>
>> Or do you expect it to be specific to ZFS and it may be more sane = to
>> discuss with the OpenZFS developers to reduce this default setting= ?
>
> Yes, both of those things are true.=C2=A0 It might make sense to reduc= e the
> setting's default value.=C2=A0 OTOH, the current value is probably= fine for
> people who don't use geli (and possibly other transforms that requ= ire
> allocating data).=C2=A0 And it would also be good to optimize the kern= el to
> perform these allocations more efficiently.=C2=A0 My best idea is to t= each
> g_eli_alloc_data how to allocate scatter/gather lists of 64k buffers > instead of contiguous memory.=C2=A0 The memory doesn't need to be<= br> > contiguous, after all.=C2=A0 But that's a bigger change, and I don= 't know
> that I have the time for it right now.
> -Alan

Do you have time do make a nice description of what would have to be
done in the wiki?
=C2=A0 =C2=A0 =C2=A0https://wiki.freebsd.org/IdeasPage

I've added the super-brief verrsion to=C2=A0https://wiki.freebsd.org/Warn= erLosh which has my crazy ideas list...=C2=A0

= Warner
--000000000000a882910616caa977--