Skip to content

Conversation

@brido4125
Copy link
Collaborator

@brido4125 brido4125 commented Nov 21, 2024

๐Ÿ”— Related Issue

https://github.com/jam2in/arcus-works/issues/615

โŒจ๏ธ What I did

์•„๋ž˜์˜ ์ •๋ณด๋ฅผ MBean์„ ํ†ตํ•ด ๋…ธ์ถœ์‹œ์ผœ jmx-export๋ฅผ ํ†ตํ•ด ์ˆ˜์ง‘๋  ์ˆ˜ ์žˆ๋„๋ก ํ•˜์˜€์Šต๋‹ˆ๋‹ค.
๋ฉ”ํŠธ๋ฆญ๋“ค์˜ ์ˆ˜์ง‘ ๋‹จ์œ„๋Š” ํ•˜๋‚˜์˜ java process ์ž…๋‹ˆ๋‹ค.
์ฆ‰, N๊ฐœ์˜ ArcusClient ์ „๋ถ€์— ๋Œ€ํ•œ ์ˆ˜์ง‘๋ฐฉ์‹์ž…๋‹ˆ๋‹ค.

  • Throughput
    • Completed : ์—ฐ์‚ฐ์— ์„ฑ๊ณตํ•œ Op ๊ฐœ์ˆ˜
    • Canceled : ๋‚ด๋ถ€ / ์™ธ๋ถ€(์‚ฌ์šฉ์ž)์— ์˜ํ•ด์„œ ์ทจ์†Œ๋œ Op ๊ฐœ์ˆ˜
    • Timeouted : timeout์ด ๋ฐœ์ƒํ•œ Op ๊ฐœ์ˆ˜
  • Latency : ์ตœ๊ทผ 10,000๊ฐœ์˜ ์—ฐ์‚ฐ์— ๋Œ€ํ•œ ์•„๋ž˜ ํ•ญ๋ชฉ๋ณ„ Latency ์ˆ˜์ง‘
    • avgLatency
    • minLatency
    • maxLatency
    • 25% Latency
    • 50% Latency
    • 75% Latency

๊ทธ๋ผํŒŒ๋‚˜ ๋Œ€์‹œ๋ณด๋“œ๋Š” ์ด์Šˆ ๋‚ด์— ๊ธฐ์ž…๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

@brido4125 brido4125 self-assigned this Nov 21, 2024
@brido4125 brido4125 requested a review from uhm0311 November 21, 2024 02:08
Copy link
Collaborator

@uhm0311 uhm0311 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1์ฐจ ๋ฆฌ๋ทฐ ์˜๊ฒฌ์ž…๋‹ˆ๋‹ค.

Copy link
Collaborator

@uhm0311 uhm0311 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2์ฐจ ๋ฆฌ๋ทฐ ์˜๊ฒฌ์ž…๋‹ˆ๋‹ค.

Copy link
Collaborator

@uhm0311 uhm0311 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ด๊ฒƒ๋งŒ ์ˆ˜์ •ํ•˜๋ฉด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

uhm0311
uhm0311 previously approved these changes Nov 25, 2024
@brido4125 brido4125 requested a review from jhpark816 November 25, 2024 07:56
@brido4125 brido4125 requested review from jhpark816 and removed request for jhpark816 December 19, 2024 08:26
@brido4125
Copy link
Collaborator Author

@jhpark816

์ด PR์„ ๋ฆฌ๋ทฐํ•˜๊ธฐ์ „์— ๋ณธ ๊ตฌํ˜„์ด ์–ด๋–ค ๋ชฉ์ ์˜ ๋ณ€๊ฒฝ์ธ์ง€ ๋˜๋Š” ํ•ด๋‹น ๊ตฌํ˜„์— ๋Œ€ํ•œ ์„ค๋ช…์ด ํ•„์š”ํ•˜์‹ ๊ฐ€์š”?
ํ•„์š”ํ•˜๋‹ค๋ฉด ์˜คํ”„๋ผ์ธ์œผ๋กœ ์ค€๋น„ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

@jhpark816
Copy link
Collaborator

@brido4125
์šฐ์„  ์ˆœ์œ„๊ฐ€ ๋‚ฎ์•„์„œ ๋‹ค๋ฅธ ์ž‘์—…๋“ค์„ ๋จผ์ € ๋ณด๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
์ด ์ž‘์—…์— ๋Œ€ํ•ด ๋‚˜์ค‘์— ์‚ดํŽด๋ณด๊ณ , ์„ค๋ช… ์—ฌ๋ถ€๋ฅผ ์š”์ฒญํ• ๊ฒŒ์š”.

