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

hostlist: perf issue in hostlist_find_host() due to hostname_create() #5987

Closed
grondo opened this issue May 17, 2024 · 2 comments
Closed

hostlist: perf issue in hostlist_find_host() due to hostname_create() #5987

grondo opened this issue May 17, 2024 · 2 comments

Comments

@grondo
Copy link
Contributor

grondo commented May 17, 2024

@trws noted in some perf benchmarking of Fluxion that hostlist_find_host() and specifically hostname_create() was taking a large percentage of time due mainly to the calloc(3) used in creating the struct hostname used for matching purposes.

Consider a strategy that doesn't require memory allocation to speed up repeated use of hostlist_find_host()

@trws
Copy link
Member

trws commented May 17, 2024

Thanks for filing this @grondo! To add a bit of context, here's a slice of the perf output from the updated version of sched:

image

Overall it looks like hostlist ends up spending a good amount of time on allocations, and on repeatedly calculating lengths. Did we ever end up with a lib for string-with-length-and-capacity? It occurs to me because I'm working with the one git is using to fix the archive bug over there, and something like that would squash a lot of this and probably other similar things if we could easily pass those around.

@grondo
Copy link
Contributor Author

grondo commented Sep 18, 2024

I think this was addressed by #6259

@grondo grondo closed this as completed Sep 18, 2024
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

No branches or pull requests

2 participants