Re: [RFC]Routes are stored as a linked list
Donald Sharp
Tue Mar 05 03:56:26 2019
BTW -> I see no difference between using -DRT_FREE_ROUTE_TABLE and not using it.
donald
On Mon, Mar 4, 2019 at 10:48 PM Donald Sharp <sharpd@xxxxxxxxxxxxxxxxxxx> wrote:
>
> 1 million routes install/removal:
> sharpd@janelle ~/dhcpcd> ps -eo rss,pid,euser,args:100 | grep dhcpcd
> 1892 8413 root src/dhcpcd
> 656 8468 sharpd grep --color=auto dhcpcd
>
> This looks awesome, repeated installs/removals and we are at the same
> level of memory consumption.
>
> donald
>
> On Mon, Mar 4, 2019 at 7:47 PM Roy Marples <roy@xxxxxxxxxxxx> wrote:
> >
> > On 04/03/2019 21:43, Roy Marples wrote:
> > > Lowering memory usage more we can do this - move if_initrt to the top of
> > > rt_build. This is tricky as from memory some parts of dhcpcd rely on it
> > > being there outside of route building. We'll need to double check and
> > > fix these places.
> > > Once that's done we can then dispose of kroutes at the end of rt_build.
> > > If that works, kroutes can be removed from the global context.
> > >
> > > But that's for another day.
> >
> > Well, I was wondering what really needs kroutes around and it turns out
> > I think it can be removed safely.
> > I've created a new branch, rbtree-memory with the prior patch in and the
> > above done.
> > It seems to work and valgrind doesn't report any leaks.
> >
> > How is the memory usage looking now with your million routes?
> > If it's lower, could you add -DRT_FREE_ROUTE_TABLE to your CPPFLAGS,
> > clean and compile, and see how that then affects matters?
> >
> > Roy
Archive administrator: postmaster@marples.name