tsung
tsung copied to clipboard
Add local_file_server
local_file_server is an alternative to the current file_server. It will distribute given files on start to all nodes and returns lines on request local to the requestor. This removes a severe bottleneck in tsung because there is now one gen_server per worker and per file. With file_server everything has to go though the controller which does not scale at all.
local_file_server works almost the same was the normal file_server. For obvious reasons (no global coordination), no global sequential access is possible.
Usage
local_file_server definition:
<options>
<option name="local_file_server" id="users" value="/home/foo/.tsung/users.csv"/>
</options>
Accessing the local_file_server; Note that there is no support for order as sequential order cannot be guaranteed to the distributed nature of the local_file_server.
<setdynvars sourcetype="local_file" fileid="users" delimiter=";">
<var name="username" />
<var name="password" />
</setdynvars>
Took a bit longer to finalise this change. Do you mind to take a look @nniclausse? I'm a bit unhappy about the very similar code for the distributed vs non-distributed initialisation, but maybe you have a good idea how to make this better.
Hi ! thanks, i'll try to review this PR soon. Btw, i'm using git flow now, so the default branch is 'develop' and the master is only used for new releases. It should be easier to publish hotfix releases while new features are included in develop
Great!
I've changed the base branch to develop.
This is an awesome patch, hope to see it merged soon !
Hey @nniclausse! Did you get a chance to take a look at this change set?
We've been using this for a while now, while it increases the start up time a bit and also memory usage, it has proven to work very well for for higher load scenarios when there is a lot of access to file servers.
Hi. Not yet unfortunately. Hopefully, i'll have some free time next week to do Pull Requests reviews and merge !
OK, i did a quick review and that seems OK for me. The only missing part is the documentation
Okay, nice! I'll write something up so that we can get this out too.