Things to optimize - performance
deputinizer opened this issue ยท 10 comments
for getNextPacket
: have you tried setting StaticPacket
to true in the config? should work on tcp/udp jobs as well as they just forward that argument to packetgen
Well I'm using the default config.
https://github.com/db1000n-coordinators/LoadTestConfig/blob/e3ed4702c7d19347668ac5842d058172b596c329/config.v0.7.json#L435
There's no StaticPacket
there
I'm not sure you can optimize other two without defeating their purpose completely. The only other thing that could be done is porting that StaticPacket thing to http flood to enable sending more traffic when no variablility is needed
Well there should be something faster, maybe:
- just pure
function
andarg
(random_payload 10
) - JIT - just in time compiled template? Is there anything in go?
Because compiling config is a no-go? ๐
https://github.com/valyala/quicktemplate
pure function
and arg
could work, but it would make the config even more bloated and I'm not completely sure it would be much faster, especially compared to static
version which parses templates only once when new config is received. Also current implementation is already not that bad - in go you have separate Parse
and Execute
functions for templates where Parse
takes significantly more resources than Execute
. I don't think it's the most effective implementation but it does its job quite well
There's no StaticPacket there
Yeah, updating all the admin processes takes some time
hmm, having thought about it more, with current usage it might be easier to switch the code to use static by default and dynamic would have to be specified explicitly
it won't affect memory usage but the CPU profile should get a lot better