java-performance by pluginagentmarketplace/custom-plugin-java
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-java --skill java-performance通过性能剖析、GC调优和内存分析来优化 JVM 性能。
此技能涵盖 JVM 性能优化,包括垃圾回收调优、内存分析、CPU 性能剖析以及使用 JMH 进行基准测试。
当您需要时使用此技能:
# 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 <pid> > threaddump.txt
# Heap dump
jmap -dump:format=b,file=heap.hprof <pid>
# GC analysis
jstat -gcutil <pid> 1000 10
# Flight recording
jcmd <pid> JFR.start duration=60s filename=app.jfr
# Async profiler
./profiler.sh -d 30 -f profile.html <pid>
@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());
}
}
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| GC | 延迟 | 吞吐量 | 堆大小 |
|---|---|---|---|
| G1 | 中等 | 高 | 4-32GB |
| ZGC | 极低 | 中等 | 8GB-16TB |
| Shenandoah | 极低 | 中等 | 8GB+ |
| Parallel | 高 | 极高 | 任意 |
| 问题 | 原因 | 解决方案 |
|---|---|---|
| GC 抖动 | 堆大小过小 | 增加堆大小 |
| 高延迟 | GC 停顿 | 切换到 ZGC |
| 内存泄漏 | 对象持有 | 堆转储 + MAT 分析 |
| CPU 峰值 | 热点循环 | 性能剖析 + 优化 |
Skill("java-performance")
每周安装次数
197
代码仓库
GitHub 星标数
27
首次出现
Jan 21, 2026
安全审计
安装于
opencode175
gemini-cli167
codex165
github-copilot153
amp133
cursor133
Optimize JVM performance through profiling, GC tuning, and memory analysis.
This skill covers JVM performance optimization including garbage collection tuning, memory analysis, CPU profiling, and benchmarking with JMH.
Use when you need to:
# 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 <pid> > threaddump.txt
# Heap dump
jmap -dump:format=b,file=heap.hprof <pid>
# GC analysis
jstat -gcutil <pid> 1000 10
# Flight recording
jcmd <pid> JFR.start duration=60s filename=app.jfr
# Async profiler
./profiler.sh -d 30 -f profile.html <pid>
@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 | Latency | Throughput | Heap Size |
|---|---|---|---|
| G1 | Medium | High | 4-32GB |
| ZGC | Very Low | Medium | 8GB-16TB |
| Shenandoah | Very Low | Medium | 8GB+ |
| Parallel | High | Very High | Any |
| Problem | Cause | Solution |
|---|---|---|
| GC thrashing | Heap too small | Increase heap |
| High latency | GC pauses | Switch to ZGC |
| Memory leak | Object retention | Heap dump + MAT |
| CPU spikes | Hot loops | Profile + optimize |
Skill("java-performance")
Weekly Installs
197
Repository
GitHub Stars
27
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykPass
Installed on
opencode175
gemini-cli167
codex165
github-copilot153
amp133
cursor133
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
113,700 周安装