You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Nitan Kainth <ni...@bamlabs.com> on 2017/07/25 18:01:19 UTC
read/write request counts and write size of each write
Hi,
We are trying to figure our highest read/write operations/second in our 9x9 cluster. I checked node tool tablestats but it shows from the time of start of node. I would like to see by second.
Also, how can i find out size of each right request?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
For additional commands, e-mail: user-help@cassandra.apache.org
Re: read/write request counts and write size of each write
Posted by Lerh Chuan Low <le...@instaclustr.com>.
Nitan,
I'm not really familiar with jmxterm but the error it's returning to you is
because that MBean doesn't exist. The full MBean matching your example is
org.apache.cassandra.metrics:type=ClientRequest,scope=CASWrite,name=MutationSizeHistogram.
You can then call the operation values on it to get the current snapshot of
metrics.
run -b
org.apache.cassandra.metrics:type=ClientRequest,scope=CASWrite,name=MutationSizeHistogram
values
Alternatively you can use 'get' to get an attribute instead of perform an
operation:
get -b
org.apache.cassandra.metrics:type=ClientRequest,scope=CASWrite,name=MutationSizeHistogram
Count
And instead of Count you can use 50thPercentile/75thPercentile etc as
mentioned in http://cassandra.apache.org/doc/latest/operating/metrics.html
(It's a Timer).
As Kurt mentioned, there are existing solutions to the JMX calls for you
(Graphana, Datadog....). Hope that helps.
On 27 July 2017 at 07:07, Roger Warner <rw...@pandora.com> wrote:
> I think that is not the correct lib directory. You want it under
> $CASSANDRA_HOME/lib. Ie wherever you deployed cassandra distro into / lib
>
>
>
> That directory should be loaded with *.jar files. That is the directory
> you want.
>
>
>
> Roger
>
>
>
> *From: *Nitan Kainth <ni...@bamlabs.com>
> *Reply-To: *"user@cassandra.apache.org" <us...@cassandra.apache.org>
> *Date: *Wednesday, July 26, 2017 at 1:42 PM
> *To: *"user@cassandra.apache.org" <us...@cassandra.apache.org>
>
> *Subject: *Re: read/write request counts and write size of each write
>
>
>
> Hey Roger,
>
>
>
> I downloaded and saved the file in /var/lib/cassandra, but getting same
> error:
>
>
>
> java -jar /tmp/jmxterm-1.0-alpha-4-uber.jar --url localhost:7199
>
> Welcome to JMX terminal. Type "help" for available commands.
>
> $>run -b org.apache.cassandra.metrics:type=ClientRequest scope=CASWrite
> name=MutationSizeHistogram
>
> #InstanceNotFoundException: org.apache.cassandra.metrics:
> type=ClientRequest
>
>
>
> I tried using mx4 jar file:
>
>
>
> java -jar /var/lib/cassandra/mx4j-3.0.1.jar url localhost:7199
>
> no main manifest attribute, in /var/lib/cassandra/mx4j-3.0.1.jar
>
>
>
>
>
>
>
> On Jul 26, 2017, at 11:50 AM, Roger Warner <rw...@pandora.com> wrote:
>
>
>
> You need to also have the mx4j jar in your Cassandra lib directory.
> Double checking you did that – its not included with the distro. You
> have to download it.
>
>
>
> http://mx4j.sourceforge.net/
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__mx4j.sourceforge.net_&d=DwMFaQ&c=gFTBenQ7Vj71sUi1A4CkFnmPzqwDo07QsHw-JRepxyw&r=_V9IzBxaV864n6VoHCzfArKKHY9Xqk-DWw-wAB9JU7E&m=rd2FJwCKPP5z8NHhUlnT38ZikdsXjyW01dIzgTpVNZI&s=ALRm4TAh0JSWovaZA0ijrCAmzPz_H1hBZEJ_psmMGyU&e=>
>
>
>
> R
>
>
>
> *From: *Nitan Kainth <ni...@sleepiqlabs.com>
> *Reply-To: *"user@cassandra.apache.org" <us...@cassandra.apache.org>
> *Date: *Wednesday, July 26, 2017 at 8:22 AM
> *To: *"User cassandra.apache.org
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__cassandra.apache.org&d=DwMFaQ&c=gFTBenQ7Vj71sUi1A4CkFnmPzqwDo07QsHw-JRepxyw&r=_V9IzBxaV864n6VoHCzfArKKHY9Xqk-DWw-wAB9JU7E&m=rd2FJwCKPP5z8NHhUlnT38ZikdsXjyW01dIzgTpVNZI&s=K_gfKLpT6YRBplNhlYsM7Rgtx7FEz-Q6bvXUom6GMks&e=>"
> <us...@cassandra.apache.org>
> *Subject: *Re: read/write request counts and write size of each write
>
>
>
> Thank you very much Kurt.
>
>
>
> I am not a java guy, need one small help. I initiated JMX connection but I
> am getting some exception:
>
>
>
> java -jar ~/jmxterm-1.0-alpha-4-uber.jar --url localhost:7199
>
> Welcome to JMX terminal. Type "help" for available commands.
>
> $>run -b org.apache.cassandra.metrics:type=ClientRequest scope=CASWrite
> name=MutationSizeHistogram
>
> #InstanceNotFoundException: org.apache.cassandra.metrics:
> type=ClientRequest
>
>
>
>
> I verified, Cassandra is running on my machine.
>
>
>
>
>
>
> On Tue, Jul 25, 2017 at 9:36 PM, kurt greaves <ku...@instaclustr.com>
> wrote:
>
> Looks like you can collect MutationSizeHistogram for each write as well
> from the coordinator, in regards to write request size. See the Write
> request section underhttps://cassandra.apache.org/doc/latest/operating/
> metrics.html#client-request-metrics
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__cassandra.apache.org_doc_latest_operating_metrics.html-23client-2Drequest-2Dmetrics&d=DwMFaQ&c=gFTBenQ7Vj71sUi1A4CkFnmPzqwDo07QsHw-JRepxyw&r=_V9IzBxaV864n6VoHCzfArKKHY9Xqk-DWw-wAB9JU7E&m=_TOyM3vR40V4Xvh1nWnClVq3MYuybHfhdtWfkIGvVlk&s=vgnwngzAkTiksz5qoRNA71R9UZTCiYLkjw4qXe5nK74&e=>
>
>
>
>
>
>
>
>
>
Re: read/write request counts and write size of each write
Posted by Roger Warner <rw...@pandora.com>.
I think that is not the correct lib directory. You want it under $CASSANDRA_HOME/lib. Ie wherever you deployed cassandra distro into / lib
That directory should be loaded with *.jar files. That is the directory you want.
Roger
From: Nitan Kainth <ni...@bamlabs.com>
Reply-To: "user@cassandra.apache.org" <us...@cassandra.apache.org>
Date: Wednesday, July 26, 2017 at 1:42 PM
To: "user@cassandra.apache.org" <us...@cassandra.apache.org>
Subject: Re: read/write request counts and write size of each write
Hey Roger,
I downloaded and saved the file in /var/lib/cassandra, but getting same error:
java -jar /tmp/jmxterm-1.0-alpha-4-uber.jar --url localhost:7199
Welcome to JMX terminal. Type "help" for available commands.
$>run -b org.apache.cassandra.metrics:type=ClientRequest scope=CASWrite name=MutationSizeHistogram
#InstanceNotFoundException: org.apache.cassandra.metrics:type=ClientRequest
I tried using mx4 jar file:
java -jar /var/lib/cassandra/mx4j-3.0.1.jar url localhost:7199
no main manifest attribute, in /var/lib/cassandra/mx4j-3.0.1.jar
On Jul 26, 2017, at 11:50 AM, Roger Warner <rw...@pandora.com>> wrote:
You need to also have the mx4j jar in your Cassandra lib directory. Double checking you did that – its not included with the distro. You have to download it.
http://mx4j.sourceforge.net/<https://urldefense.proofpoint.com/v2/url?u=http-3A__mx4j.sourceforge.net_&d=DwMFaQ&c=gFTBenQ7Vj71sUi1A4CkFnmPzqwDo07QsHw-JRepxyw&r=_V9IzBxaV864n6VoHCzfArKKHY9Xqk-DWw-wAB9JU7E&m=rd2FJwCKPP5z8NHhUlnT38ZikdsXjyW01dIzgTpVNZI&s=ALRm4TAh0JSWovaZA0ijrCAmzPz_H1hBZEJ_psmMGyU&e=>
R
From: Nitan Kainth <ni...@sleepiqlabs.com>>
Reply-To: "user@cassandra.apache.org<ma...@cassandra.apache.org>" <us...@cassandra.apache.org>>
Date: Wednesday, July 26, 2017 at 8:22 AM
To: "User cassandra.apache.org<https://urldefense.proofpoint.com/v2/url?u=http-3A__cassandra.apache.org&d=DwMFaQ&c=gFTBenQ7Vj71sUi1A4CkFnmPzqwDo07QsHw-JRepxyw&r=_V9IzBxaV864n6VoHCzfArKKHY9Xqk-DWw-wAB9JU7E&m=rd2FJwCKPP5z8NHhUlnT38ZikdsXjyW01dIzgTpVNZI&s=K_gfKLpT6YRBplNhlYsM7Rgtx7FEz-Q6bvXUom6GMks&e=>" <us...@cassandra.apache.org>>
Subject: Re: read/write request counts and write size of each write
Thank you very much Kurt.
I am not a java guy, need one small help. I initiated JMX connection but I am getting some exception:
java -jar ~/jmxterm-1.0-alpha-4-uber.jar --url localhost:7199
Welcome to JMX terminal. Type "help" for available commands.
$>run -b org.apache.cassandra.metrics:type=ClientRequest scope=CASWrite name=MutationSizeHistogram
#InstanceNotFoundException: org.apache.cassandra.metrics:type=ClientRequest
I verified, Cassandra is running on my machine.
On Tue, Jul 25, 2017 at 9:36 PM, kurt greaves <ku...@instaclustr.com>> wrote:
Looks like you can collect MutationSizeHistogram for each write as well from the coordinator, in regards to write request size. See the Write request section underhttps://cassandra.apache.org/doc/latest/operating/metrics.html#client-request-metrics<https://urldefense.proofpoint.com/v2/url?u=https-3A__cassandra.apache.org_doc_latest_operating_metrics.html-23client-2Drequest-2Dmetrics&d=DwMFaQ&c=gFTBenQ7Vj71sUi1A4CkFnmPzqwDo07QsHw-JRepxyw&r=_V9IzBxaV864n6VoHCzfArKKHY9Xqk-DWw-wAB9JU7E&m=_TOyM3vR40V4Xvh1nWnClVq3MYuybHfhdtWfkIGvVlk&s=vgnwngzAkTiksz5qoRNA71R9UZTCiYLkjw4qXe5nK74&e=>
Re: read/write request counts and write size of each write
Posted by Roger Warner <rw...@pandora.com>.
I think that is not the correct lib directory. You want it under $CASSANDRA_HOME/lib. Ie wherever you deployed cassandra distro into / lib
That directory should be loaded with *.jar files. That is the directory you want.
Roger
From: Nitan Kainth <ni...@bamlabs.com>
Reply-To: "user@cassandra.apache.org" <us...@cassandra.apache.org>
Date: Wednesday, July 26, 2017 at 1:42 PM
To: "user@cassandra.apache.org" <us...@cassandra.apache.org>
Subject: Re: read/write request counts and write size of each write
Hey Roger,
I downloaded and saved the file in /var/lib/cassandra, but getting same error:
java -jar /tmp/jmxterm-1.0-alpha-4-uber.jar --url localhost:7199
Welcome to JMX terminal. Type "help" for available commands.
$>run -b org.apache.cassandra.metrics:type=ClientRequest scope=CASWrite name=MutationSizeHistogram
#InstanceNotFoundException: org.apache.cassandra.metrics:type=ClientRequest
I tried using mx4 jar file:
java -jar /var/lib/cassandra/mx4j-3.0.1.jar url localhost:7199
no main manifest attribute, in /var/lib/cassandra/mx4j-3.0.1.jar
On Jul 26, 2017, at 11:50 AM, Roger Warner <rw...@pandora.com>> wrote:
You need to also have the mx4j jar in your Cassandra lib directory. Double checking you did that – its not included with the distro. You have to download it.
http://mx4j.sourceforge.net/<https://urldefense.proofpoint.com/v2/url?u=http-3A__mx4j.sourceforge.net_&d=DwMFaQ&c=gFTBenQ7Vj71sUi1A4CkFnmPzqwDo07QsHw-JRepxyw&r=_V9IzBxaV864n6VoHCzfArKKHY9Xqk-DWw-wAB9JU7E&m=rd2FJwCKPP5z8NHhUlnT38ZikdsXjyW01dIzgTpVNZI&s=ALRm4TAh0JSWovaZA0ijrCAmzPz_H1hBZEJ_psmMGyU&e=>
R
From: Nitan Kainth <ni...@sleepiqlabs.com>>
Reply-To: "user@cassandra.apache.org<ma...@cassandra.apache.org>" <us...@cassandra.apache.org>>
Date: Wednesday, July 26, 2017 at 8:22 AM
To: "User cassandra.apache.org<https://urldefense.proofpoint.com/v2/url?u=http-3A__cassandra.apache.org&d=DwMFaQ&c=gFTBenQ7Vj71sUi1A4CkFnmPzqwDo07QsHw-JRepxyw&r=_V9IzBxaV864n6VoHCzfArKKHY9Xqk-DWw-wAB9JU7E&m=rd2FJwCKPP5z8NHhUlnT38ZikdsXjyW01dIzgTpVNZI&s=K_gfKLpT6YRBplNhlYsM7Rgtx7FEz-Q6bvXUom6GMks&e=>" <us...@cassandra.apache.org>>
Subject: Re: read/write request counts and write size of each write
Thank you very much Kurt.
I am not a java guy, need one small help. I initiated JMX connection but I am getting some exception:
java -jar ~/jmxterm-1.0-alpha-4-uber.jar --url localhost:7199
Welcome to JMX terminal. Type "help" for available commands.
$>run -b org.apache.cassandra.metrics:type=ClientRequest scope=CASWrite name=MutationSizeHistogram
#InstanceNotFoundException: org.apache.cassandra.metrics:type=ClientRequest
I verified, Cassandra is running on my machine.
On Tue, Jul 25, 2017 at 9:36 PM, kurt greaves <ku...@instaclustr.com>> wrote:
Looks like you can collect MutationSizeHistogram for each write as well from the coordinator, in regards to write request size. See the Write request section underhttps://cassandra.apache.org/doc/latest/operating/metrics.html#client-request-metrics<https://urldefense.proofpoint.com/v2/url?u=https-3A__cassandra.apache.org_doc_latest_operating_metrics.html-23client-2Drequest-2Dmetrics&d=DwMFaQ&c=gFTBenQ7Vj71sUi1A4CkFnmPzqwDo07QsHw-JRepxyw&r=_V9IzBxaV864n6VoHCzfArKKHY9Xqk-DWw-wAB9JU7E&m=_TOyM3vR40V4Xvh1nWnClVq3MYuybHfhdtWfkIGvVlk&s=vgnwngzAkTiksz5qoRNA71R9UZTCiYLkjw4qXe5nK74&e=>
Re: read/write request counts and write size of each write
Posted by Nitan Kainth <ni...@bamlabs.com>.
Hey Roger,
I downloaded and saved the file in /var/lib/cassandra, but getting same error:
java -jar /tmp/jmxterm-1.0-alpha-4-uber.jar --url localhost:7199
Welcome to JMX terminal. Type "help" for available commands.
$>run -b org.apache.cassandra.metrics:type=ClientRequest scope=CASWrite name=MutationSizeHistogram
#InstanceNotFoundException: org.apache.cassandra.metrics:type=ClientRequest
I tried using mx4 jar file:
java -jar /var/lib/cassandra/mx4j-3.0.1.jar url localhost:7199
no main manifest attribute, in /var/lib/cassandra/mx4j-3.0.1.jar
> On Jul 26, 2017, at 11:50 AM, Roger Warner <rw...@pandora.com> wrote:
>
> You need to also have the mx4j jar in your Cassandra lib directory. Double checking you did that – its not included with the distro. You have to download it.
>
> http://mx4j.sourceforge.net/ <http://mx4j.sourceforge.net/>
>
> R
>
> From: Nitan Kainth <ni...@sleepiqlabs.com>
> Reply-To: "user@cassandra.apache.org" <us...@cassandra.apache.org>
> Date: Wednesday, July 26, 2017 at 8:22 AM
> To: "User cassandra.apache.org" <us...@cassandra.apache.org>
> Subject: Re: read/write request counts and write size of each write
>
> Thank you very much Kurt.
>
> I am not a java guy, need one small help. I initiated JMX connection but I am getting some exception:
>
> java -jar ~/jmxterm-1.0-alpha-4-uber.jar --url localhost:7199
> Welcome to JMX terminal. Type "help" for available commands.
> $>run -b org.apache.cassandra.metrics:type=ClientRequest scope=CASWrite name=MutationSizeHistogram
> #InstanceNotFoundException: org.apache.cassandra.metrics:type=ClientRequest
>
>
> I verified, Cassandra is running on my machine.
>
>
>
> On Tue, Jul 25, 2017 at 9:36 PM, kurt greaves <kurt@instaclustr.com <ma...@instaclustr.com>> wrote:
> Looks like you can collect MutationSizeHistogram for each write as well from the coordinator, in regards to write request size. See the Write request section underhttps://cassandra.apache.org/doc/latest/operating/metrics.html#client-request-metrics <https://urldefense.proofpoint.com/v2/url?u=https-3A__cassandra.apache.org_doc_latest_operating_metrics.html-23client-2Drequest-2Dmetrics&d=DwMFaQ&c=gFTBenQ7Vj71sUi1A4CkFnmPzqwDo07QsHw-JRepxyw&r=_V9IzBxaV864n6VoHCzfArKKHY9Xqk-DWw-wAB9JU7E&m=_TOyM3vR40V4Xvh1nWnClVq3MYuybHfhdtWfkIGvVlk&s=vgnwngzAkTiksz5qoRNA71R9UZTCiYLkjw4qXe5nK74&e=>
>
>
>
Re: read/write request counts and write size of each write
Posted by Roger Warner <rw...@pandora.com>.
You need to also have the mx4j jar in your Cassandra lib directory. Double checking you did that – its not included with the distro. You have to download it.
http://mx4j.sourceforge.net/
R
From: Nitan Kainth <ni...@sleepiqlabs.com>
Reply-To: "user@cassandra.apache.org" <us...@cassandra.apache.org>
Date: Wednesday, July 26, 2017 at 8:22 AM
To: "User cassandra.apache.org" <us...@cassandra.apache.org>
Subject: Re: read/write request counts and write size of each write
Thank you very much Kurt.
I am not a java guy, need one small help. I initiated JMX connection but I am getting some exception:
java -jar ~/jmxterm-1.0-alpha-4-uber.jar --url localhost:7199
Welcome to JMX terminal. Type "help" for available commands.
$>run -b org.apache.cassandra.metrics:type=ClientRequest scope=CASWrite name=MutationSizeHistogram
#InstanceNotFoundException: org.apache.cassandra.metrics:type=ClientRequest
I verified, Cassandra is running on my machine.
On Tue, Jul 25, 2017 at 9:36 PM, kurt greaves <ku...@instaclustr.com>> wrote:
Looks like you can collect MutationSizeHistogram for each write as well from the coordinator, in regards to write request size. See the Write request section under https://cassandra.apache.org/doc/latest/operating/metrics.html#client-request-metrics<https://urldefense.proofpoint.com/v2/url?u=https-3A__cassandra.apache.org_doc_latest_operating_metrics.html-23client-2Drequest-2Dmetrics&d=DwMFaQ&c=gFTBenQ7Vj71sUi1A4CkFnmPzqwDo07QsHw-JRepxyw&r=_V9IzBxaV864n6VoHCzfArKKHY9Xqk-DWw-wAB9JU7E&m=_TOyM3vR40V4Xvh1nWnClVq3MYuybHfhdtWfkIGvVlk&s=vgnwngzAkTiksz5qoRNA71R9UZTCiYLkjw4qXe5nK74&e=>
Re: read/write request counts and write size of each write
Posted by Nitan Kainth <ni...@sleepiqlabs.com>.
Thank you very much Kurt.
I am not a java guy, need one small help. I initiated JMX connection but I
am getting some exception:
java -jar ~/jmxterm-1.0-alpha-4-uber.jar --url localhost:7199
Welcome to JMX terminal. Type "help" for available commands.
$>run -b org.apache.cassandra.metrics:type=ClientRequest scope=CASWrite
name=MutationSizeHistogram
#InstanceNotFoundException: org.apache.cassandra.metrics:type=ClientRequest
I verified, Cassandra is running on my machine.
On Tue, Jul 25, 2017 at 9:36 PM, kurt greaves <ku...@instaclustr.com> wrote:
> Looks like you can collect MutationSizeHistogram for each write as well
> from the coordinator, in regards to write request size. See the Write
> request section under https://cassandra.apache.org/
> doc/latest/operating/metrics.html#client-request-metrics
>
>
>
Re: read/write request counts and write size of each write
Posted by kurt greaves <ku...@instaclustr.com>.
Looks like you can collect MutationSizeHistogram for each write as well
from the coordinator, in regards to write request size. See the Write
request section under
https://cassandra.apache.org/doc/latest/operating/metrics.html#client-request-metrics
Re: read/write request counts and write size of each write
Posted by Nitan Kainth <ni...@bamlabs.com>.
Thank you Kurt.
I got read/write requests answered. Getting write request size is my unresolved question :(
I m sure, it's a common requirement, anybody have some solution.
> On Jul 25, 2017, at 6:23 PM, kurt greaves <ku...@instaclustr.com> wrote:
>
> You will need to use jmx to collect write/read related metrics. not aware of anything that measures write size, but if there isn't it should be easily measured on your client.
> there are quite a few existing solutions for monitoring Cassandra out there, you should find some easily with a quick search. I believe the graphite/guarana set up works well.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org
For additional commands, e-mail: user-help@cassandra.apache.org
Re: read/write request counts and write size of each write
Posted by kurt greaves <ku...@instaclustr.com>.
You will need to use jmx to collect write/read related metrics. not aware
of anything that measures write size, but if there isn't it should be
easily measured on your client.
there are quite a few existing solutions for monitoring Cassandra out
there, you should find some easily with a quick search. I believe the
graphite/guarana set up works well.