From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9ED31A0C41 for ; Thu, 18 Nov 2021 07:47:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 01D2440687; Thu, 18 Nov 2021 07:47:21 +0100 (CET) Received: from mail-ua1-f45.google.com (mail-ua1-f45.google.com [209.85.222.45]) by mails.dpdk.org (Postfix) with ESMTP id 43DD840395 for ; Thu, 18 Nov 2021 07:47:19 +0100 (CET) Received: by mail-ua1-f45.google.com with SMTP id ay21so11417052uab.12 for ; Wed, 17 Nov 2021 22:47:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wMjReZmDmhdp8m6VoigYLOU83MMygLbsMRwV6383wBs=; b=LEhKxQqF10AU9kRqrJxF9H5huaHgpZ/Q4EhVSgF6rwIGh5m60v3oDOskoy2wxMLnPf piNudn9PX+uZ0cnLyJkgKZcYUTiHE4Yph4BuQ2W42Q52UtOEXTa5JxJj5PIVe0VHwD1A hDAyM/84KXvMAfnzc0o61qaiKpXMuPSW1lqrBNtrjvN7ok/AkGdZZKb62VwltQcyczso 8AWC/w7HzoxkifSfda3GRv5B14VGNMpnPpsQPu8xndnGk+pjZ1mXuOeuY/olD0EKSdpq Y7Y+YmU8bGSOZylTMDJjObfX/m7DxkahZvSopPVcShXmzLR/RNrfay2fRR3EhcEvOiYK gaug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wMjReZmDmhdp8m6VoigYLOU83MMygLbsMRwV6383wBs=; b=ilbgJ6NRKxY6Eh0hiV9OZKG4Gal06cdUnbuXcLlsdhULrLsKDUHe7Wn8sUcvLrLSdE QAFiU7DH60YD9yTTSmPbdg8yYqJNF8QkJrRCvVq0igAGy6+hIXGSe+E/ztmEBpmdYpmC nt5lIjfWVzEXjTV5bdnNWg7X5T6URUnJSecLiaHlBiF0nasuGnFIy0jpgrfqQfrTKeq2 BUicZtbNLl8MGsnxGNU5h5jDGlVgd85ry9JBKweY/U7jULC+zgFknBDX3kp3SXbHfCeJ SbZhAOKRZMOduWzG0gOdbOXrCYP9+TL+7XSXun/SBP4YAkQYpF2kAU1bOGBNWvxdz1oO PJyg== X-Gm-Message-State: AOAM533Vbk2x9icGEFLBGK+c4Rl9Qo1aSlXK6cK8OUKqLhqVeMBicj9Z 44CwJ8mSdmq8K0bgn2AUzDxdr+zBiTXbqRmWNPguSw== X-Google-Smtp-Source: ABdhPJyArJU1ybVGF3bHr+NsS7A6yDeaHICoT8k+I9gH4cbcA/cGtY8rpKWDwXMEJ8/tImUn0KN1XqapuNYAK6wy50M= X-Received: by 2002:a05:6130:3a6:: with SMTP id az38mr32957228uab.126.1637218038605; Wed, 17 Nov 2021 22:47:18 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Li Feng Date: Thu, 18 Nov 2021 14:47:07 +0800 Message-ID: Subject: Re: Can the DPDK multi-process feature be used in Docker containers? To: Cliff Burdick Cc: Staffan Wiklund , users Content-Type: text/plain; charset="UTF-8" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org On Thu, Nov 18, 2021 at 2:23 PM Cliff Burdick wrote: > > I don't remember that being a problem. Are you starting them with two different file prefixes and mounting the hugepages directory into both containers? > I'm running the spdk processes, so the hugepage files are created with prefix "spdk-", both containers are mounting the same /dev/hugepages. > > On Wed, Nov 17, 2021, 22:20 Li Feng wrote: >> >> On Thu, Nov 18, 2021 at 2:11 PM Cliff Burdick wrote: >> > >> > Yes. Try mapping the dpdk metadata directory (/var/run/dpdk) into both containers from the host. You should be able to do the normal dual process methods. >> > >> By the way, if I want to run two separate dpdk processes in two >> different dockers, what should I do? >> e.g. Running two processes: examples/dpdk-mp_server >> These two dockers have mapped the same /dev/hugepages directories. >> I have tested, the dpdk will crash because the hugepages are mixed. >> >> Thanks. >> > >> > On Wed, Nov 17, 2021, 05:58 Staffan Wiklund wrote: >> >> >> >> Hello >> >> >> >> I wonder if it is possible to use the DPDK multi-process feature in Docker containers? >> >> >> >> That is, can a DPDK application execute in a Docker container and share its >> >> DPDK memory with another DPDK application executing in another Docker container >> >> using the DPDK multi-process feature? >> >> >> >> For example if the DPDK example mp_server executes in one Docker container: >> >> /examples/dpdk-mp_server -l 1-2 -n 4 -- -p 3 -n 2 >> >> >> >> and the DPDK example mp_client executes in another Docker container: >> >> >> >> /examples/dpdk-mp_client -l 3 -n 4 --proc-type=auto -- -n 0 >> >> >> >> Is this possible to implement? >> >> >> >> Thanks >> >> Staffan >> >> >> >>