-
Notifications
You must be signed in to change notification settings - Fork 49
FEAT: Add Operation throughput and latency metrics by mbean. #841
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
base: develop
Are you sure you want to change the base?
Conversation
uhm0311
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1์ฐจ ๋ฆฌ๋ทฐ ์๊ฒฌ์ ๋๋ค.
src/main/java/net/spy/memcached/metrics/OpThroughputMonitor.java
Outdated
Show resolved
Hide resolved
src/main/java/net/spy/memcached/metrics/OpThroughputMonitor.java
Outdated
Show resolved
Hide resolved
src/main/java/net/spy/memcached/metrics/OpThroughputMonitor.java
Outdated
Show resolved
Hide resolved
src/main/java/net/spy/memcached/metrics/OpThroughputMonitor.java
Outdated
Show resolved
Hide resolved
31929f7 to
10c2595
Compare
uhm0311
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2์ฐจ ๋ฆฌ๋ทฐ ์๊ฒฌ์ ๋๋ค.
src/main/java/net/spy/memcached/metrics/LatencyMetricsSnapShot.java
Outdated
Show resolved
Hide resolved
10c2595 to
de52fc7
Compare
uhm0311
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ด๊ฒ๋ง ์์ ํ๋ฉด ๋ ๊ฒ ๊ฐ์ต๋๋ค.
src/main/java/net/spy/memcached/metrics/LatencyMetricsSnapShot.java
Outdated
Show resolved
Hide resolved
de52fc7 to
00163e5
Compare
|
์ด PR์ ๋ฆฌ๋ทฐํ๊ธฐ์ ์ ๋ณธ ๊ตฌํ์ด ์ด๋ค ๋ชฉ์ ์ ๋ณ๊ฒฝ์ธ์ง ๋๋ ํด๋น ๊ตฌํ์ ๋ํ ์ค๋ช
์ด ํ์ํ์ ๊ฐ์? |
|
@brido4125 |
| long elapsedSeconds = (long) ((currentTime - lastTime) / 1000.0); | ||
|
|
||
| return countValue / elapsedSeconds; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์๋ ๋ด์ฉ ์ค์ ์๋ชป ์ดํดํ ๋ถ๋ถ์ด ์๋์?
resetStatistics()์ง์ ํธ์ถํ์ง ์์ผ๋ฉดlastTime์ ๋ณํ์ง ์๋ ๊ฐ์ ๋๋ค.- ๋ฐ๋ผ์
elapsedSeconds๋ ๊ณ์ํด์ ์ปค์ง๊ฒ ๋ฉ๋๋ค. - ๊ตฌ๋ ์ดํ ์ถฉ๋ถํ ์๊ฐ์ด ํ๋ฅธ ๋ค์๋, ์๊ฐ์ ์ธ ์์ฒญ๋ ๋ณํ๊ฐ Throughput์ ๋๋ฌ๋์ง ์๊ฒ ๋ฉ๋๋ค.
์๋ฅผ ๋ค์ด,
๋ชจ๋ํฐ๋ง ์์ ์ดํ ํ๋ฃจ(86,400 ์ด)๋์ ์์ฒญ์ด ์์ผ๋ฉด, CompleteOps metric ๊ฐ์ 0์
๋๋ค.
ํ๋ฃจ๊ฐ ์ง๋๋ ์์ ์ ์ด๋น 10,000๊ฐ ์์ฒญ์ 1๋ถ๊ฐ ์ฒ๋ฆฌํ ํ CompleteOps metric ๋ค์ ํ์ธํด ๋ณด๋ฉด,
์ด๋น ์ฒ๋ฆฌ๋์ 6 (600,000 / 86,460 = 6.93โฆ)์ผ๋ก ๋ํ๋ ๊ฒ ๊ฐ์๋ฐ, ๋ง๋์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
node-exporter๋ arcus-exporter ๋ฑ์ ๋ค๋ฅธ ๋ฉํธ๋ฆญ ์์งํ๋ก๊ทธ๋จ์์๋
์ด๋น ์์ฒญ๋ ๋ฑ์ ๋ณดํต ์ด๋ป๊ฒ ์ฒ๋ฆฌํ๋์?
์๊ณ ์๋ context๊ฐ ์์ผ๋ฉด ์ค๋ช ๋ถํ๋๋ ค์
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
metric type์ ๋๋ถ๋ถ counter์ gauge๋ก ๋๋ ์ ์๋๋ฐ, ๋์ ์ฐจ์ด๋ฅผ ์๊ณ ์๋์?
์์ฒญ๋๊ณผ ๊ฐ์ ์์น๋ ์ผ๋ฐ์ ์ผ๋ก exporter ์์ค์์ ์ด๋น ๋ณํ๋์ ๊ณ์ฐํ์ง ์๊ณ , ๋์ ๊ฐ์ counter metric์ผ๋ก ๋ด๋ณด๋
๋๋ค.
์๋ฅผ ๋ค์ด, arcus_cmd_get metric์ ์ด๋น get ์์ฒญ ์ฒ๋ฆฌ๋์ด ์๋๋ผ
๊ตฌ๋ ์ดํ ๋์ get ์์ฒญ ์ฒ๋ฆฌ๋(== memcached stats ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋๋ก ์ฌ์ฉ)์ด๊ณ , ๊ณ์ํด์ ์ฆ๊ฐ๋ง ํ๋ ๊ฐ์
๋๋ค.
์ค์ ๋ก ์ด๋น ์์ฒญ๋์ Grafana์ ์์ฑ๋ promQL ์ง์๊ฐ ์ํ๋๋ฉด์ ๊ณ์ฐ๋ฉ๋๋ค.
https://prometheus.io/docs/prometheus/latest/querying/examples/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throughput ๊ด๋ จ ๋ฉํธ๋ฆญ๋ค์ counter ํ์ ์ผ๋ก ์์ง๋๋๋ก ๋ณ๊ฒฝํ์ต๋๋ค.
00163e5 to
314e131
Compare
|
@brido4125 |

๐ Related Issue
https://github.com/jam2in/arcus-works/issues/615
โจ๏ธ What I did
์๋์ ์ ๋ณด๋ฅผ MBean์ ํตํด ๋ ธ์ถ์์ผ jmx-export๋ฅผ ํตํด ์์ง๋ ์ ์๋๋ก ํ์์ต๋๋ค.
๋ฉํธ๋ฆญ๋ค์ ์์ง ๋จ์๋ ํ๋์ java process ์ ๋๋ค.
์ฆ, N๊ฐ์ ArcusClient ์ ๋ถ์ ๋ํ ์์ง๋ฐฉ์์ ๋๋ค.
๊ทธ๋ผํ๋ ๋์๋ณด๋๋ ์ด์ ๋ด์ ๊ธฐ์ ๋์ด ์์ต๋๋ค.