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

Metrics with pm2 cluster #89

Open
mrspartak opened this issue May 8, 2017 · 3 comments
Open

Metrics with pm2 cluster #89

mrspartak opened this issue May 8, 2017 · 3 comments

Comments

@mrspartak
Copy link

So after switching from fork to cluster metrics works incorrectly (rps for example gone from 10 to 1.4 in 8 clusters), how to solve that? It's inccorect just to multiply by 8 I think.

@vmarchaud
Copy link
Contributor

Each worker in the cluster mode behave like a standalone process so there are no reason switching to fork -> cluster change something, i guess you had more requests when you checked the probe.

@TheFoot
Copy link

TheFoot commented Mar 28, 2019

I have exactly the same issue - I'm running a stable load test using jMeter, and the reported RPS drops by almost the number of processes:

1 Process:
PMX: 450-500 RPS
jMeter 450-510 responses per second

4 Processes
PMX: 150-160 RPS
jMeter: 500-600 responses per second

Average request time is ~30-40ms - so I don;t think this should affect that I'm comparing requests per second (PMX) against responses received per second (jMeter)

My custom metric code:

const meter = probe.meter ( {
	name     : 'RPS',
	samples  : 1,
	timeframe: 1
} );
module.exports = ( req, res, next ) => {
	meter.mark ();
	next ();
};

It is almost like the metrics are being aggregated per process.. although I have no idea which process's metric is being reported back by PMX.

@TheFoot
Copy link

TheFoot commented Mar 29, 2019

My issue is my mistake - I am not accumulating the metrics from each process when reading the report back from PMX..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants