Does not release shared memory

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Does not release shared memory

Evgeniy G.
Hello!

Please, tell me.
Opensips for some reason does not release shared memory (shmem), it was tested as in the documentation "https://www.opensips.org/Documentation/TroubleShooting-OutOfMem". Waited more than 20 minutes. Now I want to get a memory dump. I tried the same results on versions 2.2.5 and 2.3.1. Set for comparison kamailio, with a similar configuration, the memory is freed immediately, once the call is completed. What could be the problem ?
Opensips v.2.3.1 OC CentOS 7 (virtual machine)
At startup

[root@new-centos7 ~]# /usr/local/opensips225/sbin/opensipsctl start

INFO: Starting OpenSIPS :
INFO: started (pid: 4274)

[root@new-centos7 ~]# /usr/local/opensips225/sbin/opensipsctl fifo get_statistics shmem:
shmem:total_size:: 33554432
shmem:used_size:: 3271272
shmem:real_used_size:: 3557488
shmem:max_used_size:: 3557488
shmem:free_size:: 29996944
shmem:fragments:: 490

I made one call.

[root@new-centos7 ~]# /usr/local/opensips225/sbin/opensipsctl fifo get_statistics shmem:
shmem:total_size:: 33554432
shmem:used_size:: 3336136
shmem:real_used_size:: 3632024
shmem:max_used_size:: 3635208
shmem:free_size:: 29922408
shmem:fragments:: 577
[root@new-centos7 ~]#

In 20 minutes.

[root@new-centos7 ~]# /usr/local/opensips225/sbin/opensipsctl fifo get_statistics shmem:
shmem:total_size:: 33554432
shmem:used_size:: 3336136
shmem:real_used_size:: 3632024
shmem:max_used_size:: 3635208
shmem:free_size:: 29922408
shmem:fragments:: 577

Stopped
[root@new-centos7 ~]# /usr/local/opensips225/sbin/opensipsctl stop

INFO: Stopping OpenSIPS :
INFO: stopped
[root@new-centos7 ~]#

Dump memory
2017-07-21T18:44:57.5212 B2BUA Memory status (pkg):
2017-07-21T18:44:57.5212 B2BUA qm_status (0x7f1d017fe010):
2017-07-21T18:44:57.5213 B2BUA  heap size= 2097152
2017-07-21T18:44:57.5214 B2BUA  used= 63904, used+overhead=350224, free=1746928
2017-07-21T18:44:57.5215 B2BUA  max used (+overhead)= 355224
2017-07-21T18:44:57.5216 B2BUA  dumping summary of all alloc'ed. fragments:
2017-07-21T18:44:57.5217 B2BUA          32 : 2 x [script_var.c: add_var, line 59]
2017-07-21T18:44:57.5218 B2BUA       14400 : 72 x [route_struct.c: mk_action, line 106]
2017-07-21T18:44:57.5218 B2BUA          80 : 2 x [cfg.y: mk_listen_id, line 2785]
2017-07-21T18:44:57.5219 B2BUA          48 : 1 x [ipc.c: ipc_register_handler, line 50]
2017-07-21T18:44:57.5220 B2BUA         320 : 2 x [db/db.c: db_do_init, line 321]
2017-07-21T18:44:57.5220 B2BUA          80 : 2 x [pvar.c: new_pv_context, line 4745]
2017-07-21T18:44:57.5221 B2BUA          96 : 2 x [script_var.c: add_var, line 52]
2017-07-21T18:44:57.5222 B2BUA          64 : 1 x [ds_fixups.c: set_list_from_string, line 226]
2017-07-21T18:44:57.5223 B2BUA          16 : 1 x [ds_fixups.c: ds_select_fixup, line 730]
2017-07-21T18:44:57.5224 B2BUA          96 : 2 x [sr_module_deps.c: alloc_module_dep, line 54]
2017-07-21T18:44:57.5225 B2BUA         128 : 1 x [net/net_tcp.c: tcp_init, line 1633]
2017-07-21T18:44:57.5226 B2BUA          80 : 1 x [mi/mi_trace.c: try_load_trace_api, line 55]
2017-07-21T18:44:57.5226 B2BUA          24 : 1 x [mod_fix.c: fixup_spve, line 938]
2017-07-21T18:44:57.5227 B2BUA          32 : 2 x [socket_info.c: new_sock_info, line 116]
2017-07-21T18:44:57.5228 B2BUA         192 : 15 x [map.c: map_get, line 150]
2017-07-21T18:44:57.5229 B2BUA          32 : 1 x [map.c: map_create, line 79]
2017-07-21T18:44:57.5229 B2BUA          48 : 2 x [socket_info.c: fix_socket_list, line 670]
2017-07-21T18:44:57.5230 B2BUA         184 : 5 x [mod_fix.c: fixup_sgp, line 771]
2017-07-21T18:44:57.5231 B2BUA          24 : 1 x [ds_fixups.c: set_list_from_string, line 197]
2017-07-21T18:44:57.5232 B2BUA        4928 : 37 x [pvar.c: pv_parse_format, line 4099]
2017-07-21T18:44:57.5232 B2BUA        1768 : 17 x [cfg.y: yyparse, line 2299]
2017-07-21T18:44:57.5233 B2BUA          32 : 2 x [socket_info.c: fix_socket_list, line 591]
2017-07-21T18:44:57.5234 B2BUA        2496 : 24 x [cfg.y: yyparse, line 1464]
2017-07-21T18:44:57.5235 B2BUA          24 : 1 x [ds_fixups.c: set_list_from_string, line 146]
2017-07-21T18:44:57.5236 B2BUA       26240 : 205 x [cfg.lex: addstr, line 919]
2017-07-21T18:44:57.5237 B2BUA         480 : 2 x [socket_info.c: new_sock_info, line 111]
2017-07-21T18:44:57.5237 B2BUA        4216 : 1 x [mi/mi.c: register_mi_cmd, line 146]
2017-07-21T18:44:57.5238 B2BUA         104 : 1 x [ds_fixups.c: set_list_from_string, line 232]
2017-07-21T18:44:57.5239 B2BUA        1792 : 32 x [route_struct.c: mk_elem, line 70]
2017-07-21T18:44:57.5239 B2BUA          72 : 2 x [socket_info.c: fix_socket_list, line 540]
2017-07-21T18:44:57.5240 B2BUA          32 : 2 x [cfg.y: yyparse, line 519]
2017-07-21T18:44:57.5241 B2BUA          16 : 1 x [b2b_logic.h: prepare_b2b_scen_fl_struct, line 179]
2017-07-21T18:44:57.5241 B2BUA         104 : 1 x [context.c: register_context_destroy, line 74]
2017-07-21T18:44:57.5242 B2BUA        4104 : 1 x [xlog.c: buf_init, line 69]
2017-07-21T18:44:57.5243 B2BUA          48 : 2 x [cfg.y: yyparse, line 1162]
2017-07-21T18:44:57.5244 B2BUA         128 : 3 x [sipmsgops.c: fixup_method, line 892]
2017-07-21T18:44:57.5245 B2BUA         504 : 9 x [route_struct.c: mk_exp, line 54]
2017-07-21T18:44:57.5245 B2BUA         840 : 15 x [map.c: map_get, line 139]
2017-07-21T18:44:57.5246 B2BUA  dumping free list stats :
2017-07-21T18:44:57.5247 B2BUA hash=   5. fragments no.:     1, unused:     0#012#011#011 bucket size:        40 -        40 (first        40)
2017-07-21T18:44:57.5248 B2BUA hash=   6. fragments no.:    11, unused:     0#012#011#011 bucket size:        48 -        48 (first        48)
2017-07-21T18:44:57.5249 B2BUA hash=  19. fragments no.:     1, unused:     0#012#011#011 bucket size:       152 -       152 (first       152)
2017-07-21T18:44:57.5250 B2BUA hash=  23. fragments no.:     1, unused:     0#012#011#011 bucket size:       184 -       184 (first       184)
2017-07-21T18:44:57.5250 B2BUA hash=  29. fragments no.:     1, unused:     0#012#011#011 bucket size:       232 -       232 (first       232)
2017-07-21T18:44:57.5251 B2BUA hash= 181. fragments no.:     1, unused:     0#012#011#011 bucket size:      1448 -      1448 (first      1448)
2017-07-21T18:44:57.5252 B2BUA hash= 302. fragments no.:     1, unused:     0#012#011#011 bucket size:      2416 -      2416 (first      2416)
2017-07-21T18:44:57.5253 B2BUA hash= 2055. fragments no.:     1, unused:     0#012#011#011 bucket size:   1048576 -   2097152 (first   1741928)
2017-07-21T18:44:57.5254 B2BUA -----------------------------
2017-07-21T18:44:57.5255 B2BUA shm_free(0x7f1cffb592a8), called from main.c: cleanup(337)
2017-07-21T18:44:57.5256 B2BUA freeing frag. 0x7f1cffb59270 alloc'ed from pt.c: init_multi_proc_support(69)
2017-07-21T18:44:57.5256 B2BUA Memory status (shm):
2017-07-21T18:44:57.5257 B2BUA qm_status (0x7f1cff7fe000):
2017-07-21T18:44:57.5258 B2BUA  heap size= 33554432
2017-07-21T18:44:57.5258 B2BUA  used= 2856, used+overhead=245912, free=33308520
2017-07-21T18:44:57.5259 B2BUA  max used (+overhead)= 3635208
2017-07-21T18:44:57.5260 B2BUA  dumping summary of all alloc'ed. fragments:
2017-07-21T18:44:57.5261 B2BUA          16 : 2 x [statistics.c: register_udp_load_stat, line 160]
2017-07-21T18:44:57.5262 B2BUA         280 : 2 x [statistics.c: register_udp_load_stat, line 152]
2017-07-21T18:44:57.5262 B2BUA          56 : 2 x [statistics.c: build_stat_name, line 122]
2017-07-21T18:44:57.5263 B2BUA         264 : 33 x [mi/mi.c: register_mi_cmd, line 174]
2017-07-21T18:44:57.5264 B2BUA         616 : 5 x [timer.c: new_os_timer, line 145]
2017-07-21T18:44:57.5265 B2BUA          64 : 1 x [statistics.c: register_tcp_load_stat, line 179]
2017-07-21T18:44:57.5266 B2BUA          32 : 1 x [map.c: map_create, line 79]
2017-07-21T18:44:57.5266 B2BUA         864 : 1 x [core_stats.c: init_pkg_stats, line 173]
2017-07-21T18:44:57.5267 B2BUA           8 : 1 x [timer.c: init_timer, line 82]
2017-07-21T18:44:57.5268 B2BUA           8 : 1 x [usr_avp.c: init_extra_avps, line 83]
2017-07-21T18:44:57.5269 B2BUA          24 : 1 x [ds_fixups.c: fixup_partition_sets_null, line 386]
2017-07-21T18:44:57.5270 B2BUA          40 : 5 x [evi/event_interface.c: evi_publish_event, line 75]
2017-07-21T18:44:57.5271 B2BUA           8 : 1 x [statistics.c: register_tcp_load_stat, line 186]
2017-07-21T18:44:57.5271 B2BUA           8 : 1 x [usr_avp.c: init_extra_avps, line 74]
2017-07-21T18:44:57.5272 B2BUA         144 : 1 x [core_stats.c: init_pkg_stats, line 174]
2017-07-21T18:44:57.5274 B2BUA         400 : 1 x [evi/event_interface.c: evi_publish_event, line 61]
2017-07-21T18:44:57.5275 B2BUA           8 : 1 x [mem/shm_mem.c: shm_mem_init_mallocs, line 387]
2017-07-21T18:44:57.5275 B2BUA           8 : 1 x [dispatch.c: init_ds_data, line 98]
2017-07-21T18:44:57.5276 B2BUA           8 : 1 x [daemonize.c: create_status_pipe, line 90]
2017-07-21T18:44:57.5277 B2BUA  dumping free list stats :
2017-07-21T18:44:57.5278 B2BUA hash=  12. fragments no.:     1, unused:     0#012#011#011 bucket size:        96 -        96 (first        96)
2017-07-21T18:44:57.5278 B2BUA hash=  15. fragments no.:     1, unused:     0#012#011#011 bucket size:       120 -       120 (first       120)
2017-07-21T18:44:57.5279 B2BUA hash=  37. fragments no.:     1, unused:     0#012#011#011 bucket size:       296 -       296 (first       296)
2017-07-21T18:44:57.5280 B2BUA hash=  50. fragments no.:     1, unused:     0#012#011#011 bucket size:       400 -       400 (first       400)
2017-07-21T18:44:57.5281 B2BUA hash=  69. fragments no.:     1, unused:     0#012#011#011 bucket size:       552 -       552 (first       552)
2017-07-21T18:44:57.5281 B2BUA hash= 378. fragments no.:     1, unused:     0#012#011#011 bucket size:      3024 -      3024 (first      3024)
2017-07-21T18:44:57.5282 B2BUA hash= 434. fragments no.:     1, unused:     0#012#011#011 bucket size:      3472 -      3472 (first      3472)
2017-07-21T18:44:57.5283 B2BUA hash= 498. fragments no.:     1, unused:     0#012#011#011 bucket size:      3984 -      3984 (first      3984)
2017-07-21T18:44:57.5284 B2BUA hash= 715. fragments no.:     1, unused:     0#012#011#011 bucket size:      5720 -      5720 (first      5720)
2017-07-21T18:44:57.5284 B2BUA hash= 2049. fragments no.:     1, unused:     0#012#011#011 bucket size:     16384 -     32768 (first     30672)
2017-07-21T18:44:57.5285 B2BUA hash= 2051. fragments no.:     1, unused:     0#012#011#011 bucket size:     65536 -    131072 (first    101152)
2017-07-21T18:44:57.5286 B2BUA hash= 2054. fragments no.:     1, unused:     0#012#011#011 bucket size:    524288 -   1048576 (first    539096)
2017-07-21T18:44:57.5287 B2BUA hash= 2056. fragments no.:     1, unused:     0#012#011#011 bucket size:   2097152 -   4194304 (first   2622816)
2017-07-21T18:44:57.5287 B2BUA hash= 2059. fragments no.:     1, unused:     0#012#011#011 bucket size:  16777216 -  33554432 (first  29997120)
2017-07-21T18:44:57.5288 B2BUA -----------------------------
2017-07-21T18:44:57.5289 B2BUA DBG:core:shm_mem_destroy: destroying the shared memory lock
^C
[root@new-centos7 sbin]#


Sorry for bad english =)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Does not release shared memory

Liviu Chircu
Hi, dgoni!

That's not a really fair test, IMO. There are plenty of one-time buffer
allocations happening in all sorts of modules. Can you please confirm if
your diagnostic is still valid even after you run some more calls
through OpenSIPS? The leak should be obvious in the memory map, too -
this isn't the case now.

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.coaf

