Code Monkey home page Code Monkey logo

Comments (5)

pavel-odintsov avatar pavel-odintsov commented on August 20, 2024

I have created memory snapshot with gdb --pid=226 and gcore and could share with you:

397M Oct  8 19:08 core.226

from gobgp.

fujita avatar fujita commented on August 20, 2024

Thanks for the report (and sorry about the delay),

Surely, looks worrying. Let me try to reproduce here. You just configure a single peer and let it run for a week? No gRPC (and CLI commands)?

The number of processes also looks scary. How about the number of processes just after starting gobgp?

btw, I've just add the pprof support:
https://golang.org/pkg/net/http/pprof/

The following command gives an idea on who hogs memory:
$go tool pprof --text http://localhost:6060/debug/pprof/heap

from gobgp.

pavel-odintsov avatar pavel-odintsov commented on August 20, 2024

Hello!

Yes, we have only single peer but we have used gRPC from CLI tool.

Recently started tool looks like this:

root      8984  0.0  0.3 290236  7328 pts/1    Sl   16:21   0:00 /opt/gobgp_1_0_0/gobgpd -f /etc/gobgpd.conf
gobgpd---7*[{gobgpd}]

Nice idea about pprof!

from gobgp.

fujita avatar fujita commented on August 20, 2024

Sorry about the delay,

We added lots of routes and then remove them via gRPC. Seems no memory leak.
https://gist.github.com/fujita/cf526e8db0e082daf4f7#file-gistfile1-txt

RSS increased as the number of routes does, then RSS decreased as the number of routes does. As same as your observation, VIRT increased up to about 2G and didn't decrease. But VIRT isn't the amount of memory actually in use. Seems that what we observed is what we expect with golang.

Here is some info about how golang uses memory:
https://deferpanic.com/blog/understanding-golang-memory-usage/

from gobgp.

pavel-odintsov avatar pavel-odintsov commented on August 20, 2024

Hello!

I'm running GoBGP for ~1 weeks and it's looks like this:

root       260  0.0  0.3 1521048 8224 ?        Sl   Nov12   1:09 /usr/local/bin/gobgpd -f /etc/gobgpd.conf

So it's OK :) We actually haven't any memory leaks in awesome gobgp toolkit! Thanks for nice explanation of go's memory behavior.

from gobgp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.