From owner-freebsd-hackers@freebsd.org Tue Nov 6 11:05:34 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E4BF110F7EA for ; Tue, 6 Nov 2018 11:05:34 +0000 (UTC) (envelope-from steevanxperia@gmail.com) Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0A0B3718E5 for ; Tue, 6 Nov 2018 11:05:33 +0000 (UTC) (envelope-from steevanxperia@gmail.com) Received: by mail-ot1-x32a.google.com with SMTP id n46so6766706otb.9 for ; Tue, 06 Nov 2018 03:05:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=614dQ35afF3HYNna+nV2fEhiDDfe9chjnt/ozXeAlJY=; b=f3IPY5yweM3CZ6av4uruGYclzzyEr8uIpFtAfUnwbhqKjQeW+ogViSwCJFW5AGYIpz wQJlNJX4C9uEyDs9TXSFXYEentUEd8/j/QTW9ne5J4/RyY6BW2oDibdFI3gBTEBp+aJl zupByPscWXcLXcwwoiWUmNm2nmPuYm1n0FHF3tayGBdiySbT9QGPHn3eJk0CY5z0uDcZ wphc3t4IR1J/S2OKeUePiBhWeNUP0Eod4jBZuf024GcruVO8kD78B++cKn9SPxsispBy OeLONj4+K8Z4/F5KhL+0uzlenxtDNcxwJ3FE1uZCKIBYbVh30sRIi93daXnFIZZvRWWQ GWog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=614dQ35afF3HYNna+nV2fEhiDDfe9chjnt/ozXeAlJY=; b=DyBeBI7qAQuZWx+VltdatxL6bJauICyoGhVtnkwgfLMBhrradvSVipcx+Gyf4zKC5g s0xuNJOry4EMSp7tGV9y08FERos7VNLjL22NWWDlcjEM33shU4QTxRPZB8NL5ZHU5aCE iw+dG+Hg16YxqXpdIpDqr0xao3FQO7+om1w3tETgbcuCtDgH5WBfQxOFtyLfSwDmCw08 ts+DtVF9k+IpPsSKCWgsiIyOyCKqC3pvaoqM/tico1dmpXGfKdo4ybScAOnW1dPNp8Gm a6z8kly8yyQItG5MJA4wP/PujsAymHvNMeFXBPTtkEpP1WMkWRjoyokppt5yhqmyauIZ Q0yQ== X-Gm-Message-State: AGRZ1gLnDL0gkwwtqUixXjKKgQeiDvQ2gB1I/2pKyxJs5igr8tEZr7p1 gR1lNUd7DeE67cDTJ0f6q5JHWOWV2keDd+aYzIU= X-Google-Smtp-Source: AJdET5eWr+xJwLK4AH+OFRCkaUl12NiOujJrksfMvpLNuKqW53DFWv30KXuaB/y2Z9Od3j8u0JZtQbv3gJxYnoeiLIU= X-Received: by 2002:a9d:128b:: with SMTP id g11mr15122761otg.130.1541502332021; Tue, 06 Nov 2018 03:05:32 -0800 (PST) MIME-Version: 1.0 References: <7bb8463e-aa5d-bade-7ae7-6c612bae65f9@gmail.com> In-Reply-To: From: Steevan Rodrigues Date: Tue, 6 Nov 2018 16:35:20 +0530 Message-ID: Subject: Re: FreeBSD 11.x thread creation time is 9000+ microseconds on Intel Xeon Gold series CPU To: mad@madpilot.net Cc: vhaisman@gmail.com, freebsd-hackers@freebsd.org X-Rspamd-Queue-Id: 0A0B3718E5 X-Spamd-Result: default: False [-4.20 / 200.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; R_DKIM_ALLOW(-0.20)[gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[a.2.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; IP_SCORE(-0.56)[ipnet: 2607:f8b0::/32(-1.27), asn: 15169(-1.47), country: US(-0.08)]; NEURAL_HAM_SHORT(-0.63)[-0.630,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_CC(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2018 11:05:34 -0000 Thanks to all of you for the quick responses. I see this issue only on a particular server. I do not see this issue on another server with slightly older processor Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz (dual socket 6 core per socket) In this system the same program takes only about 800 usec I wonder whether it is problem with 11.x FreeBSD release on this particular processor. I came across two results (given below) from Phoronix OSbench test suite which also show poor thread creation time for FreeBSD 11.x https://openbenchmarking.org/result/1804094-AR-1804096AR58 https://openbenchmarking.org/result/1807114-RA-WINDOWSSE47 In this look for "Create Threads" row. Thanks Steevan On Tue, Nov 6, 2018 at 3:17 PM Guido Falsi wrote: > On 06/11/18 10:01, Steevan Rodrigues wrote: > > Ok. Sorry about that. Again I have attached that test program as a tar > > file. I am not sure whether even this gets stripped by mailing list > > software. > > > > Anyway here is the program given below. > > > > I'm not a kernel guy or an expert in such things, but I see that > flamegraphs are often used to analyze such issues. It gives an idea > where the kernel is actually spending it's time. > > There's also a port to help with this: > > https://www.freshports.org/benchmarks/flamegraph/ > > I think if you could gather such information and make it available you'd > make it easier for experts to explain what is happening and maybe also > do something about this. > > -- > Guido Falsi >