Date: Tue, 30 Dec 2014 15:43:41 +0000 From: Carlos Ferreira <carlosmf.pt@gmail.com> To: Luigi Rizzo <rizzo@iet.unipi.it> Cc: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Subject: Re: Regarding Netmap internal memory allocation. Message-ID: <CAJpYY6UGuzVY%2B=_m2RhOfhR40NHxv6uM%2BfWeJpOGkj9DDXWKiw@mail.gmail.com> In-Reply-To: <CA%2BhQ2%2BiD=2g65ScRBzVVYGRu=jmxksCtMNmObTTnnXfG=Yuu3g@mail.gmail.com> References: <CAJpYY6XmOnYX4bm=YyXr5hoiFLXhoEFXDa44Z_Fn1fHNj8G5_w@mail.gmail.com> <CAJpYY6UH4bU9xYBsAgZm6_h1no9TDPJ9J2TNp4V19rYGrRGuuw@mail.gmail.com> <CA%2BhQ2%2BiD=2g65ScRBzVVYGRu=jmxksCtMNmObTTnnXfG=Yuu3g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Ok thanks. I was hoping not having to recompile the module, but it's ok. Thank you for the info! On 30 December 2014 at 15:38, Luigi Rizzo <rizzo@iet.unipi.it> wrote: > you can reduce the amount of ram (buffers, mostly) by > tweaking the values in netmap_mem2.c :: > struct netmap_obj_params netmap_params[NETMAP_POOLS_NR] = { > ... > } > > or you can simply modify the constant > > netmap_mem2.h:#define NETMAP_BUF_MAX_NUM 20*4096*2 > > to something smaller that suits an openwrt box > (in which i am very interested, as I'd like to deploy one of these soon) > > cheers > luigi > > > On Tue, Dec 30, 2014 at 4:12 PM, Carlos Ferreira <carlosmf.pt@gmail.com> > wrote: > > Update: > > > > I noticed that the netmap module was still crashing, after changing the > > OpenWRT VM ram to 256MB. I now raised to 1GB and it no longer crashed. > The > > netmap module is now consuming about 350MB of Ram, which for my > objectives > > is just too much... > > > > On 30 December 2014 at 14:06, Carlos Ferreira <carlosmf.pt@gmail.com> > wrote: > > > >> To Luigi and to whom may be able to help > >> > >> Hello all. > >> > >> Is it possible to reduce the size of the memory buffer allocated by the > >> netmap module? > >> I'm asking this because I was implementing some testing code, using NICs > >> and a Tap device in an OpenWRT VM with 64MB of RAM. > >> Because of the small RAM amount, the nm_open crashed when the program > >> tried to netmap the tap device, after I previously netmapped one NIC > >> successfully. > >> After the crash, I bumped the VM RAM to 256MB and the test program ran > >> well, but not without me noticing that the VM RAM consumption was > >> increased about 90 MB by netmap. > >> > >> Resuming, I want to know if there is a way to reduce the memory buffer > >> allocation, without recompiling the netmap kernel module. > >> > >> Thank you for the attention. > >> > >> -- > >> > >> Carlos Miguel Ferreira > >> Researcher at Telecommunications Institute > >> Aveiro - Portugal > >> Work E-mail - cmf@av.it.pt > >> Skype & GTalk -> carlosmf.pt@gmail.com > >> LinkedIn -> http://www.linkedin.com/in/carlosmferreira > >> > > > > > > > > -- > > > > Carlos Miguel Ferreira > > Researcher at Telecommunications Institute > > Aveiro - Portugal > > Work E-mail - cmf@av.it.pt > > Skype & GTalk -> carlosmf.pt@gmail.com > > LinkedIn -> http://www.linkedin.com/in/carlosmferreira > > _______________________________________________ > > freebsd-net@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > > > -- > -----------------------------------------+------------------------------- > Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione > http://www.iet.unipi.it/~luigi/ . Universita` di Pisa > TEL +39-050-2211611 . via Diotisalvi 2 > Mobile +39-338-6809875 . 56122 PISA (Italy) > -----------------------------------------+------------------------------- > -- Carlos Miguel Ferreira Researcher at Telecommunications Institute Aveiro - Portugal Work E-mail - cmf@av.it.pt Skype & GTalk -> carlosmf.pt@gmail.com LinkedIn -> http://www.linkedin.com/in/carlosmferreira
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJpYY6UGuzVY%2B=_m2RhOfhR40NHxv6uM%2BfWeJpOGkj9DDXWKiw>