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 8C182A0C41 for ; Thu, 18 Nov 2021 08:13:05 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2853440696; Thu, 18 Nov 2021 08:13:05 +0100 (CET) Received: from mail-ua1-f54.google.com (mail-ua1-f54.google.com [209.85.222.54]) by mails.dpdk.org (Postfix) with ESMTP id 97DE940395 for ; Thu, 18 Nov 2021 08:13:03 +0100 (CET) Received: by mail-ua1-f54.google.com with SMTP id w23so11610438uao.5 for ; Wed, 17 Nov 2021 23:13:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=j+ZrOxMz6ZfzCoGju7x89KCOTsQHXs3YCYsm1N43u1A=; b=YPF+anH25eTk64ecGFA1745ZPsJPKvJjPGreNF6clcfsAUngIffquiikBfLXs6xy+G BEqV3ONE8i9bW/Q+OP7RquqZ0QvcK4P6f7TxB5pYwKn+uqLt9GEttukjrcGpp1WQOvse 82ZTSwDwfoozKV+7loOLs7vhF2FBSNQA466OihckpyYQWzlYL5NcOwucM2e1oL1MhX67 T6s0EW+CxwnLZ5yLfFYSXZ8QkJGl54UjAMRlKxVxVtIAVvh+to1Eb1N0LMCjwQhFNCAw 68nuMX+XFhvVBav0jpR6YEdIKwyzG7NcUpgIjMHM0lCI8SwjDU2j14+2rCk1KN2Deari rlBg== 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=j+ZrOxMz6ZfzCoGju7x89KCOTsQHXs3YCYsm1N43u1A=; b=olO6FTes55wPcCx0u2IFsjr0WQ1N8bHp2XtZI+wD5xbHhw3Nq+rFmLCkFFedimGVOq jC+SAAjl3Ck3QkOrA9Lx/zXY+rtxKQkmelN5c3OsH/6k2cUZaoybQ+8YSU6+t/n5g7mU SLfejc/NXEGccn5V3WkQWI8z81wa+gzPBUem4G10NyjABQ30SqGExqunLwLgjPrFeVfR shzlrvkioq9RvJcghv+2zLNh/xPRH6RzDjxaCSWF7iji4ez/W2IKaIGyvHhSPnywR6hC uTs4+Hu+JpjN8Kg/T30qarNP2ht086aoMfyPR9xvqOvWZ0n/EDtwg0Zzkxbm5mBzdNgp H3NQ== X-Gm-Message-State: AOAM530kF/WB/rMu/RkWBtHGZManGdBh2ZTHOjWOA2zM0XPr4YYsgH8S 5gcS6zV4qaH1ixGKKQ1QABijsXlMYrSOs6V53CI= X-Google-Smtp-Source: ABdhPJwmEI3QKc611P01NBag2StFpRopujHkJrdw1wL793KnTIUSglpnsVm7vulVakaS3UhV8D777hgSU9M+f2cQIg8= X-Received: by 2002:ab0:6f0a:: with SMTP id r10mr33941807uah.106.1637219582977; Wed, 17 Nov 2021 23:13:02 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Staffan Wiklund Date: Thu, 18 Nov 2021 08:12:51 +0100 Message-ID: Subject: Re: Can the DPDK multi-process feature be used in Docker containers? To: Li Feng Cc: Cliff Burdick , users Content-Type: multipart/alternative; boundary="000000000000a9a8c205d10ae3aa" 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 --000000000000a9a8c205d10ae3aa Content-Type: text/plain; charset="UTF-8" Cliff, Many thanks for your help! Mapping /var/run/dpdk into both containers as you said made it possible to use the multi-process feature in Docker containers. Regards Staffan Den tors 18 nov. 2021 kl 07:47 skrev Li Feng : > 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 > >> >> > >> >> > --000000000000a9a8c205d10ae3aa Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Cliff,

Many thanks for your = help!
Mapping /var/run/dpdk into both containers as you said made= it possible to use the multi-process feature in Docker containers.

Regards
Staffan

Den tors 18 nov. 2= 021 kl 07:47 skrev Li Feng <fengli@= smartx.com>:
On Thu, Nov 18, 2021 at 2:23 PM Cliff Burdick <shaklee3@gmail.com> 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<= br> prefix "spdk-<PID>", both containers are mounting the same<= br> /dev/hugepages.


>
> On Wed, Nov 17, 2021, 22:20 Li Feng <fengli@smartx.com> wrote:
>>
>> On Thu, Nov 18, 2021 at 2:11 PM Cliff Burdick <shaklee3@gmail.com> 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 dua= l 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 <staffan491@gmail.com> w= rote:
>> >>
>> >> 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 conta= iner and share its
>> >> DPDK memory with another DPDK application executing in an= other Docker container
>> >> using the DPDK multi-process feature?
>> >>
>> >> For example if the DPDK example mp_server executes in one= Docker container:
>> >> <build_dir>/examples/dpdk-mp_server -l 1-2 -n 4 -- = -p 3 -n 2
>> >>
>> >> and the DPDK example mp_client executes in another Docker= container:
>> >>
>> >> <build_dir>/examples/dpdk-mp_client -l 3 -n 4 --pro= c-type=3Dauto -- -n 0
>> >>
>> >> Is this possible to implement?
>> >>
>> >> Thanks
>> >> Staffan
>> >>
>> >>
--000000000000a9a8c205d10ae3aa--