|
| 1 | +--- |
| 2 | +title: Optimizing with the Arm MCP Server |
| 3 | +weight: 7 |
| 4 | + |
| 5 | +### FIXED, DO NOT MODIFY |
| 6 | +layout: learningpathall |
| 7 | +--- |
| 8 | + |
| 9 | +# Optimizing with the Arm MCP Server |
| 10 | + |
| 11 | +Use the Arm MCP Server after the manual baseline is complete. The agent should accelerate analysis and execution, but your benchmark artifacts remain the source of truth for what actually improved. |
| 12 | + |
| 13 | +If you are new to this toolchain, start with the [Arm MCP Server learning path](https://learn.arm.com/learning-paths/servers-and-cloud-computing/arm-mcp-server/) for setup and core usage patterns. |
| 14 | + |
| 15 | +## 1. Identify endpoints likely to benefit most |
| 16 | + |
| 17 | +Ask the agent to analyze your application routes and classify optimization candidates by CPU intensity, serialization cost, synchronization, and cache behavior. |
| 18 | + |
| 19 | +Prompt template: |
| 20 | + |
| 21 | +```text |
| 22 | +Analyze this .NET application for Arm optimization opportunities. |
| 23 | +Identify endpoints most likely to benefit from Arm tuning. |
| 24 | +Rank them by expected impact and explain why. |
| 25 | +``` |
| 26 | + |
| 27 | +Expected output: |
| 28 | + |
| 29 | +- Ranked endpoint list |
| 30 | +- Bottleneck hypotheses per endpoint |
| 31 | +- Instrumentation plan to validate hypotheses |
| 32 | + |
| 33 | +## 2. Generate and run a targeted endpoint test suite |
| 34 | + |
| 35 | +Ask the agent to build a repeatable suite that exercises the ranked endpoints and emits machine-readable output. |
| 36 | + |
| 37 | +Prompt template: |
| 38 | + |
| 39 | +```text |
| 40 | +Create a reproducible endpoint benchmark suite for these routes. |
| 41 | +Use concurrency, iterations, and JSON output. |
| 42 | +Include pass/fail checks for HTTP behavior and error rate. |
| 43 | +``` |
| 44 | + |
| 45 | +The suite should produce: |
| 46 | + |
| 47 | +- Per-endpoint latency percentiles |
| 48 | +- Throughput summary |
| 49 | +- Error counts |
| 50 | +- Before/after comparison artifacts |
| 51 | + |
| 52 | +## 3. Plan and implement Arm optimizations on Azure Cobalt |
| 53 | + |
| 54 | +Ask the agent to create an execution plan, apply changes, run tests, and report deltas. |
| 55 | + |
| 56 | +Prompt template: |
| 57 | + |
| 58 | +```text |
| 59 | +On this Ubuntu Neoverse (Azure Cobalt) instance: |
| 60 | +1) establish baseline, |
| 61 | +2) apply Arm-focused .NET runtime and deployment optimizations, |
| 62 | +3) rerun tests, |
| 63 | +4) report statistically meaningful deltas and risks. |
| 64 | +``` |
| 65 | + |
| 66 | +Typical optimization actions include: |
| 67 | + |
| 68 | +- Runtime settings (`DOTNET_TieredPGO`, `DOTNET_ReadyToRun`, thread pool tuning) |
| 69 | +- Container/runtime configuration cleanup |
| 70 | +- Architecture-conditional deployment settings |
| 71 | +- Repeated measurement loops with fixed workload parameters and fixed endpoint order |
| 72 | + |
| 73 | +## Practical guardrails |
| 74 | + |
| 75 | +- Keep manual baseline artifacts as source of truth. |
| 76 | +- Require raw output files for every claim. |
| 77 | +- Ask the agent to separate observed facts from inferred explanations. |
| 78 | +- Re-run on production-like traffic before release. |
0 commit comments