On 21.07.2017 21:31, dgoni_sp via Users wrote:

> Hello!
>
> Please, tell me.
> Opensips for some reason does not release shared memory (shmem), it was
> tested as in the documentation
> "https://www.opensips.org/Documentation/TroubleShooting-OutOfMem". Waited
> more than 20 minutes. Now I want to get a memory dump. I tried the same
> results on versions 2.2.5 and 2.3.1. Set for comparison kamailio, with a
> similar configuration, the memory is freed immediately, once the call is
> completed. What could be the problem ?
> Opensips v.2.3.1 OC CentOS 7 (virtual machine)
> At startup
>
> [root@new-centos7 ~]# /usr/local/opensips225/sbin/opensipsctl start
>
> INFO: Starting OpenSIPS :
> INFO: started (pid: 4274)
>
> [root@new-centos7 ~]# /usr/local/opensips225/sbin/opensipsctl fifo
> get_statistics shmem:
> shmem:total_size:: 33554432
> shmem:used_size:: 3271272
> shmem:real_used_size:: 3557488
> shmem:max_used_size:: 3557488
> shmem:free_size:: 29996944
> shmem:fragments:: 490
>
> I made one call.
>
> [root@new-centos7 ~]# /usr/local/opensips225/sbin/opensipsctl fifo
> get_statistics shmem:
> shmem:total_size:: 33554432
> shmem:used_size:: 3336136
> shmem:real_used_size:: 3632024
> shmem:max_used_size:: 3635208
> shmem:free_size:: 29922408
> shmem:fragments:: 577
> [root@new-centos7 ~]#
>
> In 20 minutes.
>
> [root@new-centos7 ~]# /usr/local/opensips225/sbin/opensipsctl fifo
> get_statistics shmem:
> shmem:total_size:: 33554432
> shmem:used_size:: 3336136
> shmem:real_used_size:: 3632024
> shmem:max_used_size:: 3635208
> shmem:free_size:: 29922408
> shmem:fragments:: 577
>
> Stopped
> [root@new-centos7 ~]# /usr/local/opensips225/sbin/opensipsctl stop
>
> INFO: Stopping OpenSIPS :
> INFO: stopped
> [root@new-centos7 ~]#
>
> Dump memory
> 2017-07-21T18:44:57.5212 B2BUA Memory status (pkg):
> 2017-07-21T18:44:57.5212 B2BUA qm_status (0x7f1d017fe010):
> 2017-07-21T18:44:57.5213 B2BUA  heap size= 2097152
> 2017-07-21T18:44:57.5214 B2BUA  used= 63904, used+overhead=350224,
> free=1746928
> 2017-07-21T18:44:57.5215 B2BUA  max used (+overhead)= 355224
> 2017-07-21T18:44:57.5216 B2BUA  dumping summary of all alloc'ed. fragments:
> 2017-07-21T18:44:57.5217 B2BUA          32 : 2 x [script_var.c: add_var,
> line 59]
> 2017-07-21T18:44:57.5218 B2BUA       14400 : 72 x [route_struct.c:
> mk_action, line 106]
> 2017-07-21T18:44:57.5218 B2BUA          80 : 2 x [cfg.y: mk_listen_id, line
> 2785]
> 2017-07-21T18:44:57.5219 B2BUA          48 : 1 x [ipc.c:
> ipc_register_handler, line 50]
> 2017-07-21T18:44:57.5220 B2BUA         320 : 2 x [db/db.c: db_do_init, line
> 321]
> 2017-07-21T18:44:57.5220 B2BUA          80 : 2 x [pvar.c: new_pv_context,
> line 4745]
> 2017-07-21T18:44:57.5221 B2BUA          96 : 2 x [script_var.c: add_var,
> line 52]
> 2017-07-21T18:44:57.5222 B2BUA          64 : 1 x [ds_fixups.c:
> set_list_from_string, line 226]
> 2017-07-21T18:44:57.5223 B2BUA          16 : 1 x [ds_fixups.c:
> ds_select_fixup, line 730]
> 2017-07-21T18:44:57.5224 B2BUA          96 : 2 x [sr_module_deps.c:
> alloc_module_dep, line 54]
> 2017-07-21T18:44:57.5225 B2BUA         128 : 1 x [net/net_tcp.c: tcp_init,
> line 1633]
> 2017-07-21T18:44:57.5226 B2BUA          80 : 1 x [mi/mi_trace.c:
> try_load_trace_api, line 55]
> 2017-07-21T18:44:57.5226 B2BUA          24 : 1 x [mod_fix.c: fixup_spve,
> line 938]
> 2017-07-21T18:44:57.5227 B2BUA          32 : 2 x [socket_info.c:
> new_sock_info, line 116]
> 2017-07-21T18:44:57.5228 B2BUA         192 : 15 x [map.c: map_get, line 150]
> 2017-07-21T18:44:57.5229 B2BUA          32 : 1 x [map.c: map_create, line
> 79]
> 2017-07-21T18:44:57.5229 B2BUA          48 : 2 x [socket_info.c:
> fix_socket_list, line 670]
> 2017-07-21T18:44:57.5230 B2BUA         184 : 5 x [mod_fix.c: fixup_sgp, line
> 771]
> 2017-07-21T18:44:57.5231 B2BUA          24 : 1 x [ds_fixups.c:
> set_list_from_string, line 197]
> 2017-07-21T18:44:57.5232 B2BUA        4928 : 37 x [pvar.c: pv_parse_format,
> line 4099]
> 2017-07-21T18:44:57.5232 B2BUA        1768 : 17 x [cfg.y: yyparse, line
> 2299]
> 2017-07-21T18:44:57.5233 B2BUA          32 : 2 x [socket_info.c:
> fix_socket_list, line 591]
> 2017-07-21T18:44:57.5234 B2BUA        2496 : 24 x [cfg.y: yyparse, line
> 1464]
> 2017-07-21T18:44:57.5235 B2BUA          24 : 1 x [ds_fixups.c:
> set_list_from_string, line 146]
> 2017-07-21T18:44:57.5236 B2BUA       26240 : 205 x [cfg.lex: addstr, line
> 919]
> 2017-07-21T18:44:57.5237 B2BUA         480 : 2 x [socket_info.c:
> new_sock_info, line 111]
> 2017-07-21T18:44:57.5237 B2BUA        4216 : 1 x [mi/mi.c: register_mi_cmd,
> line 146]
> 2017-07-21T18:44:57.5238 B2BUA         104 : 1 x [ds_fixups.c:
> set_list_from_string, line 232]
> 2017-07-21T18:44:57.5239 B2BUA        1792 : 32 x [route_struct.c: mk_elem,
> line 70]
> 2017-07-21T18:44:57.5239 B2BUA          72 : 2 x [socket_info.c:
> fix_socket_list, line 540]
> 2017-07-21T18:44:57.5240 B2BUA          32 : 2 x [cfg.y: yyparse, line 519]
> 2017-07-21T18:44:57.5241 B2BUA          16 : 1 x [b2b_logic.h:
> prepare_b2b_scen_fl_struct, line 179]
> 2017-07-21T18:44:57.5241 B2BUA         104 : 1 x [context.c:
> register_context_destroy, line 74]
> 2017-07-21T18:44:57.5242 B2BUA        4104 : 1 x [xlog.c: buf_init, line 69]
> 2017-07-21T18:44:57.5243 B2BUA          48 : 2 x [cfg.y: yyparse, line 1162]
> 2017-07-21T18:44:57.5244 B2BUA         128 : 3 x [sipmsgops.c: fixup_method,
> line 892]
> 2017-07-21T18:44:57.5245 B2BUA         504 : 9 x [route_struct.c: mk_exp,
> line 54]
> 2017-07-21T18:44:57.5245 B2BUA         840 : 15 x [map.c: map_get, line 139]
> 2017-07-21T18:44:57.5246 B2BUA  dumping free list stats :
> 2017-07-21T18:44:57.5247 B2BUA hash=   5. fragments no.:     1, unused:
> 0#012#011#011 bucket size:        40 -        40 (first        40)
> 2017-07-21T18:44:57.5248 B2BUA hash=   6. fragments no.:    11, unused:
> 0#012#011#011 bucket size:        48 -        48 (first        48)
> 2017-07-21T18:44:57.5249 B2BUA hash=  19. fragments no.:     1, unused:
> 0#012#011#011 bucket size:       152 -       152 (first       152)
> 2017-07-21T18:44:57.5250 B2BUA hash=  23. fragments no.:     1, unused:
> 0#012#011#011 bucket size:       184 -       184 (first       184)
> 2017-07-21T18:44:57.5250 B2BUA hash=  29. fragments no.:     1, unused:
> 0#012#011#011 bucket size:       232 -       232 (first       232)
> 2017-07-21T18:44:57.5251 B2BUA hash= 181. fragments no.:     1, unused:
> 0#012#011#011 bucket size:      1448 -      1448 (first      1448)
> 2017-07-21T18:44:57.5252 B2BUA hash= 302. fragments no.:     1, unused:
> 0#012#011#011 bucket size:      2416 -      2416 (first      2416)
> 2017-07-21T18:44:57.5253 B2BUA hash= 2055. fragments no.:     1, unused:
> 0#012#011#011 bucket size:   1048576 -   2097152 (first   1741928)
> 2017-07-21T18:44:57.5254 B2BUA -----------------------------
> 2017-07-21T18:44:57.5255 B2BUA shm_free(0x7f1cffb592a8), called from main.c:
> cleanup(337)
> 2017-07-21T18:44:57.5256 B2BUA freeing frag. 0x7f1cffb59270 alloc'ed from
> pt.c: init_multi_proc_support(69)
> 2017-07-21T18:44:57.5256 B2BUA Memory status (shm):
> 2017-07-21T18:44:57.5257 B2BUA qm_status (0x7f1cff7fe000):
> 2017-07-21T18:44:57.5258 B2BUA  heap size= 33554432
> 2017-07-21T18:44:57.5258 B2BUA  used= 2856, used+overhead=245912,
> free=33308520
> 2017-07-21T18:44:57.5259 B2BUA  max used (+overhead)= 3635208
> 2017-07-21T18:44:57.5260 B2BUA  dumping summary of all alloc'ed. fragments:
> 2017-07-21T18:44:57.5261 B2BUA          16 : 2 x [statistics.c:
> register_udp_load_stat, line 160]
> 2017-07-21T18:44:57.5262 B2BUA         280 : 2 x [statistics.c:
> register_udp_load_stat, line 152]
> 2017-07-21T18:44:57.5262 B2BUA          56 : 2 x [statistics.c:
> build_stat_name, line 122]
> 2017-07-21T18:44:57.5263 B2BUA         264 : 33 x [mi/mi.c: register_mi_cmd,
> line 174]
> 2017-07-21T18:44:57.5264 B2BUA         616 : 5 x [timer.c: new_os_timer,
> line 145]
> 2017-07-21T18:44:57.5265 B2BUA          64 : 1 x [statistics.c:
> register_tcp_load_stat, line 179]
> 2017-07-21T18:44:57.5266 B2BUA          32 : 1 x [map.c: map_create, line
> 79]
> 2017-07-21T18:44:57.5266 B2BUA         864 : 1 x [core_stats.c:
> init_pkg_stats, line 173]
> 2017-07-21T18:44:57.5267 B2BUA           8 : 1 x [timer.c: init_timer, line
> 82]
> 2017-07-21T18:44:57.5268 B2BUA           8 : 1 x [usr_avp.c:
> init_extra_avps, line 83]
> 2017-07-21T18:44:57.5269 B2BUA          24 : 1 x [ds_fixups.c:
> fixup_partition_sets_null, line 386]
> 2017-07-21T18:44:57.5270 B2BUA          40 : 5 x [evi/event_interface.c:
> evi_publish_event, line 75]
> 2017-07-21T18:44:57.5271 B2BUA           8 : 1 x [statistics.c:
> register_tcp_load_stat, line 186]
> 2017-07-21T18:44:57.5271 B2BUA           8 : 1 x [usr_avp.c:
> init_extra_avps, line 74]
> 2017-07-21T18:44:57.5272 B2BUA         144 : 1 x [core_stats.c:
> init_pkg_stats, line 174]
> 2017-07-21T18:44:57.5274 B2BUA         400 : 1 x [evi/event_interface.c:
> evi_publish_event, line 61]
> 2017-07-21T18:44:57.5275 B2BUA           8 : 1 x [mem/shm_mem.c:
> shm_mem_init_mallocs, line 387]
> 2017-07-21T18:44:57.5275 B2BUA           8 : 1 x [dispatch.c: init_ds_data,
> line 98]
> 2017-07-21T18:44:57.5276 B2BUA           8 : 1 x [daemonize.c:
> create_status_pipe, line 90]
> 2017-07-21T18:44:57.5277 B2BUA  dumping free list stats :
> 2017-07-21T18:44:57.5278 B2BUA hash=  12. fragments no.:     1, unused:
> 0#012#011#011 bucket size:        96 -        96 (first        96)
> 2017-07-21T18:44:57.5278 B2BUA hash=  15. fragments no.:     1, unused:
> 0#012#011#011 bucket size:       120 -       120 (first       120)
> 2017-07-21T18:44:57.5279 B2BUA hash=  37. fragments no.:     1, unused:
> 0#012#011#011 bucket size:       296 -       296 (first       296)
> 2017-07-21T18:44:57.5280 B2BUA hash=  50. fragments no.:     1, unused:
> 0#012#011#011 bucket size:       400 -       400 (first       400)
> 2017-07-21T18:44:57.5281 B2BUA hash=  69. fragments no.:     1, unused:
> 0#012#011#011 bucket size:       552 -       552 (first       552)
> 2017-07-21T18:44:57.5281 B2BUA hash= 378. fragments no.:     1, unused:
> 0#012#011#011 bucket size:      3024 -      3024 (first      3024)
> 2017-07-21T18:44:57.5282 B2BUA hash= 434. fragments no.:     1, unused:
> 0#012#011#011 bucket size:      3472 -      3472 (first      3472)
> 2017-07-21T18:44:57.5283 B2BUA hash= 498. fragments no.:     1, unused:
> 0#012#011#011 bucket size:      3984 -      3984 (first      3984)
> 2017-07-21T18:44:57.5284 B2BUA hash= 715. fragments no.:     1, unused:
> 0#012#011#011 bucket size:      5720 -      5720 (first      5720)
> 2017-07-21T18:44:57.5284 B2BUA hash= 2049. fragments no.:     1, unused:
> 0#012#011#011 bucket size:     16384 -     32768 (first     30672)
> 2017-07-21T18:44:57.5285 B2BUA hash= 2051. fragments no.:     1, unused:
> 0#012#011#011 bucket size:     65536 -    131072 (first    101152)
> 2017-07-21T18:44:57.5286 B2BUA hash= 2054. fragments no.:     1, unused:
> 0#012#011#011 bucket size:    524288 -   1048576 (first    539096)
> 2017-07-21T18:44:57.5287 B2BUA hash= 2056. fragments no.:     1, unused:
> 0#012#011#011 bucket size:   2097152 -   4194304 (first   2622816)
> 2017-07-21T18:44:57.5287 B2BUA hash= 2059. fragments no.:     1, unused:
> 0#012#011#011 bucket size:  16777216 -  33554432 (first  29997120)
> 2017-07-21T18:44:57.5288 B2BUA -----------------------------
> 2017-07-21T18:44:57.5289 B2BUA DBG:core:shm_mem_destroy: destroying the
> shared memory lock
> ^C
> [root@new-centos7 sbin]#
>
>
> Sorry for bad english =)
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Does-not-release-shared-memory-tp7608065.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Does not release shared memory

