Skip to content

Commit 3503e13

Browse files
committed
add final pages
1 parent bde19be commit 3503e13

3 files changed

Lines changed: 187 additions & 0 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Containerize the application
3+
weight: 5
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
# Containerize the application
10+
11+
Containerization should preserve reproducibility across architectures. This page shows practical paths for Dockerfile-based builds and .NET SDK container publish, with guardrails for multi-architecture delivery.
12+
13+
### 1. Dockerfile path
14+
15+
Run a Dockerfile build with buildx:
16+
17+
```bash
18+
# Create or reuse a buildx builder that supports multi-architecture builds.
19+
docker buildx create --use --name nopx
20+
21+
# Build and publish a manifest list that includes multiple architectures.
22+
docker buildx build --platform linux/amd64,linux/arm64 -t [your repo:tag name] --push .
23+
```
24+
25+
### 2. .NET SDK publish path (single architecture)
26+
27+
Use SDK publish when you want tighter integration with .NET build settings and fewer custom Docker steps.
28+
29+
```bash
30+
dotnet publish src/Presentation/Nop.Web/Nop.Web.csproj \
31+
-c Release \
32+
/t:PublishContainer \
33+
-p:ContainerImageTag=publish-test
34+
```
35+
36+
### 3. .NET SDK multi-arch path
37+
38+
Define multi-arch runtime identifiers in the project file, then publish once.
39+
40+
```xml
41+
<PropertyGroup>
42+
<ContainerRuntimeIdentifiers>linux-x64;linux-arm64</ContainerRuntimeIdentifiers>
43+
</PropertyGroup>
44+
```
45+
46+
```bash
47+
# Publish all configured runtime identifiers from one project definition.
48+
dotnet publish src/Presentation/Nop.Web/Nop.Web.csproj -c Release /t:PublishContainer
49+
```
50+
51+
This is the scalable path for one image definition across both architectures.
52+
53+
## Recommendation
54+
55+
Use SDK publish as the default migration path. Use a Dockerfile workflow for advanced layer control or custom build logic.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: Performance tuning on Cobalt
3+
weight: 6
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
# Performance tuning on Cobalt
10+
11+
Treat tuning as an experiment pipeline, not a one-shot tweak. On Arm, apply changes in a controlled sequence, measure with fixed workloads, and keep only optimizations that repeatedly improve your target metrics.
12+
13+
## Tuned run configuration
14+
15+
Start with a conservative runtime profile that is commonly effective for server workloads.
16+
17+
```bash
18+
export DOTNET_TieredPGO=1
19+
export DOTNET_ReadyToRun=1
20+
export DOTNET_gcServer=1
21+
export DOTNET_gcConcurrent=1
22+
export DOTNET_EnableDiagnostics=0
23+
export DOTNET_ThreadPool_ForceMinWorkerThreads=2
24+
```
25+
26+
Run the same endpoint suite used in the baseline:
27+
28+
```bash
29+
# Keep benchmark parameters identical to baseline for valid comparison.
30+
python3 test_nopcommerce_endpoints.py \
31+
--base-url http://127.0.0.1:5000 \
32+
--concurrency 8 \
33+
--iterations 20 \
34+
--json-out arm_after.json
35+
```
36+
37+
## Validation rules for credible tuning gains
38+
39+
Use these rules before adopting a tuning profile:
40+
41+
- Run at least 5 baseline and 5 tuned trials.
42+
- Keep endpoint sequence fixed across all runs.
43+
- Reset warm-up policy consistently (always warm or always cold).
44+
- Require improvement in both throughput and p95 latency, not just one.
45+
- Set a minimum practical threshold (for example, >=5% median gain) before rollout.
46+
47+
## Interpretation
48+
49+
- If only one metric improves while p95 or error rate regresses, do not treat the change as a win.
50+
- If run-to-run variation is near the observed delta, treat it as noise.
51+
- Keep architecture-specific profiles separate; do not force one profile onto all architectures.
52+
53+
54+
Use this page as a tuning workflow template, then validate with your production-like traffic profile before rollout.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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

Comments
 (0)