<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/hem5vcyul" -->

---
title: My API Is Up, but Slow. Is It My Code or the Server?
description: A walkthrough shows how to diagnose a slow API on a small VPS by correlating application metrics (latency, request counts, errors, JVM CPU/memory) with...
canonical: https://daily.dev/posts/hem5vcyul
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: My API Is Up, but Slow. Is It My Code or the Server? | daily.dev
og:description: A walkthrough shows how to diagnose a slow API on a small VPS by correlating application metrics (latency, request counts, errors, JVM CPU/memory) with...
og:url: https://daily.dev/posts/hem5vcyul
og:image: https://api.daily.dev/og/posts/hEM5VCyUl.png
og:image:alt: Post cover image
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# My API Is Up, but Slow. Is It My Code or the Server?

**[Efficient Self-Hosting](https://daily.dev/sources/efficientselfhosting)** · [@ejboy](https://daily.dev/ejboy) · 0 upvotes · 0 comments

## Summary

A walkthrough shows how to diagnose a slow API on a small VPS by correlating application metrics (latency, request counts, errors, JVM CPU/memory) with host-level metrics (CPU, RAM, disk) on a shared timeline. Using StatLite, which reads Spring Boot Actuator metrics and keeps history in a local SQLite file, the scenario traces a latency spike to a CPU-heavy maintenance job competing for CPU time on a single-core server rather than an application regression. A table summarizes common patterns (traffic up, app CPU up, host CPU up, memory climbing) and where to investigate next for each.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://pvrlabs.xyz/articles/api-slow-cpu-contention.html>

## Similar posts on daily.dev

- [Why Is Your Linux Server Slow? A Practical Guide to Performance Troubleshooting](https://daily.dev/posts/why-is-your-linux-server-slow-a-practical-guide-to-performance-troubleshooting-ygobf4pta) · Medium · 1 upvotes · 1 comments
- [5 Things That Cause High Latency in Your APIs \(and How to Fix Them\)](https://daily.dev/posts/5-things-that-cause-high-latency-in-your-apis-and-how-to-fix-them--ygnrjvfij) · Nordic APIs · 0 upvotes · 0 comments
- [Improving First Request Latency in Java Spring Application](https://daily.dev/posts/improving-first-request-latency-in-java-spring-application-ngw8nzoq2) · Awesome Java Newsletter · 26 upvotes · 0 comments
- [Java Is Fast. Your Code Might Not Be.](https://daily.dev/posts/java-is-fast-your-code-might-not-be--melyfth7m) · Hacker News · 0 upvotes · 0 comments
- [How to Track Down the Real Cause of Sudden Latency Spikes](https://daily.dev/posts/how-to-track-down-the-real-cause-of-sudden-latency-spikes-m3kd3j1xj) · Last9 · 1 upvotes · 0 comments

---

Tags: [#observability](https://daily.dev/tags/observability), [#spring-boot](https://daily.dev/tags/spring-boot)

[View this post on daily.dev](https://daily.dev/posts/hem5vcyul)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/hem5vcyul","headline":"My API Is Up, but Slow. Is It My Code or the Server?","text":"Shared: My API Is Up, but Slow. Is It My Code or the Server?","url":"https://daily.dev/posts/hem5vcyul","datePublished":"2026-10-07T00:05:27.297Z","dateModified":"2026-10-07T00:13:08.056Z","author":{"@type":"Person","name":"Ted K","url":"https://daily.dev/ejboy","image":"https://media.daily.dev/image/upload/s--PzSRqJKu--/f_auto/v1787843390/avatars/avatar_Szw3t3q8eJYj5aTperuyF?_a=BAMAMicg0","description":"Building lightweight developer tools at PVR Labs.","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":2210}},"image":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"sharedContent":{"@type":"WebPage","url":"https://api.daily.dev/r/vafpro8Zz"},"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/efficientselfhosting","name":"Efficient Self-Hosting"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Efficient Self-Hosting","item":"https://daily.dev/squads/efficientselfhosting"},{"@type":"ListItem","position":3,"name":"My API Is Up, but Slow. Is It My Code or the Server?"}]}
```

