Monitoring local AI for WordPress means watching two layers at once: the host resources that keep WordPress responsive (CPU, memory, disk, PHP-FPM) and the accelerator resources that run inference (GPU utilization, VRAM, temperature, and queue depth). A practical baseline is nvidia-smi or nvtop for immediate checks, plus node_exporter and a GPU exporter such as NVIDIA DCGM Exporter feeding Prometheus and Grafana for history and alerts. The Nvidia RTX 5070 Ti guide for GPU-accelerated WordPress stacks describes this pattern: install NVIDIA drivers, capture GPU metrics with system-level exporters, pipe them into Prometheus, and visualize them in Grafana [1].
This guide is for a technically curious beginner or intermediate admin running a self-hosted WordPress site with local inference on the same machine or on a nearby inference host. It assumes Linux. It does not assume a specific model server, but the monitoring principles apply to Ollama, llama.cpp, vLLM, LocalAI, and custom Python workers.
Prerequisites and scope
Before adding dashboards, confirm the environment matches the monitoring path you intend to use. The GPU-accelerated WordPress reference setup calls for a dedicated or bare-metal Linux server running Ubuntu 22.04 LTS or Ubuntu 24.04 LTS, an installed Nvidia RTX 5070 Ti GPU with PCIe access, root or sudo SSH access, a working WordPress stack on Nginx or Apache with PHP-FPM, and Prometheus and Grafana installed locally or on a central monitoring host [1]. If you run on a Raspberry Pi 5 with an AI HAT+ or another edge device, the same observability goals apply, but the exporter may differ; the on-prem AI ops checklist for WordPress emphasizes metrics, logs, SLOs, safe model updates, backups, scaling, and cost control as the operational frame [2].
Decide whether the model server runs on the WordPress host or on a separate GPU host. Separate hosts are easier to isolate and monitor, but they add network latency and require you to correlate two machines in one dashboard. Co-located inference is simpler to deploy but competes with PHP-FPM, the database, and the web server for CPU and memory.
What to measure and why
GPU utilization alone is not a health signal. A GPU can sit at 95 percent while the site is fast because requests are batched efficiently, or it can sit at 20 percent while users wait because tokenization, disk I/O, or PHP-FPM is the bottleneck. Track at least these groups:
- GPU: utilization, VRAM used and free, temperature, power draw, and per-process memory. VRAM is usually the first hard limit for local LLMs because weights, KV cache, and runtime overhead all consume memory.
- CPU: total and per-core utilization, load average, iowait, and context switches. High iowait with low GPU use often points to model loading, swap, or disk-bound preprocessing.
- Memory and swap: available RAM, swap in/out, and page faults. If the model server and WordPress share a host, memory pressure can stall PHP-FPM.
- PHP-FPM: active processes, idle processes, max children reached, and listen queue. This is the most direct signal that WordPress is waiting on workers rather than on the GPU.
- Application: inference request rate, queue depth, time to first token, total generation time, and error rate. These are the metrics that connect hardware behavior to user experience.
The on-prem AI operations checklist frames this as observability, logs, and SLOs for edge AI, not just raw hardware graphs [2]. For WordPress, the SLO might be “search embedding requests complete under 300 ms” or “AI image generation jobs do not block page rendering.” Hardware metrics help you explain why an SLO is missed.
Quick manual checks
Start with interactive tools before building a full stack. They are fast, require no exporter configuration, and help you interpret later dashboards.
nvidia-smi
watch -n 1 nvidia-smi
nvtop
htop
free -h
iostat -xz 1
nvidia-smi shows GPU utilization, memory usage, temperature, power, and running processes. watch -n 1 nvidia-smi refreshes it every second. nvtop gives a friendlier continuous view if installed. On the CPU side, htop shows per-core load and process activity, free -h shows memory and swap, and iostat -xz 1 shows disk utilization and await times. These tools are useful for a first diagnosis, but they do not retain history and may miss short spikes. Use them to confirm that the problem is real, then move to Prometheus for trend data.
Build a persistent monitoring stack
Step 1: Export host CPU and memory metrics
Prometheus needs an exporter on each host. The Prometheus Node Exporter exposes CPU, memory, disk, network, and filesystem metrics on port 9100. On Ubuntu, install the packaged service if available, or run the official binary as a systemd service. A typical package install is:
sudo apt update
sudo apt install -y prometheus-node-exporter
sudo systemctl enable --now prometheus-node-exporter
curl -s http://localhost:9100/metrics | head
The curl command should return metric lines beginning with # HELP and node_. If it does not, check systemctl status prometheus-node-exporter and the firewall.
Step 2: Export GPU metrics
For Nvidia GPUs, NVIDIA DCGM Exporter is a common Prometheus exporter. It exposes GPU utilization, memory, temperature, power, and error counters on port 9400. The exact container image and version change over time, so use the current NVIDIA DCGM Exporter image from the NVIDIA NGC catalog. A Docker-based launch looks like this:
docker run -d --gpus all --name dcgm-exporter -p 9400:9400 nvcr.io/nvidia/k8s/dcgm-exporter:latest
curl -s http://localhost:9400/metrics | head
If the container starts but exposes no GPU metrics, verify that the NVIDIA driver is installed, that the container runtime supports --gpus all, and that the host can run nvidia-smi successfully. The GPU-accelerated WordPress guide lists NVIDIA driver installation and GPU status verification as the first step for this reason [1].
Step 3: Configure Prometheus scrape jobs
Add both exporters to prometheus.yml and reload Prometheus:
scrape_configs:
- job_name: 'node'
static_configs:
- targets: ['localhost:9100']
- job_name: 'dcgm'
static_configs:
- targets: ['localhost:9400']
If Prometheus runs on a different host, replace localhost with the exporter host and restrict access with firewall rules. After reloading, check Status > Targets in the Prometheus UI. Both jobs should be UP.
Step 4: Visualize in Grafana
Grafana is the visualization layer in the reference WordPress GPU stack [1]. Import a general Node Exporter dashboard for CPU, memory, disk, and network. For GPU, import or build a dashboard using DCGM metrics such as DCGM_FI_DEV_GPU_UTIL, DCGM_FI_DEV_FB_USED, DCGM_FI_DEV_FB_FREE, and DCGM_FI_DEV_GPU_TEMP. Put GPU utilization, VRAM used, CPU load, and PHP-FPM active processes on the same time axis. That single view answers the most common question: is the site slow because the GPU is saturated, because the CPU is saturated, or because WordPress workers are exhausted?
Step 5: Add WordPress and PHP-FPM signals
Enable the PHP-FPM status page in the pool configuration:
pm.status_path = /status
Then expose it through Nginx or Apache on a restricted path, and scrape it with a PHP-FPM exporter or a simple script. At minimum, watch active processes, max children reached, and listen queue. Also watch the web server access and error logs, and the WordPress debug log if enabled. If the inference server exposes Prometheus metrics, scrape them directly. If it does not, wrap model calls in your WordPress plugin or worker so that each request records start time, end time, model name, and success or failure. The on-prem AI ops checklist recommends metrics, logs, and SLOs together because hardware graphs alone rarely explain a failed user request [2].
An illustrative diagnosis
Consider a WordPress site that runs a local embedding model for semantic search. During a bulk reindex, the Grafana dashboard shows GPU utilization near 95 percent, VRAM close to the card’s limit, CPU iowait elevated, and PHP-FPM active processes at the pool maximum. The site remains reachable but search requests time out. This is an illustrative scenario, not a measured test result. The likely causes are an inference queue that is too long, a batch size that is too large for available VRAM, or a PHP-FPM pool that is too small for the number of concurrent reindex requests. The diagnostic order is: reduce concurrency or batch size, confirm VRAM frees up, then check whether PHP-FPM queue depth falls. If GPU utilization drops but site latency remains high, move the investigation to the database, object cache, or disk.
Common problems and fixes
nvidia-sminot found: the NVIDIA driver is missing or not loaded. Install the proprietary driver package and reboot if required [1].- No GPU metrics in Prometheus: the DCGM Exporter container may lack GPU access, the port may be blocked, or the scrape target may be wrong. Test
curl http://localhost:9400/metricson the exporter host. - High CPU, low GPU: tokenization, image preprocessing, disk I/O, or swap is the bottleneck. Check
iostat, swap usage, and the model server logs. - High GPU, slow WordPress: the GPU is busy, but PHP-FPM, the database, or the network may be the user-facing bottleneck. Correlate PHP-FPM queue depth with GPU utilization.
- VRAM exhaustion: reduce context length, use a more aggressive quantization, lower concurrent requests, or move to a larger GPU. Remember that weight size is not total memory use; KV cache and runtime overhead also consume VRAM.
- Edge device metrics missing: Raspberry Pi AI HAT+ and similar accelerators may not expose Nvidia-style metrics. Use vendor tools, host-level CPU and memory metrics, and application-level timing instead [2].
Limitations and tradeoffs
Monitoring consumes CPU, memory, disk, and network. On a small edge host, a full Prometheus and Grafana stack may be heavier than the workload it observes. In that case, use lightweight host metrics, log-based timing, and periodic manual checks. GPU exporters may report coarse or vendor-specific metrics, and containerized WordPress environments may hide host-level counters. If the model server runs on a separate machine, you must correlate timestamps and clocks across hosts. Finally, no dashboard replaces application-level measurement: a GPU at 100 percent is not automatically a problem, and a GPU at 10 percent does not prove the site is healthy.
Next actions
Start with nvidia-smi, htop, and free -h to establish a baseline. Then install Node Exporter and a GPU exporter, scrape both with Prometheus, and build a Grafana dashboard that places GPU utilization, VRAM, CPU load, and PHP-FPM queue depth on one timeline. Add alerts for sustained VRAM pressure, GPU temperature, and PHP-FPM max children reached. If you run a Raspberry Pi or another edge AI device, adapt the exporter choice and rely more on application-level timing [2].
If you try this setup, share your WordPress version, host OS, GPU or accelerator, model server, and the metric that first revealed the bottleneck in the Ai-Forum.org community. A reproducible environment description is more useful than a single screenshot.
FAQ
What is the quickest way to check GPU usage on a WordPress AI server?
Run nvidia-smi, or watch -n 1 nvidia-smi for a continuous view. nvtop is a friendlier alternative if installed. These show GPU utilization, VRAM, temperature, power, and running processes. Use htop and free -h for CPU and memory.
Do I need Prometheus and Grafana for a small local AI setup?
Not always. For one-off diagnosis, nvidia-smi and htop are enough. Prometheus and Grafana add history, dashboards, and alerts. On constrained edge hosts, lightweight host metrics, logs, and application timing may be a better fit.
Why is my GPU idle while WordPress is slow?
The bottleneck may be CPU tokenization, disk I/O, database queries, PHP-FPM worker exhaustion, or network latency. Check PHP-FPM queue depth, iowait, and application-level request timing before assuming the GPU is the problem.
How do I monitor VRAM correctly?
Track used and free VRAM, not just GPU utilization. Account for model weights, KV cache, and runtime overhead. If you hit out-of-memory errors, reduce context length, use more aggressive quantization, lower concurrent requests, or move to a larger GPU.
Can I monitor a Raspberry Pi AI HAT+ the same way as an Nvidia GPU?
Not necessarily. Edge accelerators may not expose Nvidia-style metrics. Use vendor tools where available, plus host-level CPU and memory metrics and application-level timing. The on-prem AI ops checklist recommends metrics, logs, and SLOs together [2].