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

Add local_file_server #237

Merged
merged 1 commit into from Feb 26, 2023
Merged

Conversation

tisba
Copy link
Collaborator

@tisba tisba commented Apr 24, 2017

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
Copy link
Collaborator Author

tisba commented Nov 1, 2017

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.

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 tsung global
bottleneck because there is now one gen_server per worker and per
file.
@nniclausse
Copy link
Contributor

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

@tisba tisba changed the base branch from master to develop November 22, 2017 09:38
@tisba
Copy link
Collaborator Author

tisba commented Nov 22, 2017

Great!

I've changed the base branch to develop.

@rodo
Copy link
Contributor

rodo commented Nov 25, 2017

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

@tisba
Copy link
Collaborator Author

tisba commented Feb 26, 2018

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.

@nniclausse
Copy link
Contributor

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

@nniclausse
Copy link
Contributor

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

@tisba
Copy link
Collaborator Author

tisba commented Jul 26, 2018

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

@tisba tisba added this to the 1.8.0 milestone Jul 26, 2018
@tisba tisba self-assigned this Jul 26, 2018
@nniclausse nniclausse merged commit 19c3322 into processone:develop Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants