From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) by dpdk.org (Postfix) with ESMTP id 1D93EFEB for ; Mon, 29 Oct 2018 16:23:48 +0100 (CET) Received: by mail-pl1-f196.google.com with SMTP id p7-v6so3976677plk.5 for ; Mon, 29 Oct 2018 08:23:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V6g6wSL0DAZsv+GGjQ9xu3slTcVZ1ax0PYu0+kwTrS4=; b=o/+uReY8zLCTQOFRp4CwdLUQYIl8ibjZc+dKp9c5i7L59uaFmwd82QOqxBG9y5qLNM Bmys0TepvTQqzGlAQs5nD4V74H3xZFwnQuFCvq8nCpwzRgffhJcaCe1qPsyY4t8NJ1JL uSbNp4uxcXLmpLSRTIemsAGRWHUmM7dFq5Z67Yl+g+tonHnmf67683HRpASN3GZ40rVL MUB6cy1V0SrOZYeYcHkpyQRiuxg4URbATo3iVn1AgDjAdAogFOvBdbFU91TcgSHJsPV5 m1Ll5KlHEXKP0y8DmnSP9MsWg12V1bvBqzBlMP3U1prYbrnsSVd1OuYRQymgSnZvpbhP BiiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=V6g6wSL0DAZsv+GGjQ9xu3slTcVZ1ax0PYu0+kwTrS4=; b=Aw/N+OZ1FhVDzWHMERvP962VBO01PHTm8dJaIombHDijGpN3XK7CfRhS/GVhUjX9u4 kRXLyYPv6rhdezulN0l7lJ6UTlhROPVRZD7/x1yWZxi1tVLzXYFwh+vmbT9+PEV7YD52 vHf4yj3QhsHNi+QAwNpRpRvuAmbQjRECA47B9IN2P8O99mcMyIgnQesLdfn9JfdosMRl VfPu5QaPlpYFkP+hZ719EjzenVpTcTWUzmb/ewT5peNgpoICOxtVtJ9b3CjneuSEYyj3 4JvffX3iqnBksp0mkkp51PaPpbUHlFO2kZJNAaPURT8GD7C9ZK855adJUvP8oadqAB2U P/0w== X-Gm-Message-State: AGRZ1gK1OMprylTkoeJbDHjHmHJV01mw4WNk+NwC1Ou3NToyxXZMxwfK XRbBUZBRlF55Q64NIH3KC/qV7A== X-Google-Smtp-Source: AJdET5chzoIJ/+FGEFGVLquT7ndWTTE/RWno3K9jvnbkPbpXZzwKFyFCIaYpSOVLZ6Bcch6zpLbf/A== X-Received: by 2002:a17:902:28e7:: with SMTP id f94-v6mr14870237plb.297.1540826627029; Mon, 29 Oct 2018 08:23:47 -0700 (PDT) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id v20-v6sm18987370pfj.107.2018.10.29.08.23.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Oct 2018 08:23:46 -0700 (PDT) Date: Mon, 29 Oct 2018 08:23:39 -0700 From: Stephen Hemminger To: Vincenzo Maffione Cc: maverickjin88@gmail.com, users@dpdk.org Message-ID: <20181029082339.15d4ebee@xeon-e3> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-users] Why DPDK latency is high when sending message in interval? X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Oct 2018 15:23:48 -0000 On Sun, 28 Oct 2018 09:07:02 +0100 Vincenzo Maffione wrote: > If you don't care about CPU utilization, busy-wait is the way to go. > Otherwise you can try to usleep() for something like 60-70 us (to lower the > CPU utilization), and then busy-wait for the rest of the interval (so that > you still have maximum precision). > > You may want to have a look at this > https://academic.oup.com/comjnl/article/61/6/808/4259797 , specially > sections 4.3 and 4.1. > > Cheers, > Vincenzo > > Il giorno dom 28 ott 2018 alle ore 09:01 Sungho Hong < > maverickjin88@gmail.com> ha scritto: > > > Thank you very much for the reply. > > But in that case, should I busy wait, to create the delay? > > > > > > > If doing very brief and exact sleep, you should change your thread priority to one of the Real Time classes.