tsung icon indicating copy to clipboard operation
tsung copied to clipboard

Add local_file_server

Open tisba opened this issue 8 years ago • 8 comments
trafficstars

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>

tisba avatar Apr 24 '17 18:04 tisba

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.

tisba avatar Nov 01 '17 14:11 tisba

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

nniclausse avatar Nov 20 '17 22:11 nniclausse

Great!

I've changed the base branch to develop.

tisba avatar Nov 22 '17 09:11 tisba

This is an awesome patch, hope to see it merged soon !

rodo avatar Nov 25 '17 17:11 rodo

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.

tisba avatar Feb 26 '18 09:02 tisba

Hi. Not yet unfortunately. Hopefully, i'll have some free time next week to do Pull Requests reviews and merge !

nniclausse avatar Feb 26 '18 21:02 nniclausse

OK, i did a quick review and that seems OK for me. The only missing part is the documentation

nniclausse avatar Jul 25 '18 21:07 nniclausse

Okay, nice! I'll write something up so that we can get this out too.

tisba avatar Jul 26 '18 05:07 tisba