Evgeniy G.
Hi, Liviu Chircu
I found out the memory stick when Opensips fell. I measured the average memory usage value by one call of 0.064MB. Then, at startup, Opensips indicated using 32M of shared memory. Using the values from the statistics (shmem: free_size 29996944 B) translated it into MB (28,6073). The result was divided by 0,064 resulting in about 447 calls. And then the magic begins =).
After 448 calls, OpenSIPs crashes. Similarly, it happens when you specify a memory of more than 32MB.
I use the Opencips on CentOS 7. I did not observe such a problem on Ubuntu 16.04 TLS.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Does not release shared memory

Liviu Chircu
Please post some crash logs, a backtrace, or anything that might be
useful in making progress with this. For example, you could do 200
calls, print out the memory status with SIGUSR1 [1] and post it here. Or
you could post some pre-crash logs. Or post-crash.

[1]: http://www.opensips.org/Documentation/TroubleShooting-OutOfMem

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 24.07.2017 11:28, Evgeniy G. via Users wrote:

> Hi, Liviu Chircu
> I found out the memory stick when Opensips fell. I measured the average
> memory usage value by one call of 0.064MB. Then, at startup, Opensips
> indicated using 32M of shared memory. Using the values from the statistics
> (shmem: free_size 29996944 B) translated it into MB (28,6073). The result
> was divided by 0,064 resulting in about 447 calls. And then the magic begins
> =).
> After 448 calls, OpenSIPs crashes. Similarly, it happens when you specify a
> memory of more than 32MB.
> I use the Opencips on CentOS 7. I did not observe such a problem on Ubuntu
> 16.04 TLS.
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Does-not-release-shared-memory-tp7608065p7608080.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Does not release shared memory

Evgeniy G.
This post was updated on .
In reply to this post by Evgeniy G.
Today, I checked the results at CENOS 6.
The first graph shows the use of memory on the CentOS 6, the second on CentOS 7. The second graph shows that the memory at the end of calls is not released.I removed all the logic and left one function in the route block - t_relay ().
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Does not release shared memory

Evgeniy G.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Does not release shared memory

Liviu Chircu
Just to make sure I got it right: Although the graph says "memory
usage", it actually graphs "free memory", correct?

If yes, could you please redo the test, properly wait for all calls to
finish, and then generate a memory map with "kill -SIGUSR1
<opensips_attendant_pid>"? You can find out the attendant's PID with
"opensipsctl fifo ps".

These logs should give us a strong hint as to what happens with the
shared memory on that CentOS 7 box. Also, you may send any relevant
out-of-memory error logs to [hidden email], if privacy is a concern.

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 24.07.2017 14:38, Evgeniy G. via Users wrote:

> <http://opensips-open-sip-server.1449251.n2.nabble.com/file/n7608083/Sharemem_CentOS_7.jpg>
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Does-not-release-shared-memory-tp7608065p7608083.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Does not release shared memory

Evgeniy G.
Liviu Chircu wrote
Just to make sure I got it right: Although the graph says "memory
usage", it actually graphs "free memory", correct?
Yes

If yes, could you please redo the test, properly wait for all calls to
finish, and then generate a memory map with "kill -SIGUSR1
<opensips_attendant_pid>"?
Ok, I'll do it and let you know the results.  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Does not release shared memory

Evgeniy G.
Hi, Liviu Chircu
Has found out in what the reason - the reason was in too big (very big) values ​​of parameters:
modparam ("tm", "fr_timeout", 30000)
modparam ("tm", "fr_inv_timeout", 120000)
modparam ("tm", "wt_timer", 15000)

I copied the parameters from an article on the Internet, so I did not pay attention to their values.
During debugging, I noticed that after the transaction ended in case of errors, for a very long time in tcpdump I saw the answers that generated the opensips, understood that it should not be so, but postponed the setting.
And when I decided to reduce the time for generating answers or requests without an answer, then I found out that the problem with not freeing memory was exactly this.
Now I've reduced the values ​​and everything has risen as it should be.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Does not release shared memory

Evgeniy G.
Now I'm testing the server under load, 600 calls per minute and watching the situation. I have only two sockets in the configuration:
listen = udp: 10.2.1.61: 7062
listen = udp: ХХ.ХХ.ХХХ.XXX: 7062
In the children parameter the value 2 is specified. But I can not understand why 18 processes are created at startup ?... It's interesting that only two of them take a role in the processing of calls, why? ... I found this out, because of the decrease in two processes (pkmem:4 and pkmem:5) of pkg memory .
Please explain the work with pkg memory when it is released.
I watched the server for 3 hours under load and 1 hour without, as a result, on two processes the free private memory (pkmem) was rectilinearly reduced. After testing, without restarting the server, private memory (pkgmem) is not released, is it the way it should be?

