News for hackers. Stuff that matters.
Re:Ponos – A simple yet powerful load generator in Erlang by rdtsc on Monday November 17, 2014 @10:44AM (#8618661)
To continue with the languages pun, in Russian it means something like "diarrhea", which, strangely also kind of makes sense, ... in a toilet humor kind of disgusting way.

I think it is a good name.

To add though, this is a cool idea. I like it generates an internal-kind of load. Not necessarily driven from external requests. So this combined with tsung to test how the system behaves in various scenarios.

Operating under load is not something many people test. Search Erlang Factor talks and you'll find many talks by Erlang experts on load monitoring, load shedding and so on basically characterizing behaviour during overload conditions.

Re:Ponos – A simple yet powerful load generator in Erlang by jtmoulia on Monday November 17, 2014 @11:21AM (#8618836)
I'd love to use this to test my application, but after reading through the docs, I'm not quite sure how to get the setup I'd like:

My application is a server which clients login and then issue commands to. As I'm imagining it, a user load generator would be creating and logging in users. But this is where I get fuzzy... should the user task also create a load generator which issues commands against the application as that user? Seems pretty simple, hopefully it's possible !

Excited to try this out.

Re:Ponos – A simple yet powerful load generator in Erlang by jool on Monday November 17, 2014 @11:31AM (#8618892)
Where ponos is at currently its main purpose in the world is specialise in generating simple or complex load patterns.

A load_generator in essence is just a process generating triggers at requested frequency. Every trigger happens asynchronously so there is no way to thread state between triggers.

If there is enough interest I'd be happy to extend it to handle synchronous load generators where threading state makes sense. With that use case though, it'd be impossible to guarantee that the actual load matches the load_spec in all circumstances.

If you wish to keep state between triggers you have to implement this outside of ponos at this stage.

Re:Ponos – A simple yet powerful load generator in Erlang by jool on Monday November 17, 2014 @11:40AM (#8618950)
For your particular use case though I'd just login and pass the user information as part of the task. The load_generator would then not be concerned about logging in but only issuing commands.
Re:Ponos – A simple yet powerful load generator in Erlang by jtmoulia on Monday November 17, 2014 @11:53AM (#8619029)
In that case, would the caller be responsible for ramping up the number of users?
Re:Ponos – A simple yet powerful load generator in Erlang by odo on Tuesday November 18, 2014 @05:16AM (#8623241)
I am also interested in load testing stateful sessions e.g. log in, wait, do stuff, wait, log out. Using ponos this could be done by spawning a (gen_server-) process in the task which runs the session and then terminates. In this scenario the load function would model the arrival rate of the users.
Re:Ponos – A simple yet powerful load generator in Erlang by jool on Tuesday November 18, 2014 @05:34AM (#8623302)
Sure thing. I guess you could even spawn a task that generates new load_generators. In that scenario I guess it could be useful to have the possibility to configure a load generator that terminates after the call_counter reaches a threshold.
Re:Ponos – A simple yet powerful load generator in Erlang by odo on Tuesday November 18, 2014 @08:13AM (#8623707)
Replying to my own post here, this is an example: https://gist.github.com/odo/6c59f604fda6390d034a
Re:Ponos – A simple yet powerful load generator in Erlang by jtmoulia on Monday November 17, 2014 @11:51AM (#8619019)
Thanks for the explanation!

Not the most flexible solution, but if you want the load spec to be authoritative you could allow it to recursively specify a different load generator rather than a task_runner. Instead of running a task, it would start a new load generator.

... hope I got some of the terminology right.

Re:Ponos – A simple yet powerful load generator in Erlang by jool on Monday November 17, 2014 @12:56PM (#8619388)
I've put together a really trivial example here (in semi-pseudo code): https://gist.github.com/jool/1e83b22fec9d948194a4.

In the example I've modeled each of your uses as a load generator. So you would have to add one load generator per user. Let me know if you have any questions.

Re:Ponos – A simple yet powerful load generator in Erlang by jtmoulia on Wednesday November 19, 2014 @08:20PM (#8633859)
Thank you for this! I'll be trying it out in about a month, and I'll let you know hos it goes.
Re:Ponos – A simple yet powerful load generator in Erlang by jool on Monday November 17, 2014 @12:01PM (#8619068)
So. What you could do is implement your own task_runner.

For instance, if you wish to represent each user as a load generator, your task_runner's state could store each load generator's user information in the state indexed by name.

You would then log in the user during the init state.

I'm on the subway but I'll describe it more in detail when I get home.

Re:Ponos – A simple yet powerful load generator in Erlang by danatkinson on Monday November 17, 2014 @10:21AM (#8618540)
I think it's probably from Greek mythology. Ponos was the God of hard labour - https://en.wikipedia.org/wiki/Ponos
Re:Ponos – A simple yet powerful load generator in Erlang by danatkinson on Monday November 17, 2014 @10:22AM (#8618546)
Actually, it is. It's in the readme on the first line! :)
Re:Ponos – A simple yet powerful load generator in Erlang by hymloth on Monday November 17, 2014 @02:21PM (#8619906)
Ponos in modern Greek means "pain".
Re:Ponos – A simple yet powerful load generator in Erlang by ivanche on Monday November 17, 2014 @10:18AM (#8618521)
Just a comment on name - in Serbian "ponos" means "pride". So I guess author should be proud of his work :)
Re:Ponos – A simple yet powerful load generator in Erlang by kovrik on Monday November 17, 2014 @10:35AM (#8618609)
And in Russian "ponos" means "diarrhea" :(
Re:Ponos – A simple yet powerful load generator in Erlang by jool on Monday November 17, 2014 @10:47AM (#8618679)
Something the author (me) is aware of. See the Notes section of the README (https://github.com/klarna/ponos#ref1).

The original name is based on the Greek god of hard labor and toil (http://en.wikipedia.org/wiki/Ponos).

Re:Ponos – A simple yet powerful load generator in Erlang by valanto on Monday November 17, 2014 @10:58AM (#8618727)
Ponos in grid besides being the god of Hard Labour also means pain itself in modern greek
Re:Ponos – A simple yet powerful load generator in Erlang by LLWM on Monday November 17, 2014 @02:02PM (#8619799)
Put your.. that! Y.. your load generator! To my.. my... HERE! My application! And j.. j.. JAM IT IN!