From nobody Sun Sep 03 07:56:32 2023 X-Original-To: freebsd-current@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 4RdkcN30d5z4s0md for ; Sun, 3 Sep 2023 07:56:36 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (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 4RdkcN0C48z3WFy for ; Sun, 3 Sep 2023 07:56:36 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-52a4818db4aso485510a12.2 for ; Sun, 03 Sep 2023 00:56:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693727794; x=1694332594; darn=freebsd.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ay0dfh6gBydbdCJDDoAajhlDEXG6RHAHcekZaXdbLxI=; b=nm+tyX+B8ubftqz0rNreRlegbfAg2f11XbiTHMNZn2dBO+eg3xtKa2Xbve6z5Ydr+B +FvCQvLrWLMqiiAdBLsLV91JVKNpGiLZXgyDDZToXMQ+CEdAHuJrSOvVarlq1X2VCTVY NhOZVVG+j1EigtddG/hkMtX5AZfr7mav4YSdb2B3UCGQMDDIcr3XHi8c1k52U+Lyzcyb eSYKM3GBY2RLHa7n05y5AvcE+wRN5HDp0QJQlc3Xfkhu5B2eHfT5HzpSqx1u0ga3BltR SAOKiPBt8eUA9Eo6WPIGk3YgAKnZR9OefqUCoRuX9K3qpeb7RVLK/Zu8kr3GlE93qHra NtkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693727794; x=1694332594; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ay0dfh6gBydbdCJDDoAajhlDEXG6RHAHcekZaXdbLxI=; b=bVqJba2kgJ0STJTp0sBnAGmuv6d0bOE9AURK3ZPETxqcftbO3Rt8DeykJWlWFQGvWp G6CjiVgRsjNZ9fbN3DJ+qrXSebC2A6J+eMPQ7OngVmAUOy8/sYxuY6IUqTeQoa8+QnR1 e+Y2I149wnATOGcE8Xz7hZdolQ4DabkKt5TU0Tnk/l62VLn/5VZ2KTDRzTJSwzcDSBre nRZbqCMJfBD8Kru/EjCRwZdojOY8yZD/7J+IpwN9+A6BPC3oH+CtOusgWsbxLJTUke7k whLaWthznfFJ5FVzMsNYEjl6Xs6pzkJWpFHnzFKywyABwGndRFYxQcRUtcplyLnauImg W1gw== X-Gm-Message-State: AOJu0Yx+SAWBJNcW2s9/P22WC+6Pwjcpk73H06gRKtatp7U6kEyFz6rG r3j5ojQzM/zgZIFTmPlcecwY5SeV1WsH9w== X-Google-Smtp-Source: AGHT+IEgovVYBbjiwE7q+Mx7qTLbb2NP6d6AJ6mI5mvdnxdNXITfaN4ZIUTXMlAWDqoxnm7WIncQeQ== X-Received: by 2002:a17:906:3147:b0:9a5:b876:b1e3 with SMTP id e7-20020a170906314700b009a5b876b1e3mr5235965eje.20.1693727793696; Sun, 03 Sep 2023 00:56:33 -0700 (PDT) Received: from [192.168.1.10] (80-42-66-93.dynamic.dsl.as9105.com. [80.42.66.93]) by smtp.gmail.com with ESMTPSA id gf16-20020a170906e21000b0098669cc16b2sm4451596ejb.83.2023.09.03.00.56.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Sep 2023 00:56:33 -0700 (PDT) Message-ID: <79114b6f-9fe1-2e76-55be-a27cf8c178bf@gmail.com> Date: Sun, 3 Sep 2023 08:56:32 +0100 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: kernel 100% CPU Content-Language: en-US To: Mateusz Guzik Cc: FreeBSD-CURRENT References: <95e9f65b-58c4-ef3a-a5d1-b794179e4252@gmail.com> From: Graham Perrin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: 4RdkcN0C48z3WFy On 02/09/2023 18:31, Mateusz Guzik wrote: > Looks like you have a lot of unrelated traffic in there. > > Run this script: > #pragma D option dynvarsize=32m > > profile:::profile-997 > /execname == "find"/ > { > @oncpu[stack(), "oncpu"] = count(); > } > > /* > * The p_flag & 0x4 test filters out kernel threads. > */ > > sched:::off-cpu > /execname == "find"/ > { > self->ts = timestamp; > } > > sched:::on-cpu > /self->ts/ > { > @offcpu[stack(30), "offcpu"] = sum(timestamp - self->ts); > self->ts = 0; > } > > dtrace:::END > { > normalize(@offcpu, 1000000); > printa("%k\n%s\n%@d\n\n", @offcpu); > printa("%k\n%s\n%@d\n\n", @oncpu); > } > > dtrace -s script.d -o out # pwd /home/grahamperrin/Documents/IT/BSD/FreeBSD/kernel-cpu # ./2023-09-02-18-31.sh ./2023-09-02-18-31.sh: profile:::profile-997: not found ./2023-09-02-18-31.sh: /execname: not found ./2023-09-02-18-31.sh: 6: Syntax error: "(" unexpected (expecting "}") # whoami root # echo $ $ # echo $0 sh # echo $SHELL /bin/csh # exit root@mowa219-gjp4-8570p-freebsd:/home/grahamperrin/Documents/IT/BSD/FreeBSD/kernel-cpu #