Comment on lines 86 to 88
long elapsedSeconds = (long) ((currentTime - lastTime) / 1000.0);

return countValue / elapsedSeconds;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์•„๋ž˜ ๋‚ด์šฉ ์ค‘์— ์ž˜๋ชป ์ดํ•ดํ•œ ๋ถ€๋ถ„์ด ์žˆ๋‚˜์š”?

  1. resetStatistics() ์ง์ ‘ ํ˜ธ์ถœํ•˜์ง€ ์•Š์œผ๋ฉด lastTime์€ ๋ณ€ํ•˜์ง€ ์•Š๋Š” ๊ฐ’์ž…๋‹ˆ๋‹ค.
  2. ๋”ฐ๋ผ์„œ elapsedSeconds๋Š” ๊ณ„์†ํ•ด์„œ ์ปค์ง€๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.
  3. ๊ตฌ๋™ ์ดํ›„ ์ถฉ๋ถ„ํ•œ ์‹œ๊ฐ„์ด ํ๋ฅธ ๋’ค์—๋Š”, ์ˆœ๊ฐ„์ ์ธ ์š”์ฒญ๋Ÿ‰ ๋ณ€ํ™”๊ฐ€ Throughput์— ๋“œ๋Ÿฌ๋‚˜์ง€ ์•Š๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

์˜ˆ๋ฅผ ๋“ค์–ด,
๋ชจ๋‹ˆํ„ฐ๋ง ์‹œ์ž‘ ์ดํ›„ ํ•˜๋ฃจ(86,400 ์ดˆ)๋™์•ˆ ์š”์ฒญ์ด ์—†์œผ๋ฉด, CompleteOps metric ๊ฐ’์€ 0์ž…๋‹ˆ๋‹ค.
ํ•˜๋ฃจ๊ฐ€ ์ง€๋‚˜๋Š” ์‹œ์ ์— ์ดˆ๋‹น 10,000๊ฐœ ์š”์ฒญ์„ 1๋ถ„๊ฐ„ ์ฒ˜๋ฆฌํ•œ ํ›„ CompleteOps metric ๋‹ค์‹œ ํ™•์ธํ•ด ๋ณด๋ฉด,
์ดˆ๋‹น ์ฒ˜๋ฆฌ๋Ÿ‰์€ 6 (600,000 / 86,460 = 6.93โ€ฆ)์œผ๋กœ ๋‚˜ํƒ€๋‚  ๊ฒƒ ๊ฐ™์€๋ฐ, ๋งž๋‚˜์š”?

Copy link
Collaborator Author

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๊ฐ€ ์žˆ์œผ๋ฉด ์„ค๋ช… ๋ถ€ํƒ๋“œ๋ ค์š”

Copy link
Collaborator

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 ๊ฒฐ๊ณผ๋ฅผ ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉ)์ด๊ณ , ๊ณ„์†ํ•ด์„œ ์ฆ๊ฐ€๋งŒ ํ•˜๋Š” ๊ฐ’์ž…๋‹ˆ๋‹ค.

image

์‹ค์ œ๋กœ ์ดˆ๋‹น ์š”์ฒญ๋Ÿ‰์€ Grafana์— ์ž‘์„ฑ๋œ promQL ์งˆ์˜๊ฐ€ ์ˆ˜ํ–‰๋˜๋ฉด์„œ ๊ณ„์‚ฐ๋ฉ๋‹ˆ๋‹ค.

https://prometheus.io/docs/prometheus/latest/querying/examples/

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throughput ๊ด€๋ จ ๋ฉ”ํŠธ๋ฆญ๋“ค์€ counter ํƒ€์ž…์œผ๋กœ ์ˆ˜์ง‘๋˜๋„๋ก ๋ณ€๊ฒฝํ–ˆ์Šต๋‹ˆ๋‹ค.

@jhpark816 jhpark816 added the merged next time PR will be merged next time. label Jan 23, 2026
@jhpark816
Copy link
Collaborator

@brido4125
๋ณธ PR์„ ์•„์ง ๋ฆฌ๋ทฐ ๋ชปํ•œ ์ƒํƒœ์ด์ง€๋งŒ, merged_next_time ํƒœ๊ทธ๋ฅผ ๋‹ฌ์•„ ๋‘์—ˆ์Šต๋‹ˆ๋‹ค.
๋”ฐ๋ผ์„œ, ๋ณธ PR๋„ naver ์ €์žฅ์†Œ์˜ brido4125/metrics ๋ธŒ๋žœ์น˜๋กœ ์˜ฎ๊ธฐ๊ณ  PR ๋ณด๋‚ด ์ฃผ์‹œ์ฃ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged next time PR will be merged next time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants