Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kex: Call pkg_proc_update_stats only when needed #567

Closed
wants to merge 1 commit into from

Conversation

smititelu
Copy link
Contributor

I created a patch for 4.1 which allows to display also the total number of pkg fragments upon calling kamcmd pkg.stats, inspiring myself from the latest upstream. This PR comes as a result to enabling MALLOC_STATS and noticing kamailio slowdown with my applied patch, for 4.1. The slowdown was happening because each time a memory function was called, iteration through all fragments happened upon pkg_info. The solution was to call the stats gathering only when kamcmd command is issued.

On master this slowdown is not happening anymore, because qm->ffrags variable counts the fragments "on the fly", while memory functions are called. Still, is it necessarily to call pkg_proc_update_stats() callback every time?!

Feel free to close this if not needed.

Call pkg_proc_update_stats only when pkg.stats command is issued, not every
time something happens to the memory.
@miconda
Copy link
Member

miconda commented Apr 14, 2016

I doesn't look ok, because the stats will be built only for rpc process, not for all kamailio processes.

Iirc, the pkg stats were refactored because they were initially slow, but probably not available in 4.1. Anyhow, this solution doesn't seem ok, either a full backport or some other solution if you want to push something to 4.1.

@smititelu
Copy link
Contributor Author

Thanks for making it clear for me. Closing this for now.

@smititelu smititelu closed this Apr 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants