AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Java Performance

skill-linlannet-agent-skills-java-performance · by linlannet

JVM performance tuning - GC optimization, profiling, memory analysis, benchmarking

No reviews yet
0 installs
18 views
0.0% view→install

Install

$ agentstack add skill-linlannet-agent-skills-java-performance

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-linlannet-agent-skills-java-performance)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
6mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Java Performance? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Java 性能技能

通过分析、GC 调优和内存分析优化 JVM 性能。

概述

本技能涵盖 JVM 性能优化,包括垃圾收集调优、内存分析、CPU 分析和使用 JMH 进行基准测试。

何时使用此技能

当您需要以下操作时使用:

  • 为低延迟或吞吐量调优 GC
  • 分析 CPU 热点
  • 分析内存泄漏
  • 基准测试代码性能
  • 优化容器设置

快速参考

GC 预设

# High-throughput
-XX:+UseG1GC
-XX:MaxGCPauseMillis=200
-Xms4g -Xmx4g
-XX:+AlwaysPreTouch

# Low-latency
-XX:+UseZGC
-XX:+ZGenerational
-Xms8g -Xmx8g

# Memory-constrained
-XX:+UseSerialGC
-Xms512m -Xmx512m
-XX:+UseCompressedOops

# Container-optimized
-XX:+UseContainerSupport
-XX:MaxRAMPercentage=75.0
-XX:+ExitOnOutOfMemoryError

分析命令

# Thread dump
jstack -l  > threaddump.txt

# Heap dump
jmap -dump:format=b,file=heap.hprof 

# GC analysis
jstat -gcutil  1000 10

# Flight recording
jcmd  JFR.start duration=60s filename=app.jfr

# Async profiler
./profiler.sh -d 30 -f profile.html 

JMH 基准测试

@BenchmarkMode(Mode.Throughput)
@Warmup(iterations = 3, time = 1)
@Measurement(iterations = 5, time = 1)
@State(Scope.Benchmark)
public class MyBenchmark {

    @Benchmark
    public void testMethod(Blackhole bh) {
        bh.consume(compute());
    }
}

GC 比较

| GC | 延迟 | 吞吐量 | 堆大小 | |----|------|--------|--------| | G1 | 中等 | 高 | 4-32GB | | ZGC | 极低 | 中等 | 8GB-16TB | | Shenandoah | 极低 | 中等 | 8GB+ | | Parallel | 高 | 极高 | 任意 |

故障排除

| 问题 | 原因 | 解决方案 | |------|------|----------| | GC 抖动 | 堆太小 | 增加堆大小 | | 高延迟 | GC 暂停 | 切换到 ZGC | | 内存泄漏 | 对象保留 | 堆转储 + MAT | | CPU 峰值 | 热点循环 | 分析 + 优化 |

使用方法

Skill("java-performance")

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.