From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-f179.google.com (mail-qt1-f179.google.com [209.85.160.179]) by dpdk.org (Postfix) with ESMTP id 5B6AE1F1C for ; Mon, 29 Oct 2018 16:26:06 +0100 (CET) Received: by mail-qt1-f179.google.com with SMTP id l9-v6so9629151qtj.12 for ; Mon, 29 Oct 2018 08:26:06 -0700 (PDT) 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=W7TDCWBraWbMS5EOQsBQx4cD4MNSiQx5acVNfgSbqTA=; b=fRZydYHBCz7O2UM/6vYwRxqEiwfnI7riiVdfYo7krFjXXFwUouoluhLlBU5WdG3ShQ RViakOnTfsGveeg7vFk2ZE+U9Li+ek0Ywzveb+HNeKR+SWfAaWF70B/3yTB/Ynh1o8P3 H/ar9ezI1tT8BKZ34aHXRTjmhqKHedcHcN5qNsNs9Ev/cVAWhzwv0XOgIfwBKdknDlVY GVd4zHXMnlmSoRnQ7+pToAo6rlUema+6vh7gjnRdGLzngqlBlKnVPpLVD2djCe8FfQjU dDa3yEAzaz4uUg3O+beCyrTHNKNay0L1vNyZI9JHpQM62/tWQGe9stVU1YWj1tjx+Z1Z mwOA== 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=W7TDCWBraWbMS5EOQsBQx4cD4MNSiQx5acVNfgSbqTA=; b=FpufgZp49ZWBzBpw6H9uvc/YKRwXrhv4qNvVljkeCyoYSYyBjj8xkMLWGkwvESKmWD KSg+13ARWUp5VbdwIzdJge6UvA06LG/53OSlU65z7WHriKxaGIgn79kDeNQRhRKA2Tgk F/QJB4s9Zoq6d4xTyXqcPeledksrzNORzhlOUUdV9XRiKSNTOD+PT03/3X06c7qGD99Y BoUUADogNbnuBn++z8liqsr0bIPcNSCUGF13SchPMF1u5An0TdytU7/kFAqrXjrGv1FF Ka7z4YWZIikeR/9e8ll1SCP9qS/6iYUx2Mowa6nWtd2AWqswGrbMghViMEUSaJdE383A ZgTQ== X-Gm-Message-State: AGRZ1gJ7MaNNKxNZx9Lt5EchaibMQqUqQNlou1eTm1fOXjPSBp9RTFNm h62E/EDZeZDwRsOdNmbA1ivY3ActwWpvL+fDbZg= X-Google-Smtp-Source: AJdET5dpvhyNheFG5lFhfx5/mKcRQChuYfmxziAehQyWZwnhNkNaSgPxJ2SAgFoNlqgz5UKKA7xg9DAZpuUpDjiUfBY= X-Received: by 2002:aed:37e4:: with SMTP id j91-v6mr13002908qtb.50.1540826765622; Mon, 29 Oct 2018 08:26:05 -0700 (PDT) MIME-Version: 1.0 References: <20181029082339.15d4ebee@xeon-e3> In-Reply-To: <20181029082339.15d4ebee@xeon-e3> From: Vincenzo Maffione Date: Mon, 29 Oct 2018 16:25:52 +0100 Message-ID: To: stephen@networkplumber.org Cc: Sungho Hong , users@dpdk.org X-Mailman-Approved-At: Tue, 30 Oct 2018 18:45:38 +0100 Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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:26:06 -0000 Right, indeed the timerslack (50us) is not added if the process is real-time. But the C-state problem can still hit you hard. Cheers, Vincenzo Il giorno lun 29 ott 2018 alle ore 16:23 Stephen Hemminger < stephen@networkplumber.org> ha scritto: > 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. > -- Vincenzo