[root@sbc sbin]# date
Срд Июл 26 09:31:45 MSK 2017
[root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
[root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
pkmem:0-total_size:: 67108864
pkmem:0-used_size:: 66608
pkmem:0-real_used_size:: 112560
pkmem:0-max_used_size:: 112560
pkmem:0-free_size:: 66996304
pkmem:0-fragments:: 510
pkmem:1-total_size:: 67108864
pkmem:1-used_size:: 87128
pkmem:1-real_used_size:: 135912
pkmem:1-max_used_size:: 146248
pkmem:1-free_size:: 66972952
pkmem:1-fragments:: 526
pkmem:2-total_size:: 67108864
pkmem:2-used_size:: 64832
pkmem:2-real_used_size:: 110664
pkmem:2-max_used_size:: 110672
pkmem:2-free_size:: 66998200
pkmem:2-fragments:: 500
pkmem:3-total_size:: 67108864
pkmem:3-used_size:: 64832
pkmem:3-real_used_size:: 110664
pkmem:3-max_used_size:: 110672
pkmem:3-free_size:: 66998200
pkmem:3-fragments:: 500
pkmem:4-total_size:: 67108864
pkmem:4-used_size:: 1144576
pkmem:4-real_used_size:: 2058560
pkmem:4-max_used_size:: 2069256
pkmem:4-free_size:: 65050304
pkmem:4-fragments:: 36614
pkmem:5-total_size:: 67108864
pkmem:5-used_size:: 1381584
pkmem:5-real_used_size:: 2495896
pkmem:5-max_used_size:: 2506568
pkmem:5-free_size:: 64612968
pkmem:5-fragments:: 44959
pkmem:6-total_size:: 67108864
pkmem:6-used_size:: 119960
pkmem:6-real_used_size:: 166824
pkmem:6-max_used_size:: 173640
pkmem:6-free_size:: 66942040
pkmem:6-fragments:: 518
pkmem:7-total_size:: 67108864
pkmem:7-used_size:: 119960
pkmem:7-real_used_size:: 166824
pkmem:7-max_used_size:: 173808
pkmem:7-free_size:: 66942040
pkmem:7-fragments:: 518
pkmem:8-total_size:: 67108864
pkmem:8-used_size:: 119840
pkmem:8-real_used_size:: 165912
pkmem:8-max_used_size:: 165912
pkmem:8-free_size:: 66942952
pkmem:8-fragments:: 515
pkmem:9-total_size:: 67108864
pkmem:9-used_size:: 119840
pkmem:9-real_used_size:: 165912
pkmem:9-max_used_size:: 165912
pkmem:9-free_size:: 66942952
pkmem:9-fragments:: 515
pkmem:10-total_size:: 67108864
pkmem:10-used_size:: 119840
pkmem:10-real_used_size:: 165912
pkmem:10-max_used_size:: 165912
pkmem:10-free_size:: 66942952
pkmem:10-fragments:: 515
pkmem:11-total_size:: 67108864
pkmem:11-used_size:: 119840
pkmem:11-real_used_size:: 165912
pkmem:11-max_used_size:: 165912
pkmem:11-free_size:: 66942952
pkmem:11-fragments:: 515
pkmem:12-total_size:: 67108864
pkmem:12-used_size:: 119840
pkmem:12-real_used_size:: 165912
pkmem:12-max_used_size:: 165912
pkmem:12-free_size:: 66942952
pkmem:12-fragments:: 515
pkmem:13-total_size:: 67108864
pkmem:13-used_size:: 119840
pkmem:13-real_used_size:: 165912
pkmem:13-max_used_size:: 165912
pkmem:13-free_size:: 66942952
pkmem:13-fragments:: 515
pkmem:14-total_size:: 67108864
pkmem:14-used_size:: 119840
pkmem:14-real_used_size:: 165912
pkmem:14-max_used_size:: 165912
pkmem:14-free_size:: 66942952
pkmem:14-fragments:: 515
pkmem:15-total_size:: 67108864
pkmem:15-used_size:: 119840
pkmem:15-real_used_size:: 165912
pkmem:15-max_used_size:: 165912
pkmem:15-free_size:: 66942952
pkmem:15-fragments:: 515
pkmem:16-total_size:: 67108864
pkmem:16-used_size:: 119840
pkmem:16-real_used_size:: 165912
pkmem:16-max_used_size:: 165912
pkmem:16-free_size:: 66942952
pkmem:16-fragments:: 515
pkmem:17-total_size:: 67108864
pkmem:17-used_size:: 109904
pkmem:17-real_used_size:: 155832
pkmem:17-max_used_size:: 155832
pkmem:17-free_size:: 66953032
pkmem:17-fragments:: 504
[root@sbc sbin]#

....


[root@sbc sbin]# date
Срд Июл 26 10:35:47 MSK 2017

[root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
pkmem:0-total_size:: 67108864
pkmem:0-used_size:: 66608
pkmem:0-real_used_size:: 112560
pkmem:0-max_used_size:: 112560
pkmem:0-free_size:: 66996304
pkmem:0-fragments:: 510
pkmem:1-total_size:: 67108864
pkmem:1-used_size:: 87128
pkmem:1-real_used_size:: 135912
pkmem:1-max_used_size:: 146248
pkmem:1-free_size:: 66972952
pkmem:1-fragments:: 526
pkmem:2-total_size:: 67108864
pkmem:2-used_size:: 64832
pkmem:2-real_used_size:: 110664
pkmem:2-max_used_size:: 110672
pkmem:2-free_size:: 66998200
pkmem:2-fragments:: 500
pkmem:3-total_size:: 67108864
pkmem:3-used_size:: 64832
pkmem:3-real_used_size:: 110664
pkmem:3-max_used_size:: 110672
pkmem:3-free_size:: 66998200
pkmem:3-fragments:: 500
pkmem:4-total_size:: 67108864
pkmem:4-used_size:: 2786296
pkmem:4-real_used_size:: 5088608
pkmem:4-max_used_size:: 5099248
pkmem:4-free_size:: 62020256
pkmem:4-fragments:: 94460
pkmem:5-total_size:: 67108864
pkmem:5-used_size:: 3334952
pkmem:5-real_used_size:: 6101784
pkmem:5-max_used_size:: 6112384
pkmem:5-free_size:: 61007080
pkmem:5-fragments:: 113815
pkmem:6-total_size:: 67108864
pkmem:6-used_size:: 120008
pkmem:6-real_used_size:: 167496
pkmem:6-max_used_size:: 175304
pkmem:6-free_size:: 66941368
pkmem:6-fragments:: 519
pkmem:7-total_size:: 67108864
pkmem:7-used_size:: 120000
pkmem:7-real_used_size:: 167584
pkmem:7-max_used_size:: 175240
pkmem:7-free_size:: 66941280
pkmem:7-fragments:: 519
pkmem:8-total_size:: 67108864
pkmem:8-used_size:: 119880
pkmem:8-real_used_size:: 165976
pkmem:8-max_used_size:: 165976
pkmem:8-free_size:: 66942888
pkmem:8-fragments:: 516
pkmem:9-total_size:: 67108864
pkmem:9-used_size:: 119952
pkmem:9-real_used_size:: 166288
pkmem:9-max_used_size:: 167024
pkmem:9-free_size:: 66942576
pkmem:9-fragments:: 518
pkmem:10-total_size:: 67108864
pkmem:10-used_size:: 119880
pkmem:10-real_used_size:: 165976
pkmem:10-max_used_size:: 165976
pkmem:10-free_size:: 66942888
pkmem:10-fragments:: 516
pkmem:11-total_size:: 67108864
pkmem:11-used_size:: 119880
pkmem:11-real_used_size:: 165976
pkmem:11-max_used_size:: 165976
pkmem:11-free_size:: 66942888
pkmem:11-fragments:: 516
pkmem:12-total_size:: 67108864
pkmem:12-used_size:: 119880
pkmem:12-real_used_size:: 165976
pkmem:12-max_used_size:: 165976
pkmem:12-free_size:: 66942888
pkmem:12-fragments:: 516
pkmem:13-total_size:: 67108864
pkmem:13-used_size:: 119952
pkmem:13-real_used_size:: 166288
pkmem:13-max_used_size:: 167024
pkmem:13-free_size:: 66942576
pkmem:13-fragments:: 518
pkmem:14-total_size:: 67108864
pkmem:14-used_size:: 119952
pkmem:14-real_used_size:: 166288
pkmem:14-max_used_size:: 167024
pkmem:14-free_size:: 66942576
pkmem:14-fragments:: 518
pkmem:15-total_size:: 67108864
pkmem:15-used_size:: 119880
pkmem:15-real_used_size:: 165976
pkmem:15-max_used_size:: 165976
pkmem:15-free_size:: 66942888
pkmem:15-fragments:: 516
pkmem:16-total_size:: 67108864
pkmem:16-used_size:: 119880
pkmem:16-real_used_size:: 165976
pkmem:16-max_used_size:: 165976
pkmem:16-free_size:: 66942888
pkmem:16-fragments:: 516
pkmem:17-total_size:: 67108864
pkmem:17-used_size:: 109904
pkmem:17-real_used_size:: 155832
pkmem:17-max_used_size:: 155832
pkmem:17-free_size:: 66953032
pkmem:17-fragments:: 504

....

[root@sbc sbin]# date
Срд Июл 26 11:08:37 MSK 2017
[root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
pkmem:0-total_size:: 67108864
pkmem:0-used_size:: 66608
pkmem:0-real_used_size:: 112560
pkmem:0-max_used_size:: 112560
pkmem:0-free_size:: 66996304
pkmem:0-fragments:: 510
pkmem:1-total_size:: 67108864
pkmem:1-used_size:: 87128
pkmem:1-real_used_size:: 135912
pkmem:1-max_used_size:: 146248
pkmem:1-free_size:: 66972952
pkmem:1-fragments:: 526
pkmem:2-total_size:: 67108864
pkmem:2-used_size:: 64832
pkmem:2-real_used_size:: 110664
pkmem:2-max_used_size:: 110672
pkmem:2-free_size:: 66998200
pkmem:2-fragments:: 500
pkmem:3-total_size:: 67108864
pkmem:3-used_size:: 64832
pkmem:3-real_used_size:: 110664
pkmem:3-max_used_size:: 110672
pkmem:3-free_size:: 66998200
pkmem:3-fragments:: 500
pkmem:4-total_size:: 67108864
pkmem:4-used_size:: 4144936
pkmem:4-real_used_size:: 7595432
pkmem:4-max_used_size:: 7606080
pkmem:4-free_size:: 59513432
pkmem:4-fragments:: 142300
pkmem:5-total_size:: 67108864
pkmem:5-used_size:: 4946520
pkmem:5-real_used_size:: 9075448
pkmem:5-max_used_size:: 9086080
pkmem:5-free_size:: 58033416
pkmem:5-fragments:: 170570
pkmem:6-total_size:: 67108864
pkmem:6-used_size:: 120008
pkmem:6-real_used_size:: 167496
pkmem:6-max_used_size:: 175304
pkmem:6-free_size:: 66941368
pkmem:6-fragments:: 519
pkmem:7-total_size:: 67108864
pkmem:7-used_size:: 120000
pkmem:7-real_used_size:: 167584
pkmem:7-max_used_size:: 175272
pkmem:7-free_size:: 66941280
pkmem:7-fragments:: 520
pkmem:8-total_size:: 67108864
pkmem:8-used_size:: 119880
pkmem:8-real_used_size:: 165976
pkmem:8-max_used_size:: 165976
pkmem:8-free_size:: 66942888
pkmem:8-fragments:: 516
pkmem:9-total_size:: 67108864
pkmem:9-used_size:: 119952
pkmem:9-real_used_size:: 166288
pkmem:9-max_used_size:: 167024
pkmem:9-free_size:: 66942576
pkmem:9-fragments:: 518
pkmem:10-total_size:: 67108864
pkmem:10-used_size:: 119880
pkmem:10-real_used_size:: 165976
pkmem:10-max_used_size:: 165976
pkmem:10-free_size:: 66942888
pkmem:10-fragments:: 516
pkmem:11-total_size:: 67108864
pkmem:11-used_size:: 119880
pkmem:11-real_used_size:: 165976
pkmem:11-max_used_size:: 165976
pkmem:11-free_size:: 66942888
pkmem:11-fragments:: 516
pkmem:12-total_size:: 67108864
pkmem:12-used_size:: 119880
pkmem:12-real_used_size:: 165976
pkmem:12-max_used_size:: 165976
pkmem:12-free_size:: 66942888
pkmem:12-fragments:: 516
pkmem:13-total_size:: 67108864
pkmem:13-used_size:: 119952
pkmem:13-real_used_size:: 166288
pkmem:13-max_used_size:: 167024
pkmem:13-free_size:: 66942576
pkmem:13-fragments:: 518
pkmem:14-total_size:: 67108864
pkmem:14-used_size:: 119952
pkmem:14-real_used_size:: 166288
pkmem:14-max_used_size:: 167024
pkmem:14-free_size:: 66942576
pkmem:14-fragments:: 518
pkmem:15-total_size:: 67108864
pkmem:15-used_size:: 119880
pkmem:15-real_used_size:: 165976
pkmem:15-max_used_size:: 165976
pkmem:15-free_size:: 66942888
pkmem:15-fragments:: 516
pkmem:16-total_size:: 67108864
pkmem:16-used_size:: 119880
pkmem:16-real_used_size:: 165976
pkmem:16-max_used_size:: 165976
pkmem:16-free_size:: 66942888
pkmem:16-fragments:: 516
pkmem:17-total_size:: 67108864
pkmem:17-used_size:: 109904
pkmem:17-real_used_size:: 155832
pkmem:17-max_used_size:: 155832
pkmem:17-free_size:: 66953032
pkmem:17-fragments:: 504
[root@sbc sbin]#

...
After testing, without restarting the service.

[root@sbc sbin]# date
Срд Июл 26 12:09:01 MSK 2017
[root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
pkmem:0-total_size:: 67108864
pkmem:0-used_size:: 66608
pkmem:0-real_used_size:: 112560
pkmem:0-max_used_size:: 112560
pkmem:0-free_size:: 66996304
pkmem:0-fragments:: 510
pkmem:1-total_size:: 67108864
pkmem:1-used_size:: 87128
pkmem:1-real_used_size:: 135912
pkmem:1-max_used_size:: 146248
pkmem:1-free_size:: 66972952
pkmem:1-fragments:: 526
pkmem:2-total_size:: 67108864
pkmem:2-used_size:: 64832
pkmem:2-real_used_size:: 110664
pkmem:2-max_used_size:: 110672
pkmem:2-free_size:: 66998200
pkmem:2-fragments:: 500
pkmem:3-total_size:: 67108864
pkmem:3-used_size:: 64832
pkmem:3-real_used_size:: 110664
pkmem:3-max_used_size:: 110672
pkmem:3-free_size:: 66998200
pkmem:3-fragments:: 500
pkmem:4-total_size:: 67108864
pkmem:4-used_size:: 6444664
pkmem:4-real_used_size:: 11838512
pkmem:4-max_used_size:: 11849192
pkmem:4-free_size:: 55270352
pkmem:4-fragments:: 223275
pkmem:5-total_size:: 67108864
pkmem:5-used_size:: 7769568
pkmem:5-real_used_size:: 14284264
pkmem:5-max_used_size:: 14294848
pkmem:5-free_size:: 52824600
pkmem:5-fragments:: 269975
pkmem:6-total_size:: 67108864
pkmem:6-used_size:: 120000
pkmem:6-real_used_size:: 167512
pkmem:6-max_used_size:: 175336
pkmem:6-free_size:: 66941352
pkmem:6-fragments:: 520
pkmem:7-total_size:: 67108864
pkmem:7-used_size:: 120000
pkmem:7-real_used_size:: 167584
pkmem:7-max_used_size:: 175272
pkmem:7-free_size:: 66941280
pkmem:7-fragments:: 520
pkmem:8-total_size:: 67108864
pkmem:8-used_size:: 119880
pkmem:8-real_used_size:: 165976
pkmem:8-max_used_size:: 165976
pkmem:8-free_size:: 66942888
pkmem:8-fragments:: 516
pkmem:9-total_size:: 67108864
pkmem:9-used_size:: 119952
pkmem:9-real_used_size:: 166288
pkmem:9-max_used_size:: 167024
pkmem:9-free_size:: 66942576
pkmem:9-fragments:: 518
pkmem:10-total_size:: 67108864
pkmem:10-used_size:: 119880
pkmem:10-real_used_size:: 165976
pkmem:10-max_used_size:: 165976
pkmem:10-free_size:: 66942888
pkmem:10-fragments:: 516
pkmem:11-total_size:: 67108864
pkmem:11-used_size:: 119880
pkmem:11-real_used_size:: 165976
pkmem:11-max_used_size:: 165976
pkmem:11-free_size:: 66942888
pkmem:11-fragments:: 516
pkmem:12-total_size:: 67108864
pkmem:12-used_size:: 119880
pkmem:12-real_used_size:: 165976
pkmem:12-max_used_size:: 165976
pkmem:12-free_size:: 66942888
pkmem:12-fragments:: 516
pkmem:13-total_size:: 67108864
pkmem:13-used_size:: 119952
pkmem:13-real_used_size:: 166288
pkmem:13-max_used_size:: 167024
pkmem:13-free_size:: 66942576
pkmem:13-fragments:: 518
pkmem:14-total_size:: 67108864
pkmem:14-used_size:: 119952
pkmem:14-real_used_size:: 166288
pkmem:14-max_used_size:: 167024
pkmem:14-free_size:: 66942576
pkmem:14-fragments:: 518
pkmem:15-total_size:: 67108864
pkmem:15-used_size:: 119880
pkmem:15-real_used_size:: 165976
pkmem:15-max_used_size:: 165976
pkmem:15-free_size:: 66942888
pkmem:15-fragments:: 516
pkmem:16-total_size:: 67108864
pkmem:16-used_size:: 119880
pkmem:16-real_used_size:: 165976
pkmem:16-max_used_size:: 165976
pkmem:16-free_size:: 66942888
pkmem:16-fragments:: 516
pkmem:17-total_size:: 67108864
pkmem:17-used_size:: 109904
pkmem:17-real_used_size:: 155832
pkmem:17-max_used_size:: 155832
pkmem:17-free_size:: 66953032
pkmem:17-fragments:: 504
[root@sbc sbin]#

...

Hour without load.

[root@sbc sbin]# date
Срд Июл 26 12:54:14 MSK 2017
[root@sbc sbin]#
[root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
pkmem:0-total_size:: 67108864
pkmem:0-used_size:: 66608
pkmem:0-real_used_size:: 112560
pkmem:0-max_used_size:: 112560
pkmem:0-free_size:: 66996304
pkmem:0-fragments:: 510
pkmem:1-total_size:: 67108864
pkmem:1-used_size:: 87128
pkmem:1-real_used_size:: 135912
pkmem:1-max_used_size:: 146248
pkmem:1-free_size:: 66972952
pkmem:1-fragments:: 526
pkmem:2-total_size:: 67108864
pkmem:2-used_size:: 64832
pkmem:2-real_used_size:: 110664
pkmem:2-max_used_size:: 110672
pkmem:2-free_size:: 66998200
pkmem:2-fragments:: 500
pkmem:3-total_size:: 67108864
pkmem:3-used_size:: 64832
pkmem:3-real_used_size:: 110664
pkmem:3-max_used_size:: 110672
pkmem:3-free_size:: 66998200
pkmem:3-fragments:: 500
pkmem:4-total_size:: 67108864
pkmem:4-used_size:: 6444664
pkmem:4-real_used_size:: 11838512
pkmem:4-max_used_size:: 11849192
pkmem:4-free_size:: 55270352
pkmem:4-fragments:: 223275
pkmem:5-total_size:: 67108864
pkmem:5-used_size:: 7769568
pkmem:5-real_used_size:: 14284264
pkmem:5-max_used_size:: 14294848
pkmem:5-free_size:: 52824600
pkmem:5-fragments:: 269975
pkmem:6-total_size:: 67108864
pkmem:6-used_size:: 120000
pkmem:6-real_used_size:: 167512
pkmem:6-max_used_size:: 175336
pkmem:6-free_size:: 66941352
pkmem:6-fragments:: 520
pkmem:7-total_size:: 67108864
pkmem:7-used_size:: 120000
pkmem:7-real_used_size:: 167584
pkmem:7-max_used_size:: 175272
pkmem:7-free_size:: 66941280
pkmem:7-fragments:: 520
pkmem:8-total_size:: 67108864
pkmem:8-used_size:: 119880
pkmem:8-real_used_size:: 165976
pkmem:8-max_used_size:: 165976
pkmem:8-free_size:: 66942888
pkmem:8-fragments:: 516
pkmem:9-total_size:: 67108864
pkmem:9-used_size:: 119952
pkmem:9-real_used_size:: 166288
pkmem:9-max_used_size:: 167024
pkmem:9-free_size:: 66942576
pkmem:9-fragments:: 518
pkmem:10-total_size:: 67108864
pkmem:10-used_size:: 119880
pkmem:10-real_used_size:: 165976
pkmem:10-max_used_size:: 165976
pkmem:10-free_size:: 66942888
pkmem:10-fragments:: 516
pkmem:11-total_size:: 67108864
pkmem:11-used_size:: 119880
pkmem:11-real_used_size:: 165976
pkmem:11-max_used_size:: 165976
pkmem:11-free_size:: 66942888
pkmem:11-fragments:: 516
pkmem:12-total_size:: 67108864
pkmem:12-used_size:: 119880
pkmem:12-real_used_size:: 165976
pkmem:12-max_used_size:: 165976
pkmem:12-free_size:: 66942888
pkmem:12-fragments:: 516
pkmem:13-total_size:: 67108864
pkmem:13-used_size:: 119952
pkmem:13-real_used_size:: 166288
pkmem:13-max_used_size:: 167024
pkmem:13-free_size:: 66942576
pkmem:13-fragments:: 518
pkmem:14-total_size:: 67108864
pkmem:14-used_size:: 119952
pkmem:14-real_used_size:: 166288
pkmem:14-max_used_size:: 167024
pkmem:14-free_size:: 66942576
pkmem:14-fragments:: 518
pkmem:15-total_size:: 67108864
pkmem:15-used_size:: 119880
pkmem:15-real_used_size:: 165976
pkmem:15-max_used_size:: 165976
pkmem:15-free_size:: 66942888
pkmem:15-fragments:: 516
pkmem:16-total_size:: 67108864
pkmem:16-used_size:: 119880
pkmem:16-real_used_size:: 165976
pkmem:16-max_used_size:: 165976
pkmem:16-free_size:: 66942888
pkmem:16-fragments:: 516
pkmem:17-total_size:: 67108864
pkmem:17-used_size:: 109904
pkmem:17-real_used_size:: 155832
pkmem:17-max_used_size:: 155832
pkmem:17-free_size:: 66953032
pkmem:17-fragments:: 504
[root@sbc sbin]#

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Does not release shared memory

Liviu Chircu
Here are some more MI commands that might be useful:

opensipsctl fifo ps -> the type of each process

opensipsctl fifo get_statistics dialog: tm: usrloc: -> display in-memory
# of transactions / dialogs / registered users

Like before, if you suspect a leak, please provide the output of the
above MI commands, along with a "kill -SIGUSR1" memory map as instructed
earlier, and we should have a solid indication as to whether there's a
real problem at hand or not.

Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 26.07.2017 16:02, Evgeniy G. via Users wrote:

> Now I'm testing the server under load, 600 calls per minute and watching the
> situation. I have only two sockets in the configuration:
> listen = udp: 10.2.1.61: 7062
> listen = udp: ХХ.ХХ.ХХХ.XXX: 7062
> In the children parameter the value 2 is specified. But I can not understand
> why 18 processes are created at startup ?... It's interesting that only two
> of them take a role in the processing of calls, why? ... I found this out,
> because of the decrease in two processes (pkmem:4 and pkmem:5) of pkg memory
> .
> Please explain the work with pkg memory when it is released.
> I watched the server for 3 hours under load and 1 hour without, as a result,
> on two processes the free private memory (pkmem) was rectilinearly reduced.
> After testing, without restarting the server, private memory (pkgmem) is not
> released, is it the way it should be?
>
> [root@sbc sbin]# date
> Срд Июл 26 09:31:45 MSK 2017
> [root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
> [root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
> pkmem:0-total_size:: 67108864
> pkmem:0-used_size:: 66608
> pkmem:0-real_used_size:: 112560
> pkmem:0-max_used_size:: 112560
> pkmem:0-free_size:: 66996304
> pkmem:0-fragments:: 510
> pkmem:1-total_size:: 67108864
> pkmem:1-used_size:: 87128
> pkmem:1-real_used_size:: 135912
> pkmem:1-max_used_size:: 146248
> pkmem:1-free_size:: 66972952
> pkmem:1-fragments:: 526
> pkmem:2-total_size:: 67108864
> pkmem:2-used_size:: 64832
> pkmem:2-real_used_size:: 110664
> pkmem:2-max_used_size:: 110672
> pkmem:2-free_size:: 66998200
> pkmem:2-fragments:: 500
> pkmem:3-total_size:: 67108864
> pkmem:3-used_size:: 64832
> pkmem:3-real_used_size:: 110664
> pkmem:3-max_used_size:: 110672
> pkmem:3-free_size:: 66998200
> pkmem:3-fragments:: 500
> pkmem:4-total_size:: 67108864
> pkmem:4-used_size:: 1144576
> pkmem:4-real_used_size:: 2058560
> pkmem:4-max_used_size:: 2069256
> pkmem:4-free_size:: 65050304
> pkmem:4-fragments:: 36614
> pkmem:5-total_size:: 67108864
> pkmem:5-used_size:: 1381584
> pkmem:5-real_used_size:: 2495896
> pkmem:5-max_used_size:: 2506568
> pkmem:5-free_size:: 64612968
> pkmem:5-fragments:: 44959
> pkmem:6-total_size:: 67108864
> pkmem:6-used_size:: 119960
> pkmem:6-real_used_size:: 166824
> pkmem:6-max_used_size:: 173640
> pkmem:6-free_size:: 66942040
> pkmem:6-fragments:: 518
> pkmem:7-total_size:: 67108864
> pkmem:7-used_size:: 119960
> pkmem:7-real_used_size:: 166824
> pkmem:7-max_used_size:: 173808
> pkmem:7-free_size:: 66942040
> pkmem:7-fragments:: 518
> pkmem:8-total_size:: 67108864
> pkmem:8-used_size:: 119840
> pkmem:8-real_used_size:: 165912
> pkmem:8-max_used_size:: 165912
> pkmem:8-free_size:: 66942952
> pkmem:8-fragments:: 515
> pkmem:9-total_size:: 67108864
> pkmem:9-used_size:: 119840
> pkmem:9-real_used_size:: 165912
> pkmem:9-max_used_size:: 165912
> pkmem:9-free_size:: 66942952
> pkmem:9-fragments:: 515
> pkmem:10-total_size:: 67108864
> pkmem:10-used_size:: 119840
> pkmem:10-real_used_size:: 165912
> pkmem:10-max_used_size:: 165912
> pkmem:10-free_size:: 66942952
> pkmem:10-fragments:: 515
> pkmem:11-total_size:: 67108864
> pkmem:11-used_size:: 119840
> pkmem:11-real_used_size:: 165912
> pkmem:11-max_used_size:: 165912
> pkmem:11-free_size:: 66942952
> pkmem:11-fragments:: 515
> pkmem:12-total_size:: 67108864
> pkmem:12-used_size:: 119840
> pkmem:12-real_used_size:: 165912
> pkmem:12-max_used_size:: 165912
> pkmem:12-free_size:: 66942952
> pkmem:12-fragments:: 515
> pkmem:13-total_size:: 67108864
> pkmem:13-used_size:: 119840
> pkmem:13-real_used_size:: 165912
> pkmem:13-max_used_size:: 165912
> pkmem:13-free_size:: 66942952
> pkmem:13-fragments:: 515
> pkmem:14-total_size:: 67108864
> pkmem:14-used_size:: 119840
> pkmem:14-real_used_size:: 165912
> pkmem:14-max_used_size:: 165912
> pkmem:14-free_size:: 66942952
> pkmem:14-fragments:: 515
> pkmem:15-total_size:: 67108864
> pkmem:15-used_size:: 119840
> pkmem:15-real_used_size:: 165912
> pkmem:15-max_used_size:: 165912
> pkmem:15-free_size:: 66942952
> pkmem:15-fragments:: 515
> pkmem:16-total_size:: 67108864
> pkmem:16-used_size:: 119840
> pkmem:16-real_used_size:: 165912
> pkmem:16-max_used_size:: 165912
> pkmem:16-free_size:: 66942952
> pkmem:16-fragments:: 515
> pkmem:17-total_size:: 67108864
> pkmem:17-used_size:: 109904
> pkmem:17-real_used_size:: 155832
> pkmem:17-max_used_size:: 155832
> pkmem:17-free_size:: 66953032
> pkmem:17-fragments:: 504
> [root@sbc sbin]#
>
> ....
>
>
> [root@sbc sbin]# date
> Срд Июл 26 10:35:47 MSK 2017
>
> [root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
> pkmem:0-total_size:: 67108864
> pkmem:0-used_size:: 66608
> pkmem:0-real_used_size:: 112560
> pkmem:0-max_used_size:: 112560
> pkmem:0-free_size:: 66996304
> pkmem:0-fragments:: 510
> pkmem:1-total_size:: 67108864
> pkmem:1-used_size:: 87128
> pkmem:1-real_used_size:: 135912
> pkmem:1-max_used_size:: 146248
> pkmem:1-free_size:: 66972952
> pkmem:1-fragments:: 526
> pkmem:2-total_size:: 67108864
> pkmem:2-used_size:: 64832
> pkmem:2-real_used_size:: 110664
> pkmem:2-max_used_size:: 110672
> pkmem:2-free_size:: 66998200
> pkmem:2-fragments:: 500
> pkmem:3-total_size:: 67108864
> pkmem:3-used_size:: 64832
> pkmem:3-real_used_size:: 110664
> pkmem:3-max_used_size:: 110672
> pkmem:3-free_size:: 66998200
> pkmem:3-fragments:: 500
> pkmem:4-total_size:: 67108864
> pkmem:4-used_size:: 2786296
> pkmem:4-real_used_size:: 5088608
> pkmem:4-max_used_size:: 5099248
> pkmem:4-free_size:: 62020256
> pkmem:4-fragments:: 94460
> pkmem:5-total_size:: 67108864
> pkmem:5-used_size:: 3334952
> pkmem:5-real_used_size:: 6101784
> pkmem:5-max_used_size:: 6112384
> pkmem:5-free_size:: 61007080
> pkmem:5-fragments:: 113815
> pkmem:6-total_size:: 67108864
> pkmem:6-used_size:: 120008
> pkmem:6-real_used_size:: 167496
> pkmem:6-max_used_size:: 175304
> pkmem:6-free_size:: 66941368
> pkmem:6-fragments:: 519
> pkmem:7-total_size:: 67108864
> pkmem:7-used_size:: 120000
> pkmem:7-real_used_size:: 167584
> pkmem:7-max_used_size:: 175240
> pkmem:7-free_size:: 66941280
> pkmem:7-fragments:: 519
> pkmem:8-total_size:: 67108864
> pkmem:8-used_size:: 119880
> pkmem:8-real_used_size:: 165976
> pkmem:8-max_used_size:: 165976
> pkmem:8-free_size:: 66942888
> pkmem:8-fragments:: 516
> pkmem:9-total_size:: 67108864
> pkmem:9-used_size:: 119952
> pkmem:9-real_used_size:: 166288
> pkmem:9-max_used_size:: 167024
> pkmem:9-free_size:: 66942576
> pkmem:9-fragments:: 518
> pkmem:10-total_size:: 67108864
> pkmem:10-used_size:: 119880
> pkmem:10-real_used_size:: 165976
> pkmem:10-max_used_size:: 165976
> pkmem:10-free_size:: 66942888
> pkmem:10-fragments:: 516
> pkmem:11-total_size:: 67108864
> pkmem:11-used_size:: 119880
> pkmem:11-real_used_size:: 165976
> pkmem:11-max_used_size:: 165976
> pkmem:11-free_size:: 66942888
> pkmem:11-fragments:: 516
> pkmem:12-total_size:: 67108864
> pkmem:12-used_size:: 119880
> pkmem:12-real_used_size:: 165976
> pkmem:12-max_used_size:: 165976
> pkmem:12-free_size:: 66942888
> pkmem:12-fragments:: 516
> pkmem:13-total_size:: 67108864
> pkmem:13-used_size:: 119952
> pkmem:13-real_used_size:: 166288
> pkmem:13-max_used_size:: 167024
> pkmem:13-free_size:: 66942576
> pkmem:13-fragments:: 518
> pkmem:14-total_size:: 67108864
> pkmem:14-used_size:: 119952
> pkmem:14-real_used_size:: 166288
> pkmem:14-max_used_size:: 167024
> pkmem:14-free_size:: 66942576
> pkmem:14-fragments:: 518
> pkmem:15-total_size:: 67108864
> pkmem:15-used_size:: 119880
> pkmem:15-real_used_size:: 165976
> pkmem:15-max_used_size:: 165976
> pkmem:15-free_size:: 66942888
> pkmem:15-fragments:: 516
> pkmem:16-total_size:: 67108864
> pkmem:16-used_size:: 119880
> pkmem:16-real_used_size:: 165976
> pkmem:16-max_used_size:: 165976
> pkmem:16-free_size:: 66942888
> pkmem:16-fragments:: 516
> pkmem:17-total_size:: 67108864
> pkmem:17-used_size:: 109904
> pkmem:17-real_used_size:: 155832
> pkmem:17-max_used_size:: 155832
> pkmem:17-free_size:: 66953032
> pkmem:17-fragments:: 504
>
> ....
>
> [root@sbc sbin]# date
> Срд Июл 26 11:08:37 MSK 2017
> [root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
> pkmem:0-total_size:: 67108864
> pkmem:0-used_size:: 66608
> pkmem:0-real_used_size:: 112560
> pkmem:0-max_used_size:: 112560
> pkmem:0-free_size:: 66996304
> pkmem:0-fragments:: 510
> pkmem:1-total_size:: 67108864
> pkmem:1-used_size:: 87128
> pkmem:1-real_used_size:: 135912
> pkmem:1-max_used_size:: 146248
> pkmem:1-free_size:: 66972952
> pkmem:1-fragments:: 526
> pkmem:2-total_size:: 67108864
> pkmem:2-used_size:: 64832
> pkmem:2-real_used_size:: 110664
> pkmem:2-max_used_size:: 110672
> pkmem:2-free_size:: 66998200
> pkmem:2-fragments:: 500
> pkmem:3-total_size:: 67108864
> pkmem:3-used_size:: 64832
> pkmem:3-real_used_size:: 110664
> pkmem:3-max_used_size:: 110672
> pkmem:3-free_size:: 66998200
> pkmem:3-fragments:: 500
> pkmem:4-total_size:: 67108864
> pkmem:4-used_size:: 4144936
> pkmem:4-real_used_size:: 7595432
> pkmem:4-max_used_size:: 7606080
> pkmem:4-free_size:: 59513432
> pkmem:4-fragments:: 142300
> pkmem:5-total_size:: 67108864
> pkmem:5-used_size:: 4946520
> pkmem:5-real_used_size:: 9075448
> pkmem:5-max_used_size:: 9086080
> pkmem:5-free_size:: 58033416
> pkmem:5-fragments:: 170570
> pkmem:6-total_size:: 67108864
> pkmem:6-used_size:: 120008
> pkmem:6-real_used_size:: 167496
> pkmem:6-max_used_size:: 175304
> pkmem:6-free_size:: 66941368
> pkmem:6-fragments:: 519
> pkmem:7-total_size:: 67108864
> pkmem:7-used_size:: 120000
> pkmem:7-real_used_size:: 167584
> pkmem:7-max_used_size:: 175272
> pkmem:7-free_size:: 66941280
> pkmem:7-fragments:: 520
> pkmem:8-total_size:: 67108864
> pkmem:8-used_size:: 119880
> pkmem:8-real_used_size:: 165976
> pkmem:8-max_used_size:: 165976
> pkmem:8-free_size:: 66942888
> pkmem:8-fragments:: 516
> pkmem:9-total_size:: 67108864
> pkmem:9-used_size:: 119952
> pkmem:9-real_used_size:: 166288
> pkmem:9-max_used_size:: 167024
> pkmem:9-free_size:: 66942576
> pkmem:9-fragments:: 518
> pkmem:10-total_size:: 67108864
> pkmem:10-used_size:: 119880
> pkmem:10-real_used_size:: 165976
> pkmem:10-max_used_size:: 165976
> pkmem:10-free_size:: 66942888
> pkmem:10-fragments:: 516
> pkmem:11-total_size:: 67108864
> pkmem:11-used_size:: 119880
> pkmem:11-real_used_size:: 165976
> pkmem:11-max_used_size:: 165976
> pkmem:11-free_size:: 66942888
> pkmem:11-fragments:: 516
> pkmem:12-total_size:: 67108864
> pkmem:12-used_size:: 119880
> pkmem:12-real_used_size:: 165976
> pkmem:12-max_used_size:: 165976
> pkmem:12-free_size:: 66942888
> pkmem:12-fragments:: 516
> pkmem:13-total_size:: 67108864
> pkmem:13-used_size:: 119952
> pkmem:13-real_used_size:: 166288
> pkmem:13-max_used_size:: 167024
> pkmem:13-free_size:: 66942576
> pkmem:13-fragments:: 518
> pkmem:14-total_size:: 67108864
> pkmem:14-used_size:: 119952
> pkmem:14-real_used_size:: 166288
> pkmem:14-max_used_size:: 167024
> pkmem:14-free_size:: 66942576
> pkmem:14-fragments:: 518
> pkmem:15-total_size:: 67108864
> pkmem:15-used_size:: 119880
> pkmem:15-real_used_size:: 165976
> pkmem:15-max_used_size:: 165976
> pkmem:15-free_size:: 66942888
> pkmem:15-fragments:: 516
> pkmem:16-total_size:: 67108864
> pkmem:16-used_size:: 119880
> pkmem:16-real_used_size:: 165976
> pkmem:16-max_used_size:: 165976
> pkmem:16-free_size:: 66942888
> pkmem:16-fragments:: 516
> pkmem:17-total_size:: 67108864
> pkmem:17-used_size:: 109904
> pkmem:17-real_used_size:: 155832
> pkmem:17-max_used_size:: 155832
> pkmem:17-free_size:: 66953032
> pkmem:17-fragments:: 504
> [root@sbc sbin]#
>
> ...
> After testing, without restarting the service.
>
> [root@sbc sbin]# date
> Срд Июл 26 12:09:01 MSK 2017
> [root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
> pkmem:0-total_size:: 67108864
> pkmem:0-used_size:: 66608
> pkmem:0-real_used_size:: 112560
> pkmem:0-max_used_size:: 112560
> pkmem:0-free_size:: 66996304
> pkmem:0-fragments:: 510
> pkmem:1-total_size:: 67108864
> pkmem:1-used_size:: 87128
> pkmem:1-real_used_size:: 135912
> pkmem:1-max_used_size:: 146248
> pkmem:1-free_size:: 66972952
> pkmem:1-fragments:: 526
> pkmem:2-total_size:: 67108864
> pkmem:2-used_size:: 64832
> pkmem:2-real_used_size:: 110664
> pkmem:2-max_used_size:: 110672
> pkmem:2-free_size:: 66998200
> pkmem:2-fragments:: 500
> pkmem:3-total_size:: 67108864
> pkmem:3-used_size:: 64832
> pkmem:3-real_used_size:: 110664
> pkmem:3-max_used_size:: 110672
> pkmem:3-free_size:: 66998200
> pkmem:3-fragments:: 500
> pkmem:4-total_size:: 67108864
> pkmem:4-used_size:: 6444664
> pkmem:4-real_used_size:: 11838512
> pkmem:4-max_used_size:: 11849192
> pkmem:4-free_size:: 55270352
> pkmem:4-fragments:: 223275
> pkmem:5-total_size:: 67108864
> pkmem:5-used_size:: 7769568
> pkmem:5-real_used_size:: 14284264
> pkmem:5-max_used_size:: 14294848
> pkmem:5-free_size:: 52824600
> pkmem:5-fragments:: 269975
> pkmem:6-total_size:: 67108864
> pkmem:6-used_size:: 120000
> pkmem:6-real_used_size:: 167512
> pkmem:6-max_used_size:: 175336
> pkmem:6-free_size:: 66941352
> pkmem:6-fragments:: 520
> pkmem:7-total_size:: 67108864
> pkmem:7-used_size:: 120000
> pkmem:7-real_used_size:: 167584
> pkmem:7-max_used_size:: 175272
> pkmem:7-free_size:: 66941280
> pkmem:7-fragments:: 520
> pkmem:8-total_size:: 67108864
> pkmem:8-used_size:: 119880
> pkmem:8-real_used_size:: 165976
> pkmem:8-max_used_size:: 165976
> pkmem:8-free_size:: 66942888
> pkmem:8-fragments:: 516
> pkmem:9-total_size:: 67108864
> pkmem:9-used_size:: 119952
> pkmem:9-real_used_size:: 166288
> pkmem:9-max_used_size:: 167024
> pkmem:9-free_size:: 66942576
> pkmem:9-fragments:: 518
> pkmem:10-total_size:: 67108864
> pkmem:10-used_size:: 119880
> pkmem:10-real_used_size:: 165976
> pkmem:10-max_used_size:: 165976
> pkmem:10-free_size:: 66942888
> pkmem:10-fragments:: 516
> pkmem:11-total_size:: 67108864
> pkmem:11-used_size:: 119880
> pkmem:11-real_used_size:: 165976
> pkmem:11-max_used_size:: 165976
> pkmem:11-free_size:: 66942888
> pkmem:11-fragments:: 516
> pkmem:12-total_size:: 67108864
> pkmem:12-used_size:: 119880
> pkmem:12-real_used_size:: 165976
> pkmem:12-max_used_size:: 165976
> pkmem:12-free_size:: 66942888
> pkmem:12-fragments:: 516
> pkmem:13-total_size:: 67108864
> pkmem:13-used_size:: 119952
> pkmem:13-real_used_size:: 166288
> pkmem:13-max_used_size:: 167024
> pkmem:13-free_size:: 66942576
> pkmem:13-fragments:: 518
> pkmem:14-total_size:: 67108864
> pkmem:14-used_size:: 119952
> pkmem:14-real_used_size:: 166288
> pkmem:14-max_used_size:: 167024
> pkmem:14-free_size:: 66942576
> pkmem:14-fragments:: 518
> pkmem:15-total_size:: 67108864
> pkmem:15-used_size:: 119880
> pkmem:15-real_used_size:: 165976
> pkmem:15-max_used_size:: 165976
> pkmem:15-free_size:: 66942888
> pkmem:15-fragments:: 516
> pkmem:16-total_size:: 67108864
> pkmem:16-used_size:: 119880
> pkmem:16-real_used_size:: 165976
> pkmem:16-max_used_size:: 165976
> pkmem:16-free_size:: 66942888
> pkmem:16-fragments:: 516
> pkmem:17-total_size:: 67108864
> pkmem:17-used_size:: 109904
> pkmem:17-real_used_size:: 155832
> pkmem:17-max_used_size:: 155832
> pkmem:17-free_size:: 66953032
> pkmem:17-fragments:: 504
> [root@sbc sbin]#
>
> ...
>
> Hour without load.
>
> [root@sbc sbin]# date
> Срд Июл 26 12:54:14 MSK 2017
> [root@sbc sbin]#
> [root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
> pkmem:0-total_size:: 67108864
> pkmem:0-used_size:: 66608
> pkmem:0-real_used_size:: 112560
> pkmem:0-max_used_size:: 112560
> pkmem:0-free_size:: 66996304
> pkmem:0-fragments:: 510
> pkmem:1-total_size:: 67108864
> pkmem:1-used_size:: 87128
> pkmem:1-real_used_size:: 135912
> pkmem:1-max_used_size:: 146248
> pkmem:1-free_size:: 66972952
> pkmem:1-fragments:: 526
> pkmem:2-total_size:: 67108864
> pkmem:2-used_size:: 64832
> pkmem:2-real_used_size:: 110664
> pkmem:2-max_used_size:: 110672
> pkmem:2-free_size:: 66998200
> pkmem:2-fragments:: 500
> pkmem:3-total_size:: 67108864
> pkmem:3-used_size:: 64832
> pkmem:3-real_used_size:: 110664
> pkmem:3-max_used_size:: 110672
> pkmem:3-free_size:: 66998200
> pkmem:3-fragments:: 500
> pkmem:4-total_size:: 67108864
> pkmem:4-used_size:: 6444664
> pkmem:4-real_used_size:: 11838512
> pkmem:4-max_used_size:: 11849192
> pkmem:4-free_size:: 55270352
> pkmem:4-fragments:: 223275
> pkmem:5-total_size:: 67108864
> pkmem:5-used_size:: 7769568
> pkmem:5-real_used_size:: 14284264
> pkmem:5-max_used_size:: 14294848
> pkmem:5-free_size:: 52824600
> pkmem:5-fragments:: 269975
> pkmem:6-total_size:: 67108864
> pkmem:6-used_size:: 120000
> pkmem:6-real_used_size:: 167512
> pkmem:6-max_used_size:: 175336
> pkmem:6-free_size:: 66941352
> pkmem:6-fragments:: 520
> pkmem:7-total_size:: 67108864
> pkmem:7-used_size:: 120000
> pkmem:7-real_used_size:: 167584
> pkmem:7-max_used_size:: 175272
> pkmem:7-free_size:: 66941280
> pkmem:7-fragments:: 520
> pkmem:8-total_size:: 67108864
> pkmem:8-used_size:: 119880
> pkmem:8-real_used_size:: 165976
> pkmem:8-max_used_size:: 165976
> pkmem:8-free_size:: 66942888
> pkmem:8-fragments:: 516
> pkmem:9-total_size:: 67108864
> pkmem:9-used_size:: 119952
> pkmem:9-real_used_size:: 166288
> pkmem:9-max_used_size:: 167024
> pkmem:9-free_size:: 66942576
> pkmem:9-fragments:: 518
> pkmem:10-total_size:: 67108864
> pkmem:10-used_size:: 119880
> pkmem:10-real_used_size:: 165976
> pkmem:10-max_used_size:: 165976
> pkmem:10-free_size:: 66942888
> pkmem:10-fragments:: 516
> pkmem:11-total_size:: 67108864
> pkmem:11-used_size:: 119880
> pkmem:11-real_used_size:: 165976
> pkmem:11-max_used_size:: 165976
> pkmem:11-free_size:: 66942888
> pkmem:11-fragments:: 516
> pkmem:12-total_size:: 67108864
> pkmem:12-used_size:: 119880
> pkmem:12-real_used_size:: 165976
> pkmem:12-max_used_size:: 165976
> pkmem:12-free_size:: 66942888
> pkmem:12-fragments:: 516
> pkmem:13-total_size:: 67108864
> pkmem:13-used_size:: 119952
> pkmem:13-real_used_size:: 166288
> pkmem:13-max_used_size:: 167024
> pkmem:13-free_size:: 66942576
> pkmem:13-fragments:: 518
> pkmem:14-total_size:: 67108864
> pkmem:14-used_size:: 119952
> pkmem:14-real_used_size:: 166288
> pkmem:14-max_used_size:: 167024
> pkmem:14-free_size:: 66942576
> pkmem:14-fragments:: 518
> pkmem:15-total_size:: 67108864
> pkmem:15-used_size:: 119880
> pkmem:15-real_used_size:: 165976
> pkmem:15-max_used_size:: 165976
> pkmem:15-free_size:: 66942888
> pkmem:15-fragments:: 516
> pkmem:16-total_size:: 67108864
> pkmem:16-used_size:: 119880
> pkmem:16-real_used_size:: 165976
> pkmem:16-max_used_size:: 165976
> pkmem:16-free_size:: 66942888
> pkmem:16-fragments:: 516
> pkmem:17-total_size:: 67108864
> pkmem:17-used_size:: 109904
> pkmem:17-real_used_size:: 155832
> pkmem:17-max_used_size:: 155832
> pkmem:17-free_size:: 66953032
> pkmem:17-fragments:: 504
> [root@sbc sbin]#
>
>
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Does-not-release-shared-memory-tp7608065p7608135.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Does not release shared memory

Evgeniy G.
In reply to this post by Evgeniy G.
Thank you for opensipsctl fifo ps
[root@sbc sbin]#  ./opensipsctl fifo ps
Process::  ID=0 PID=15438 Type=attendant
Process::  ID=1 PID=15440 Type=MI FIFO
Process::  ID=2 PID=15441 Type=time_keeper
Process::  ID=3 PID=15442 Type=timer
Process::  ID=4 PID=15444 Type=SIP receiver udp:10.2.1.52:7062
Process::  ID=5 PID=15445 Type=SIP receiver udp:10.2.1.52:7062
Process::  ID=6 PID=15446 Type=SIP receiver udp:XXX.XXX.XXX.XXX:7062
Process::  ID=7 PID=15448 Type=SIP receiver udp:XXX.XXX.XXX.XXX:7062
Process::  ID=8 PID=15449 Type=TCP receiver
Process::  ID=9 PID=15451 Type=TCP receiver
Process::  ID=10 PID=15452 Type=TCP receiver
Process::  ID=11 PID=15454 Type=TCP receiver
Process::  ID=12 PID=15455 Type=TCP receiver
Process::  ID=13 PID=15457 Type=TCP receiver
Process::  ID=14 PID=15458 Type=TCP receiver
Process::  ID=15 PID=15466 Type=TCP receiver
Process::  ID=16 PID=15467 Type=Timer handler
Process::  ID=17 PID=15468 Type=TCP main
[root@sbc sbin]#
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Does not release shared memory

Evgeniy G.
I hope someone will help in the future when a similar situation arises.
Found the reason for the leak of private memory (pkmem). When the memory ends in the logs of the message, a message is displayed.
2017-07-26T03: 42: 10.1251 B2BUA INFO: core: fm_malloc: unable to allocate a large enough fragment!
2017-07-26T03: 42: 10.1252 B2BUA ERROR: core: do_action: memory allocation failure
2017-07-26T03: 42: 10.1253 B2BUA ERROR: core: pv_set_ruri_port: do action failed
2017-07-26T03: 42: 10.1254 B2BUA ERROR: core: do_assign: setting PV failed
2017-07-26T03: 42: 10.1255 B2BUA ERROR: core: do_assign: error at / usr/local/opensips231//etc/opensips/opensips.cfg:221
2017-07-26T03: 42: 10.1256 B2BUA ERROR: core: fm_malloc: not enough free pkg memory (0 bytes left, need 64), please increase the "-M" command line parameter!
2017-07-26T03: 42: 10.1257 B2BUA INFO: core: fm_malloc: attempting defragmentation ...

I was wondering why he displays an error in line 221. Here it is:
   $rd = $avp(dest_domain); $rp = $ avp(dest_port);

Where I set the values ​​above
    $avp dest_domain) = $dd;
    $avp(dest_port) = $dp;

I commented out the line:
#$rd = $avp(dest_domain); $rp = $ avp (dest_port);

Pointed out to use for private memory (pkmem) 1 MB and restarted opensips.
Before loading, I looked at the statistics
[Root @ sbc sbin] # ./opensipsctl fifo get_statistics pkmem: | Grep pkmem: [45]
Pkmem: 4-total_size :: 1048576
Pkmem: 4-used_size :: 103224
Pkmem: 4-real_used_size :: 146368
Pkmem: 4-max_used_size :: 146368
Pkmem: 4-free_size :: 902208
Pkmem: 4-fragments :: 393
Pkmem: 5-total_size :: 1048576
Pkmem: 5-used_size :: 103224
Pkmem: 5-real_used_size :: 146368
Pkmem: 5-max_used_size :: 146368
Pkmem: 5-free_size :: 902208
Pkmem: 5-fragments :: 393

Load included:
[Root @ sbc sbin] # ./opensipsctl fifo get_statistics pkmem: | Grep pkmem: [45]
Pkmem: 4-total_size :: 1048576
Pkmem: 4-used_size :: 103272
Pkmem: 4-real_used_size :: 147976
Pkmem: 4-max_used_size :: 156968
Pkmem: 4-free_size :: 900600
Pkmem: 4-fragments :: 395
Pkmem: 5-total_size :: 1048576
Pkmem: 5-used_size :: 103224
Pkmem: 5-real_used_size :: 146368
Pkmem: 5-max_used_size :: 146368
Pkmem: 5-free_size :: 902208
Pkmem: 5-fragments :: 393
....
[Root @ sbc sbin] # ./opensipsctl fifo get_statistics pkmem: | Grep pkmem: [45]
Pkmem: 4-total_size :: 1048576
Pkmem: 4-used_size :: 103272
Pkmem: 4-real_used_size :: 148024
Pkmem: 4-max_used_size :: 157056
Pkmem: 4-free_size :: 900552
Pkmem: 4-fragments :: 395
Pkmem: 5-total_size :: 1048576
Pkmem: 5-used_size :: 103224
Pkmem: 5-real_used_size :: 146368
Pkmem: 5-max_used_size :: 146368
Pkmem: 5-free_size :: 902208
Pkmem: 5-fragments :: 393
[Root @ sbc sbin] #

....

[Root @ sbc sbin] # ./opensipsctl fifo get_statistics pkmem: | Grep pkmem: [45]
Pkmem: 4-total_size :: 1048576
Pkmem: 4-used_size :: 103272
Pkmem: 4-real_used_size :: 148024
Pkmem: 4-max_used_size :: 157056
Pkmem: 4-free_size :: 900552
Pkmem: 4-fragments :: 395
Pkmem: 5-total_size :: 1048576
Pkmem: 5-used_size :: 103280
Pkmem: 5-real_used_size :: 147624
Pkmem: 5-max_used_size :: 155416
Pkmem: 5-free_size :: 900952
Pkmem: 5-fragments :: 395

....
[Root @ sbc sbin] # ./opensipsctl fifo get_statistics pkmem: | Grep pkmem: [45]
Pkmem: 4-total_size :: 1048576
Pkmem: 4-used_size :: 103272
Pkmem: 4-real_used_size :: 148024
Pkmem: 4-max_used_size :: 157056
Pkmem: 4-free_size :: 900552
Pkmem: 4-fragments :: 395
Pkmem: 5-total_size :: 1048576
Pkmem: 5-used_size :: 103280
Pkmem: 5-real_used_size :: 147984
Pkmem: 5-max_used_size :: 157256
Pkmem: 5-free_size :: 900592
Pkmem: 5-fragments :: 395
[Root @ sbc sbin] #

For 1100 seconds opensips successfully processed 11500 calls, statistics
[Root @ sbc sbin] # ./opensipsctl fifo get_statistics pkmem: | Grep pkmem: [45]
Pkmem: 4-total_size :: 1048576
Pkmem: 4-used_size :: 103272
Pkmem: 4-real_used_size :: 148024
Pkmem: 4-max_used_size :: 157064
Pkmem: 4-free_size :: 900552
Pkmem: 4-fragments :: 395
Pkmem: 5-total_size :: 1048576
Pkmem: 5-used_size :: 103280
Pkmem: 5-real_used_size :: 148080
Pkmem: 5-max_used_size :: 157256
Pkmem: 5-free_size :: 900496
Pkmem: 5-fragments :: 395
[Root @ sbc sbin] #

The reason was in assigning the value of rd and rp.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re[2]: Does not release shared memory

Evgeniy G.
In reply to this post by Liviu Chircu
Hi, Liviu Chircu!

Many thanks for your desire to help, well done that the project is alive and you support it.

Regarding my problem, everything turned out to be easier than I expected. I already figured out, including thanks to your hint. Thank you for your assistance!


Best regards,
E.Goley

Среда, 26 июля 2017, 16:43 +03:00 от "Liviu Chircu [via OpenSIPS (Open SIP Server)]" <[hidden email]>:

Here are some more MI commands that might be useful:

opensipsctl fifo ps -> the type of each process

opensipsctl fifo get_statistics dialog: tm: usrloc: -> display in-memory
# of transactions / dialogs / registered users

Like before, if you suspect a leak, please provide the output of the
above MI commands, along with a "kill -SIGUSR1" memory map as instructed
earlier, and we should have a solid indication as to whether there's a
real problem at hand or not.

Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 26.07.2017 16:02, Evgeniy G. via Users wrote:

> Now I'm testing the server under load, 600 calls per minute and watching the
> situation. I have only two sockets in the configuration:
> listen = udp: 10.2.1.61: 7062
> listen = udp: ХХ.ХХ.ХХХ.XXX: 7062
> In the children parameter the value 2 is specified. But I can not understand
> why 18 processes are created at startup ?... It's interesting that only two
> of them take a role in the processing of calls, why? ... I found this out,
> because of the decrease in two processes (pkmem:4 and pkmem:5) of pkg memory
> .
> Please explain the work with pkg memory when it is released.
> I watched the server for 3 hours under load and 1 hour without, as a result,
> on two processes the free private memory (pkmem) was rectilinearly reduced.
> After testing, without restarting the server, private memory (pkgmem) is not
> released, is it the way it should be?
>
> [root@sbc sbin]# date
> Срд Июл 26 09:31:45 MSK 2017
> [root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
> [root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
> pkmem:0-total_size:: 67108864
> pkmem:0-used_size:: 66608
> pkmem:0-real_used_size:: 112560
> pkmem:0-max_used_size:: 112560
> pkmem:0-free_size:: 66996304
> pkmem:0-fragments:: 510
> pkmem:1-total_size:: 67108864
> pkmem:1-used_size:: 87128
> pkmem:1-real_used_size:: 135912
> pkmem:1-max_used_size:: 146248
> pkmem:1-free_size:: 66972952
> pkmem:1-fragments:: 526
> pkmem:2-total_size:: 67108864
> pkmem:2-used_size:: 64832
> pkmem:2-real_used_size:: 110664
> pkmem:2-max_used_size:: 110672
> pkmem:2-free_size:: 66998200
> pkmem:2-fragments:: 500
> pkmem:3-total_size:: 67108864
> pkmem:3-used_size:: 64832
> pkmem:3-real_used_size:: 110664
> pkmem:3-max_used_size:: 110672
> pkmem:3-free_size:: 66998200
> pkmem:3-fragments:: 500
> pkmem:4-total_size:: 67108864
> pkmem:4-used_size:: 1144576
> pkmem:4-real_used_size:: 2058560
> pkmem:4-max_used_size:: 2069256
> pkmem:4-free_size:: 65050304
> pkmem:4-fragments:: 36614
> pkmem:5-total_size:: 67108864
> pkmem:5-used_size:: 1381584
> pkmem:5-real_used_size:: 2495896
> pkmem:5-max_used_size:: 2506568
> pkmem:5-free_size:: 64612968
> pkmem:5-fragments:: 44959
> pkmem:6-total_size:: 67108864
> pkmem:6-used_size:: 119960
> pkmem:6-real_used_size:: 166824
> pkmem:6-max_used_size:: 173640
> pkmem:6-free_size:: 66942040
> pkmem:6-fragments:: 518
> pkmem:7-total_size:: 67108864
> pkmem:7-used_size:: 119960
> pkmem:7-real_used_size:: 166824
> pkmem:7-max_used_size:: 173808
> pkmem:7-free_size:: 66942040
> pkmem:7-fragments:: 518
> pkmem:8-total_size:: 67108864
> pkmem:8-used_size:: 119840
> pkmem:8-real_used_size:: 165912
> pkmem:8-max_used_size:: 165912
> pkmem:8-free_size:: 66942952
> pkmem:8-fragments:: 515
> pkmem:9-total_size:: 67108864
> pkmem:9-used_size:: 119840
> pkmem:9-real_used_size:: 165912
> pkmem:9-max_used_size:: 165912
> pkmem:9-free_size:: 66942952
> pkmem:9-fragments:: 515
> pkmem:10-total_size:: 67108864
> pkmem:10-used_size:: 119840
> pkmem:10-real_used_size:: 165912
> pkmem:10-max_used_size:: 165912
> pkmem:10-free_size:: 66942952
> pkmem:10-fragments:: 515
> pkmem:11-total_size:: 67108864
> pkmem:11-used_size:: 119840
> pkmem:11-real_used_size:: 165912
> pkmem:11-max_used_size:: 165912
> pkmem:11-free_size:: 66942952
> pkmem:11-fragments:: 515
> pkmem:12-total_size:: 67108864
> pkmem:12-used_size:: 119840
> pkmem:12-real_used_size:: 165912
> pkmem:12-max_used_size:: 165912
> pkmem:12-free_size:: 66942952
> pkmem:12-fragments:: 515
> pkmem:13-total_size:: 67108864
> pkmem:13-used_size:: 119840
> pkmem:13-real_used_size:: 165912
> pkmem:13-max_used_size:: 165912
> pkmem:13-free_size:: 66942952
> pkmem:13-fragments:: 515
> pkmem:14-total_size:: 67108864
> pkmem:14-used_size:: 119840
> pkmem:14-real_used_size:: 165912
> pkmem:14-max_used_size:: 165912
> pkmem:14-free_size:: 66942952
> pkmem:14-fragments:: 515
> pkmem:15-total_size:: 67108864
> pkmem:15-used_size:: 119840
> pkmem:15-real_used_size:: 165912
> pkmem:15-max_used_size:: 165912
> pkmem:15-free_size:: 66942952
> pkmem:15-fragments:: 515
> pkmem:16-total_size:: 67108864
> pkmem:16-used_size:: 119840
> pkmem:16-real_used_size:: 165912
> pkmem:16-max_used_size:: 165912
> pkmem:16-free_size:: 66942952
> pkmem:16-fragments:: 515
> pkmem:17-total_size:: 67108864
> pkmem:17-used_size:: 109904
> pkmem:17-real_used_size:: 155832
> pkmem:17-max_used_size:: 155832
> pkmem:17-free_size:: 66953032
> pkmem:17-fragments:: 504
> [root@sbc sbin]#
>
> ....
>
>
> [root@sbc sbin]# date
> Срд Июл 26 10:35:47 MSK 2017
>
> [root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
> pkmem:0-total_size:: 67108864
> pkmem:0-used_size:: 66608
> pkmem:0-real_used_size:: 112560
> pkmem:0-max_used_size:: 112560
> pkmem:0-free_size:: 66996304
> pkmem:0-fragments:: 510
> pkmem:1-total_size:: 67108864
> pkmem:1-used_size:: 87128
> pkmem:1-real_used_size:: 135912
> pkmem:1-max_used_size:: 146248
> pkmem:1-free_size:: 66972952
> pkmem:1-fragments:: 526
> pkmem:2-total_size:: 67108864
> pkmem:2-used_size:: 64832
> pkmem:2-real_used_size:: 110664
> pkmem:2-max_used_size:: 110672
> pkmem:2-free_size:: 66998200
> pkmem:2-fragments:: 500
> pkmem:3-total_size:: 67108864
> pkmem:3-used_size:: 64832
> pkmem:3-real_used_size:: 110664
> pkmem:3-max_used_size:: 110672
> pkmem:3-free_size:: 66998200
> pkmem:3-fragments:: 500
> pkmem:4-total_size:: 67108864
> pkmem:4-used_size:: 2786296
> pkmem:4-real_used_size:: 5088608
> pkmem:4-max_used_size:: 5099248
> pkmem:4-free_size:: 62020256
> pkmem:4-fragments:: 94460
> pkmem:5-total_size:: 67108864
> pkmem:5-used_size:: 3334952
> pkmem:5-real_used_size:: 6101784
> pkmem:5-max_used_size:: 6112384
> pkmem:5-free_size:: 61007080
> pkmem:5-fragments:: 113815
> pkmem:6-total_size:: 67108864
> pkmem:6-used_size:: 120008
> pkmem:6-real_used_size:: 167496
> pkmem:6-max_used_size:: 175304
> pkmem:6-free_size:: 66941368
> pkmem:6-fragments:: 519
> pkmem:7-total_size:: 67108864
> pkmem:7-used_size:: 120000
> pkmem:7-real_used_size:: 167584
> pkmem:7-max_used_size:: 175240
> pkmem:7-free_size:: 66941280
> pkmem:7-fragments:: 519
> pkmem:8-total_size:: 67108864
> pkmem:8-used_size:: 119880
> pkmem:8-real_used_size:: 165976
> pkmem:8-max_used_size:: 165976
> pkmem:8-free_size:: 66942888
> pkmem:8-fragments:: 516
> pkmem:9-total_size:: 67108864
> pkmem:9-used_size:: 119952
> pkmem:9-real_used_size:: 166288
> pkmem:9-max_used_size:: 167024
> pkmem:9-free_size:: 66942576
> pkmem:9-fragments:: 518
> pkmem:10-total_size:: 67108864
> pkmem:10-used_size:: 119880
> pkmem:10-real_used_size:: 165976
> pkmem:10-max_used_size:: 165976
> pkmem:10-free_size:: 66942888
> pkmem:10-fragments:: 516
> pkmem:11-total_size:: 67108864
> pkmem:11-used_size:: 119880
> pkmem:11-real_used_size:: 165976
> pkmem:11-max_used_size:: 165976
> pkmem:11-free_size:: 66942888
> pkmem:11-fragments:: 516
> pkmem:12-total_size:: 67108864
> pkmem:12-used_size:: 119880
> pkmem:12-real_used_size:: 165976
> pkmem:12-max_used_size:: 165976
> pkmem:12-free_size:: 66942888
> pkmem:12-fragments:: 516
> pkmem:13-total_size:: 67108864
> pkmem:13-used_size:: 119952
> pkmem:13-real_used_size:: 166288
> pkmem:13-max_used_size:: 167024
> pkmem:13-free_size:: 66942576
> pkmem:13-fragments:: 518
> pkmem:14-total_size:: 67108864
> pkmem:14-used_size:: 119952
> pkmem:14-real_used_size:: 166288
> pkmem:14-max_used_size:: 167024
> pkmem:14-free_size:: 66942576
> pkmem:14-fragments:: 518
> pkmem:15-total_size:: 67108864
> pkmem:15-used_size:: 119880
> pkmem:15-real_used_size:: 165976
> pkmem:15-max_used_size:: 165976
> pkmem:15-free_size:: 66942888
> pkmem:15-fragments:: 516
> pkmem:16-total_size:: 67108864
> pkmem:16-used_size:: 119880
> pkmem:16-real_used_size:: 165976
> pkmem:16-max_used_size:: 165976
> pkmem:16-free_size:: 66942888
> pkmem:16-fragments:: 516
> pkmem:17-total_size:: 67108864
> pkmem:17-used_size:: 109904
> pkmem:17-real_used_size:: 155832
> pkmem:17-max_used_size:: 155832
> pkmem:17-free_size:: 66953032
> pkmem:17-fragments:: 504
>
> ....
>
> [root@sbc sbin]# date
> Срд Июл 26 11:08:37 MSK 2017
> [root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
> pkmem:0-total_size:: 67108864
> pkmem:0-used_size:: 66608
> pkmem:0-real_used_size:: 112560
> pkmem:0-max_used_size:: 112560
> pkmem:0-free_size:: 66996304
> pkmem:0-fragments:: 510
> pkmem:1-total_size:: 67108864
> pkmem:1-used_size:: 87128
> pkmem:1-real_used_size:: 135912
> pkmem:1-max_used_size:: 146248
> pkmem:1-free_size:: 66972952
> pkmem:1-fragments:: 526
> pkmem:2-total_size:: 67108864
> pkmem:2-used_size:: 64832
> pkmem:2-real_used_size:: 110664
> pkmem:2-max_used_size:: 110672
> pkmem:2-free_size:: 66998200
> pkmem:2-fragments:: 500
> pkmem:3-total_size:: 67108864
> pkmem:3-used_size:: 64832
> pkmem:3-real_used_size:: 110664
> pkmem:3-max_used_size:: 110672
> pkmem:3-free_size:: 66998200
> pkmem:3-fragments:: 500
> pkmem:4-total_size:: 67108864
> pkmem:4-used_size:: 4144936
> pkmem:4-real_used_size:: 7595432
> pkmem:4-max_used_size:: 7606080
> pkmem:4-free_size:: 59513432
> pkmem:4-fragments:: 142300
> pkmem:5-total_size:: 67108864
> pkmem:5-used_size:: 4946520
> pkmem:5-real_used_size:: 9075448
> pkmem:5-max_used_size:: 9086080
> pkmem:5-free_size:: 58033416
> pkmem:5-fragments:: 170570
> pkmem:6-total_size:: 67108864
> pkmem:6-used_size:: 120008
> pkmem:6-real_used_size:: 167496
> pkmem:6-max_used_size:: 175304
> pkmem:6-free_size:: 66941368
> pkmem:6-fragments:: 519
> pkmem:7-total_size:: 67108864
> pkmem:7-used_size:: 120000
> pkmem:7-real_used_size:: 167584
> pkmem:7-max_used_size:: 175272
> pkmem:7-free_size:: 66941280
> pkmem:7-fragments:: 520
> pkmem:8-total_size:: 67108864
> pkmem:8-used_size:: 119880
> pkmem:8-real_used_size:: 165976
> pkmem:8-max_used_size:: 165976
> pkmem:8-free_size:: 66942888
> pkmem:8-fragments:: 516
> pkmem:9-total_size:: 67108864
> pkmem:9-used_size:: 119952
> pkmem:9-real_used_size:: 166288
> pkmem:9-max_used_size:: 167024
> pkmem:9-free_size:: 66942576
> pkmem:9-fragments:: 518
> pkmem:10-total_size:: 67108864
> pkmem:10-used_size:: 119880
> pkmem:10-real_used_size:: 165976
> pkmem:10-max_used_size:: 165976
> pkmem:10-free_size:: 66942888
> pkmem:10-fragments:: 516
> pkmem:11-total_size:: 67108864
> pkmem:11-used_size:: 119880
> pkmem:11-real_used_size:: 165976
> pkmem:11-max_used_size:: 165976
> pkmem:11-free_size:: 66942888
> pkmem:11-fragments:: 516
> pkmem:12-total_size:: 67108864
> pkmem:12-used_size:: 119880
> pkmem:12-real_used_size:: 165976
> pkmem:12-max_used_size:: 165976
> pkmem:12-free_size:: 66942888
> pkmem:12-fragments:: 516
> pkmem:13-total_size:: 67108864
> pkmem:13-used_size:: 119952
> pkmem:13-real_used_size:: 166288
> pkmem:13-max_used_size:: 167024
> pkmem:13-free_size:: 66942576
> pkmem:13-fragments:: 518
> pkmem:14-total_size:: 67108864
> pkmem:14-used_size:: 119952
> pkmem:14-real_used_size:: 166288
> pkmem:14-max_used_size:: 167024
> pkmem:14-free_size:: 66942576
> pkmem:14-fragments:: 518
> pkmem:15-total_size:: 67108864
> pkmem:15-used_size:: 119880
> pkmem:15-real_used_size:: 165976
> pkmem:15-max_used_size:: 165976
> pkmem:15-free_size:: 66942888
> pkmem:15-fragments:: 516
> pkmem:16-total_size:: 67108864
> pkmem:16-used_size:: 119880
> pkmem:16-real_used_size:: 165976
> pkmem:16-max_used_size:: 165976
> pkmem:16-free_size:: 66942888
> pkmem:16-fragments:: 516
> pkmem:17-total_size:: 67108864
> pkmem:17-used_size:: 109904
> pkmem:17-real_used_size:: 155832
> pkmem:17-max_used_size:: 155832
> pkmem:17-free_size:: 66953032
> pkmem:17-fragments:: 504
> [root@sbc sbin]#
>
> ...
> After testing, without restarting the service.
>
> [root@sbc sbin]# date
> Срд Июл 26 12:09:01 MSK 2017
> [root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
> pkmem:0-total_size:: 67108864
> pkmem:0-used_size:: 66608
> pkmem:0-real_used_size:: 112560
> pkmem:0-max_used_size:: 112560
> pkmem:0-free_size:: 66996304
> pkmem:0-fragments:: 510
> pkmem:1-total_size:: 67108864
> pkmem:1-used_size:: 87128
> pkmem:1-real_used_size:: 135912
> pkmem:1-max_used_size:: 146248
> pkmem:1-free_size:: 66972952
> pkmem:1-fragments:: 526
> pkmem:2-total_size:: 67108864
> pkmem:2-used_size:: 64832
> pkmem:2-real_used_size:: 110664
> pkmem:2-max_used_size:: 110672
> pkmem:2-free_size:: 66998200
> pkmem:2-fragments:: 500
> pkmem:3-total_size:: 67108864
> pkmem:3-used_size:: 64832
> pkmem:3-real_used_size:: 110664
> pkmem:3-max_used_size:: 110672
> pkmem:3-free_size:: 66998200
> pkmem:3-fragments:: 500
> pkmem:4-total_size:: 67108864
> pkmem:4-used_size:: 6444664
> pkmem:4-real_used_size:: 11838512
> pkmem:4-max_used_size:: 11849192
> pkmem:4-free_size:: 55270352
> pkmem:4-fragments:: 223275
> pkmem:5-total_size:: 67108864
> pkmem:5-used_size:: 7769568
> pkmem:5-real_used_size:: 14284264
> pkmem:5-max_used_size:: 14294848
> pkmem:5-free_size:: 52824600
> pkmem:5-fragments:: 269975
> pkmem:6-total_size:: 67108864
> pkmem:6-used_size:: 120000
> pkmem:6-real_used_size:: 167512
> pkmem:6-max_used_size:: 175336
> pkmem:6-free_size:: 66941352
> pkmem:6-fragments:: 520
> pkmem:7-total_size:: 67108864
> pkmem:7-used_size:: 120000
> pkmem:7-real_used_size:: 167584
> pkmem:7-max_used_size:: 175272
> pkmem:7-free_size:: 66941280
> pkmem:7-fragments:: 520
> pkmem:8-total_size:: 67108864
> pkmem:8-used_size:: 119880
> pkmem:8-real_used_size:: 165976
> pkmem:8-max_used_size:: 165976
> pkmem:8-free_size:: 66942888
> pkmem:8-fragments:: 516
> pkmem:9-total_size:: 67108864
> pkmem:9-used_size:: 119952
> pkmem:9-real_used_size:: 166288
> pkmem:9-max_used_size:: 167024
> pkmem:9-free_size:: 66942576
> pkmem:9-fragments:: 518
> pkmem:10-total_size:: 67108864
> pkmem:10-used_size:: 119880
> pkmem:10-real_used_size:: 165976
> pkmem:10-max_used_size:: 165976
> pkmem:10-free_size:: 66942888
> pkmem:10-fragments:: 516
> pkmem:11-total_size:: 67108864
> pkmem:11-used_size:: 119880
> pkmem:11-real_used_size:: 165976
> pkmem:11-max_used_size:: 165976
> pkmem:11-free_size:: 66942888
> pkmem:11-fragments:: 516
> pkmem:12-total_size:: 67108864
> pkmem:12-used_size:: 119880
> pkmem:12-real_used_size:: 165976
> pkmem:12-max_used_size:: 165976
> pkmem:12-free_size:: 66942888
> pkmem:12-fragments:: 516
> pkmem:13-total_size:: 67108864
> pkmem:13-used_size:: 119952
> pkmem:13-real_used_size:: 166288
> pkmem:13-max_used_size:: 167024
> pkmem:13-free_size:: 66942576
> pkmem:13-fragments:: 518
> pkmem:14-total_size:: 67108864
> pkmem:14-used_size:: 119952
> pkmem:14-real_used_size:: 166288
> pkmem:14-max_used_size:: 167024
> pkmem:14-free_size:: 66942576
> pkmem:14-fragments:: 518
> pkmem:15-total_size:: 67108864
> pkmem:15-used_size:: 119880
> pkmem:15-real_used_size:: 165976
> pkmem:15-max_used_size:: 165976
> pkmem:15-free_size:: 66942888
> pkmem:15-fragments:: 516
> pkmem:16-total_size:: 67108864
> pkmem:16-used_size:: 119880
> pkmem:16-real_used_size:: 165976
> pkmem:16-max_used_size:: 165976
> pkmem:16-free_size:: 66942888
> pkmem:16-fragments:: 516
> pkmem:17-total_size:: 67108864
> pkmem:17-used_size:: 109904
> pkmem:17-real_used_size:: 155832
> pkmem:17-max_used_size:: 155832
> pkmem:17-free_size:: 66953032
> pkmem:17-fragments:: 504
> [root@sbc sbin]#
>
> ...
>
> Hour without load.
>
> [root@sbc sbin]# date
> Срд Июл 26 12:54:14 MSK 2017
> [root@sbc sbin]#
> [root@sbc sbin]# ./opensipsctl fifo get_statistics pkmem:
> pkmem:0-total_size:: 67108864
> pkmem:0-used_size:: 66608
> pkmem:0-real_used_size:: 112560
> pkmem:0-max_used_size:: 112560
> pkmem:0-free_size:: 66996304
> pkmem:0-fragments:: 510
> pkmem:1-total_size:: 67108864
> pkmem:1-used_size:: 87128
> pkmem:1-real_used_size:: 135912
> pkmem:1-max_used_size:: 146248
> pkmem:1-free_size:: 66972952
> pkmem:1-fragments:: 526
> pkmem:2-total_size:: 67108864
> pkmem:2-used_size:: 64832
> pkmem:2-real_used_size:: 110664
> pkmem:2-max_used_size:: 110672
> pkmem:2-free_size:: 66998200
> pkmem:2-fragments:: 500
> pkmem:3-total_size:: 67108864
> pkmem:3-used_size:: 64832
> pkmem:3-real_used_size:: 110664
> pkmem:3-max_used_size:: 110672
> pkmem:3-free_size:: 66998200
> pkmem:3-fragments:: 500
> pkmem:4-total_size:: 67108864
> pkmem:4-used_size:: 6444664
> pkmem:4-real_used_size:: 11838512
> pkmem:4-max_used_size:: 11849192
> pkmem:4-free_size:: 55270352
> pkmem:4-fragments:: 223275
> pkmem:5-total_size:: 67108864
> pkmem:5-used_size:: 7769568
> pkmem:5-real_used_size:: 14284264
> pkmem:5-max_used_size:: 14294848
> pkmem:5-free_size:: 52824600
> pkmem:5-fragments:: 269975
> pkmem:6-total_size:: 67108864
> pkmem:6-used_size:: 120000
> pkmem:6-real_used_size:: 167512
> pkmem:6-max_used_size:: 175336
> pkmem:6-free_size:: 66941352
> pkmem:6-fragments:: 520
> pkmem:7-total_size:: 67108864
> pkmem:7-used_size:: 120000
> pkmem:7-real_used_size:: 167584
> pkmem:7-max_used_size:: 175272
> pkmem:7-free_size:: 66941280
> pkmem:7-fragments:: 520
> pkmem:8-total_size:: 67108864
> pkmem:8-used_size:: 119880
> pkmem:8-real_used_size:: 165976
> pkmem:8-max_used_size:: 165976
> pkmem:8-free_size:: 66942888
> pkmem:8-fragments:: 516
> pkmem:9-total_size:: 67108864
> pkmem:9-used_size:: 119952
> pkmem:9-real_used_size:: 166288
> pkmem:9-max_used_size:: 167024
> pkmem:9-free_size:: 66942576
> pkmem:9-fragments:: 518
> pkmem:10-total_size:: 67108864
> pkmem:10-used_size:: 119880
> pkmem:10-real_used_size:: 165976
> pkmem:10-max_used_size:: 165976
> pkmem:10-free_size:: 66942888
> pkmem:10-fragments:: 516
> pkmem:11-total_size:: 67108864
> pkmem:11-used_size:: 119880
> pkmem:11-real_used_size:: 165976
> pkmem:11-max_used_size:: 165976
> pkmem:11-free_size:: 66942888
> pkmem:11-fragments:: 516
> pkmem:12-total_size:: 67108864
> pkmem:12-used_size:: 119880
> pkmem:12-real_used_size:: 165976
> pkmem:12-max_used_size:: 165976
> pkmem:12-free_size:: 66942888
> pkmem:12-fragments:: 516
> pkmem:13-total_size:: 67108864
> pkmem:13-used_size:: 119952
> pkmem:13-real_used_size:: 166288
> pkmem:13-max_used_size:: 167024
> pkmem:13-free_size:: 66942576
> pkmem:13-fragments:: 518
> pkmem:14-total_size:: 67108864
> pkmem:14-used_size:: 119952
> pkmem:14-real_used_size:: 166288
> pkmem:14-max_used_size:: 167024
> pkmem:14-free_size:: 66942576
> pkmem:14-fragments:: 518
> pkmem:15-total_size:: 67108864
> pkmem:15-used_size:: 119880
> pkmem:15-real_used_size:: 165976
> pkmem:15-max_used_size:: 165976
> pkmem:15-free_size:: 66942888
> pkmem:15-fragments:: 516
> pkmem:16-total_size:: 67108864
> pkmem:16-used_size:: 119880
> pkmem:16-real_used_size:: 165976
> pkmem:16-max_used_size:: 165976
> pkmem:16-free_size:: 66942888
> pkmem:16-fragments:: 516
> pkmem:17-total_size:: 67108864
> pkmem:17-used_size:: 109904
> pkmem:17-real_used_size:: 155832
> pkmem:17-max_used_size:: 155832
> pkmem:17-free_size:: 66953032
> pkmem:17-fragments:: 504
> [root@sbc sbin]#
>
>
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Does-not-release-shared-memory-tp7608065p7608135.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



If you reply to this email, your message will be added to the discussion below:
http://opensips-open-sip-server.1449251.n2.nabble.com/Does-not-release-shared-memory-tp7608065p7608137.html
To unsubscribe from Does not release shared memory, click here.
NAML

Loading...