Skip to content

"ps aux" shows libnetconf2 example "server.c" occupied a lot memory after sending a big edit-config RPC (RPC size 60M+) #547

Open

Description

@acidrainspace

edit-config RPC already replied successfully by "server.c"

  1. "ps aux" show this "server.c" NETCONF server occupied more than 600M+ memory , not freed
  2. But repeatedly sending the same big edit-config RPC several time, the memory occupied not increased anymore

RPC attached:
50000-instances.zip

Activity

  1. changed the title [-]"ps aux" shows libnetconf2 "example.c" occupied a lot memory after sending a big edit-config RPC (RPC size 60M+)[/-] [+]"ps aux" shows libnetconf2 "server.c" occupied a lot memory after sending a big edit-config RPC (RPC size 60M+)[/+] on Jul 24, 2025
  2. changed the title [-]"ps aux" shows libnetconf2 "server.c" occupied a lot memory after sending a big edit-config RPC (RPC size 60M+)[/-] [+]"ps aux" shows libnetconf2 example "server.c" occupied a lot memory after sending a big edit-config RPC (RPC size 60M+)[/+] on Jul 24, 2025
  3. michalvasko commented on Jul 25, 2025

    @michalvasko
    Member

    I am not completely sure what the issue is. Run the server with valgrind, if no leaks are reported, it works properly. Maybe ps shows even freed memory, I am not sure what exactly malloc() and free() do. It may be possible the freed memory is not returned to the system but kept expecting more memory allocations, which would explain what you are seeing.

  4. added
    is:question
    on Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions