Closed mcginty closed 8 years ago
Sorry, that profile screenie was with the system allocator. I did it again with rust's jemalloc, it seems to lead to a more clear profile in this case at least.
Have you updated to udt-rs 0.2.0 yet? I'm curious if things are any different now that we're using the new recv API you suggested
Yeah I have - this bug report was pre-0.2. I haven't run much extensive memory analysis on shoop after 0.2 but I know it's much lower. I think the biggest problem is now sodiumoxide doing the same thing, where it's allocating new Vec
I noticed that shoop was using a lot of CPU even in relatively low-bandwidth situations, so I ran it through valgrind and Instruments. I definitely do some excess allocations in shoop, but it looks like UDT has a lot of allocation and memory thrash. My first guess is just that recvmsg allocates a new
Vec
for every call instead of accepting a&mut [u8]
argument.Vangrind heap summary for a shoop transfer of a 5.7MB file.
Instruments profiling info:
Again, the valgrind info especially is probably not that useful because I think I'm doing a lot of excess allocation in shoop too, but hopefully the profiler info is useful.