DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] Basic hugepages question
@ 2020-12-09 16:34 David Aldrich
  2020-12-09 16:59 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: David Aldrich @ 2020-12-09 16:34 UTC (permalink / raw)
  To: users

Hi

Having successfully demonstrated using dpdk with our application, it's been
pointed out to me that our settings are using a very large amount of memory.

I am initialising the EAL with:

-m 16000

i.e. 16GB!

However, I am only specifying a count of 0x4000 to rte_ring_create(), which
I call twice to create one Rx and one Tx ring. So I guess these are only
using 32MB RAM total.

My questions are:

1) What would be a sensible amount of memory to specify with the '-m'
parameter to the EAL?
2) What size / number of hugepages should I allocate in Linux?

(I currently use boot parameters: 'hugepagesz=1G hugepages=20 hugepagesz=2M
hugepages=0').

Best regards
David

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-users] Basic hugepages question
  2020-12-09 16:34 [dpdk-users] Basic hugepages question David Aldrich
@ 2020-12-09 16:59 ` Stephen Hemminger
  2020-12-09 18:30   ` David Aldrich
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2020-12-09 16:59 UTC (permalink / raw)
  To: David Aldrich; +Cc: users

On Wed, 9 Dec 2020 16:34:29 +0000
David Aldrich <david.aldrich.ntml@gmail.com> wrote:

> Hi
> 
> Having successfully demonstrated using dpdk with our application, it's been
> pointed out to me that our settings are using a very large amount of memory.
> 
> I am initialising the EAL with:
> 
> -m 16000
> 
> i.e. 16GB!
> 
> However, I am only specifying a count of 0x4000 to rte_ring_create(), which
> I call twice to create one Rx and one Tx ring. So I guess these are only
> using 32MB RAM total.
> 
> My questions are:
> 
> 1) What would be a sensible amount of memory to specify with the '-m'
> parameter to the EAL?
> 2) What size / number of hugepages should I allocate in Linux?
> 
> (I currently use boot parameters: 'hugepagesz=1G hugepages=20 hugepagesz=2M
> hugepages=0').
> 
> Best regards
> David

For most DPDK applications the predominate user of huge pages is any
mbuf pools you create.  You should be able to calculate the worst case size
of all rings and mbuf pools and size your huge memory from that.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-users] Basic hugepages question
  2020-12-09 16:59 ` Stephen Hemminger
@ 2020-12-09 18:30   ` David Aldrich
  0 siblings, 0 replies; 3+ messages in thread
From: David Aldrich @ 2020-12-09 18:30 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: users

Thank you for your reply. I estimate the mbuf pools to be ~150MB. So would
a sensible hugepages configuration be 100 pages of 2MB each?


On Wed, Dec 9, 2020 at 5:00 PM Stephen Hemminger <stephen@networkplumber.org>
wrote:

> On Wed, 9 Dec 2020 16:34:29 +0000
> David Aldrich <david.aldrich.ntml@gmail.com> wrote:
>
> > Hi
> >
> > Having successfully demonstrated using dpdk with our application, it's
> been
> > pointed out to me that our settings are using a very large amount of
> memory.
> >
> > I am initialising the EAL with:
> >
> > -m 16000
> >
> > i.e. 16GB!
> >
> > However, I am only specifying a count of 0x4000 to rte_ring_create(),
> which
> > I call twice to create one Rx and one Tx ring. So I guess these are only
> > using 32MB RAM total.
> >
> > My questions are:
> >
> > 1) What would be a sensible amount of memory to specify with the '-m'
> > parameter to the EAL?
> > 2) What size / number of hugepages should I allocate in Linux?
> >
> > (I currently use boot parameters: 'hugepagesz=1G hugepages=20
> hugepagesz=2M
> > hugepages=0').
> >
> > Best regards
> > David
>
> For most DPDK applications the predominate user of huge pages is any
> mbuf pools you create.  You should be able to calculate the worst case size
> of all rings and mbuf pools and size your huge memory from that.
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-09 18:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09 16:34 [dpdk-users] Basic hugepages question David Aldrich
2020-12-09 16:59 ` Stephen Hemminger
2020-12-09 18:30   ` David Aldrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).