Update: Other than stated in my previous post, it seems like that even connecting with 'ryu rpc-cli --peers=bgp=127.0.0.1:50002’ to a locally running ryu-manager and then closing the session using ‘EOF’, raises the memory consumption of the rye-manager process by around 1-2 MB each time. This raise seems to be permanent. The ryu-manager runs as follows: /usr/bin/python2 /usr/bin/ryu-manager --app-lists /usr/lib/python2.7/site-packages/ryu/services/protocols/bgp/application.py --bgp-app-config-file /usr/lib/python2.7/site-packages/ryu/bgp_strato_conf.py --bgp-app-rpc-host 127.0.0.1 --default-log-level 200
The config for the rye-manager: # # This file is maintained by Puppet. # import os from ryu.services.protocols.bgp.bgpspeaker import RF_VPN_V4 from ryu.services.protocols.bgp.bgpspeaker import RF_VPN_V6 from ryu.services.protocols.bgp.bgpspeaker import RF_L2_EVPN from ryu.services.protocols.bgp.bgpspeaker import EVPN_MAC_IP_ADV_ROUTE from ryu.services.protocols.bgp.bgpspeaker import TUNNEL_TYPE_VXLAN from ryu.services.protocols.bgp.bgpspeaker import EVPN_MULTICAST_ETAG_ROUTE from ryu.services.protocols.bgp.bgpspeaker import EVPN_IP_PREFIX_ROUTE # ============================================================================= # BGP configuration. # ============================================================================= BGP = { # AS number for this BGP instance. 'local_as': 6xxxxx, # BGP Router ID. 'router_id': ‘xx.xx.xx.xx', # List of BGP neighbors. # The parameters for each neighbor are the same as the arguments of # BGPSpeaker.neighbor_add() method. 'neighbors': [ { 'address': ‘xx.xx.xx.xx', 'remote_as': 6xxxxx, 'enable_ipv4': True, 'enable_ipv6': False, 'enable_vpnv4': False, 'enable_vpnv6': False, }, { 'address': ‘xx.xx.xx.xx', 'remote_as': 6xxxx, 'enable_ipv4': True, 'enable_ipv6': False, 'enable_vpnv4': False, 'enable_vpnv6': False, }, ], } # ============================================================================= # Logging configuration. # ============================================================================= LOGGING = { # We use python logging package for logging. 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose': { 'format': '%(levelname)s %(asctime)s %(module)s ' + '[%(process)d %(thread)d] %(message)s' }, 'simple': { 'format': '%(levelname)s %(asctime)s %(module)s %(lineno)s ' + '%(message)s' }, 'stats': { 'format': '%(message)s' }, }, 'handlers': { # Outputs log to console. 'console': { 'level': 'DEBUG', 'class': 'logging.StreamHandler', 'formatter': 'simple' }, 'console_stats': { 'level': 'DEBUG', 'class': 'logging.StreamHandler', 'formatter': 'stats' }, # Rotates log file when its size reaches 10MB. 'log_file': { 'level': 'ERROR', 'class': 'logging.handlers.RotatingFileHandler', 'filename': os.path.join('.', 'bgpspeaker.log'), 'maxBytes': '10000000', 'formatter': 'verbose' }, 'stats_file': { 'level': 'DEBUG', 'class': 'logging.handlers.RotatingFileHandler', 'filename': os.path.join('.', 'statistics_bgps.log'), 'maxBytes': '10000000', 'formatter': 'stats' }, }, # Fine-grained control of logging per instance. 'loggers': { 'bgpspeaker': { 'handlers': ['console', 'log_file'], 'level': 'DEBUG', 'propagate': False, }, 'stats': { 'handlers': ['stats_file', 'console_stats'], 'level': 'INFO', 'propagate': False, 'formatter': 'stats', }, }, # Root loggers. 'root': { 'handlers': ['console', 'log_file'], 'level': 'DEBUG', 'propagate': True, }, } Greets Stefan > On 10. Aug 2017, at 10:19, Scheglmann, Stefan <scheglm...@strato.de> wrote: > > Hi, > > got currently the following problem. I am running a rye-manager as bgp > speaker to announce routes in a HA setup using pacemaker. > For the periodic checks (if routes still announced) i use the following > command ryu rpc-cli --peers=bgp=127.0.0.1:50002 -c 'request bgp operator.show > [{"params": ["rib", "ipv4"], "format": "cli" }]’ from with in my off file. > This leads to a growing memory consumption of the ryu-manager process to > which the rpc-cli connects to (about 1 MB more per call). > It is only a problem when i use the single command (-c, —command) feature of > rpc-cli, if i open the interactive shell with 'rpc-cli > --peers=bgp=127.0.0.1:50002’, do the request from within the shell and > finally close the interactive shell with ‘EOF’. the memory consumption of the > rye-manager is stable. > > Any ideas? > > Thx Stefan > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Ryu-devel mailing list > Ryu-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ryu-devel ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel