{"id":1782,"date":"2026-11-17T23:07:28","date_gmt":"2026-11-17T23:07:28","guid":{"rendered":"https:\/\/affordablevpsserver.com\/blog\/?p=1782"},"modified":"2026-11-17T23:07:28","modified_gmt":"2026-11-17T23:07:28","slug":"self-hosted-photo-library-vps-storage-cpu-math","status":"publish","type":"post","link":"https:\/\/affordablevpsserver.com\/blog\/self-hosted-photo-library-vps-storage-cpu-math\/","title":{"rendered":"Self-Hosted Photo Library on a Budget VPS: Storage and CPU Math"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A 10,000-object photo library, a folder of 4,000 product images, and a scanned-document archive all fail the same way on a budget VPS: not because the disk is too small, but because the CPU is too slow and the storage is the wrong shape. On a $6\u2013$10\/month instance the difference between a library that serves thumbnails in 40 ms and one that takes 2 seconds is almost entirely thumbnail generation strategy, not server size.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is the sizing arithmetic for self-hosted media libraries on small VPS plans \u2014 what images actually cost in storage and CPU, where the bottlenecks appear, and how to keep the working set small enough that an entry-tier box stays comfortable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Storage math: originals vs derivatives<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A photo library is two datasets with very different characteristics. Originals are written once, read rarely, and are incompressible. Derivatives \u2014 thumbnails, previews, transcoded versions \u2014 are written once, read constantly, and multiply the file count by 3\u20136\u00d7.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Library<\/th><th>Originals<\/th><th>Derivatives<\/th><th>Total on disk<\/th><\/tr><\/thead><tbody><tr><td>2,000 phone photos (4 MB avg)<\/td><td>8 GB<\/td><td>0.6 GB<\/td><td>~9 GB<\/td><\/tr><tr><td>10,000 phone photos<\/td><td>40 GB<\/td><td>3 GB<\/td><td>~43 GB<\/td><\/tr><tr><td>10,000 RAW files (25 MB avg)<\/td><td>250 GB<\/td><td>2 GB<\/td><td>~252 GB<\/td><\/tr><tr><td>4,000 product images (300 KB avg)<\/td><td>1.2 GB<\/td><td>0.9 GB<\/td><td>~2 GB<\/td><\/tr><tr><td>20,000 scanned PDFs (500 KB avg)<\/td><td>10 GB<\/td><td>1 GB (OCR text + previews)<\/td><td>~11 GB<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Two conclusions follow immediately. First, most &#8220;photo library&#8221; projects are 10\u201350 GB, which fits comfortably on a 40\u201380 GB plan. Second, RAW workflows do not fit on budget VPS disk at all \u2014 250 GB of block storage costs more than the server every month, which is the point at which you either keep originals on a NAS and use the VPS as an index, or use object storage for originals.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The CPU cost is in the first import, not steady state<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Serving an existing thumbnail is cheap \u2014 it is a static file through nginx and costs almost nothing. Generating one is expensive: decode a 12-megapixel JPEG, resample, re-encode. On a single shared vCPU that is roughly 0.15\u20130.4 seconds per image, and a 10,000-image import therefore represents 25\u201365 minutes of solid CPU time before you add a second derivative size.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That matters for plan choice because it is a burst, not a baseline. The steady-state load of a library serving 20 users is a few percent of a core. The import is one hour at 100%. A burst-tolerant plan handles it; a strictly capped 100%-of-one-core plan means the import runs overnight and everything else queues behind it.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Generate one thumbnail size at import (typically 256\u2013400 px) and defer the rest.<\/li><li>Run the import in batches with <code>nice -n 10<\/code> so web requests keep priority.<\/li><li>Skip re-decoding on every request: cache derivative paths in the database rather than recomputing them.<\/li><li>Cap concurrent workers at the core count; more workers on a 1\u20132 vCPU box just adds context switching.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">What RAM each popular library actually needs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Image decoding is memory-hungry in a way that surprises people, because a compressed 4 MB JPEG expands to 36 MB in a raw pixel buffer at 12 MP. Processing several at once multiplies that.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Library<\/th><th>Idle RAM<\/th><th>Per concurrent job<\/th><th>Practical floor<\/th><\/tr><\/thead><tbody><tr><td>Immich (app + ML optional)<\/td><td>~600 MB\u20131 GB<\/td><td>300\u2013500 MB per thumbnail job<\/td><td>4 GB (2 GB only without ML)<\/td><\/tr><tr><td>PhotoPrism<\/td><td>~400\u2013700 MB<\/td><td>200\u2013400 MB<\/td><td>4 GB<\/td><\/tr><tr><td>PiGallery2 (static-friendly)<\/td><td>~100 MB<\/td><td>150 MB<\/td><td>1 GB<\/td><\/tr><tr><td>Paperless-ngx (documents)<\/td><td>~500 MB\u20131 GB<\/td><td>400 MB per OCR job<\/td><td>2\u20134 GB<\/td><\/tr><tr><td>Plain Nginx + pregenerated thumbs<\/td><td>~50 MB<\/td><td>n\/a<\/td><td>512 MB<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The bottom row is the important one. If you can pre-generate derivatives on your laptop or in a build step and serve only static files, the server requirement collapses to half a gigabyte. That is the cheapest option available and it is underused \u2014 most people install a full application for what is really a folder of JPEGs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Split the storage before you split the compute<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The usual failure is running out of disk while the CPU sits idle. Cheapest fix, in order:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Move originals to object storage<\/strong> and keep derivatives on the VPS. Originals are cold; derivatives are hot. Object storage costs a fraction per GB and the app fetches originals only for downloads or regeneration.<\/li><li><strong>Put the database and the library on the same volume<\/strong> only if the volume is fast. A small SQLite or PostgreSQL database for 20,000 rows is a few MB; the images are the sprawl.<\/li><li><strong>Prune aggressively.<\/strong> Duplicate detection and &#8220;delete originals after confirming sync&#8221; typically reclaim 15\u201325% of a messy library.<\/li><li><strong>Do not keep backups of derivatives.<\/strong> They are regenerable. Back up originals and the database only \u2014 that can cut backup storage by 80%.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If splitting storage pushes you toward a bigger plan, the <a href=\"https:\/\/affordablevpsserver.com\/blog\/object-storage-vs-block-storage-cost-per-tb-vps\/\">object vs block storage cost comparison<\/a> is worth running before you pay for another 100 GB of block disk.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Three plan shapes that work<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Matching the library patterns above to actual tiers:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Scenario<\/th><th>Plan shape<\/th><th>Monthly cost band<\/th><\/tr><\/thead><tbody><tr><td>Static gallery, pre-generated thumbs<\/td><td>1 vCPU \/ 1 GB \/ 25 GB<\/td><td>$3\u2013$5<\/td><\/tr><tr><td>Immich or PhotoPrism, 10k images, no ML<\/td><td>2 vCPU \/ 4 GB \/ 80 GB<\/td><td>$8\u2013$14<\/td><\/tr><tr><td>Immich with face\/object ML enabled<\/td><td>2\u20134 vCPU \/ 8 GB \/ 160 GB<\/td><td>$16\u2013$28<\/td><\/tr><tr><td>Paperless-ngx document archive<\/td><td>2 vCPU \/ 4 GB \/ 80 GB<\/td><td>$8\u2013$14<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The ML rows are where budgets break. Face detection and CLIP embeddings add a persistent process and 1\u20132 GB of model weights; on a 4 GB box they compete with the database cache and the box swaps continuously. Either budget the RAM or leave ML off \u2014 there is no middle setting that works well.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A checklist before you commit<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before choosing a plan, measure your own library rather than estimating:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>du -sh<\/code> the originals folder, then multiply by 1.1 for derivatives plus database.<\/li><li>Count files. Per-file overhead on ext4 is small but real; 100,000 tiny files in one directory will slow listings regardless of disk speed.<\/li><li>Time a bulk import of 100 images on the trial plan and extrapolate \u2014 that is your real import window.<\/li><li>Decide whether originals live on the VPS or in object storage before you buy disk you cannot shrink.<\/li><li>Check that the provider&#8217;s snapshot or backup allowance covers the library size; a 43 GB library is not covered by a 10 GB backup add-on.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Run those five steps and the plan choice is arithmetic rather than guesswork \u2014 which is the whole point of buying at the budget tier. Current tiers and included disk are listed on <a href=\"https:\/\/affordablevpsserver.com\/\">our budget VPS pricing page<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sizing a self-hosted media library on a cheap VPS: how much disk originals and derivatives really take, why the CPU cost sits in the first import, RAM floors for Immich, PhotoPrism and Paperless, and when to split originals to object storage.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":0,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-1782","post","type-post","status-publish","format-standard","hentry","category-budget-vps-guides"],"blocksy_meta":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Self-Hosted Photo Library on a Budget VPS: Storage and CPU Math - Affordable VPS Server Blog<\/title>\n<meta name=\"description\" content=\"Sizing a self-hosted media library on a cheap VPS: how much disk originals and derivatives really take, why the CPU cost sits in the first import, RAM floors for Immich, PhotoPrism and Paperless, and when to split originals to object storage.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/affordablevpsserver.com\/blog\/self-hosted-photo-library-vps-storage-cpu-math\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Self-Hosted Photo Library on a Budget VPS: Storage and CPU Math\" \/>\n<meta property=\"og:description\" content=\"Self-Hosted Photo Library on a Budget VPS: Storage and CPU Math\" \/>\n<meta property=\"og:url\" content=\"https:\/\/affordablevpsserver.com\/blog\/self-hosted-photo-library-vps-storage-cpu-math\/\" \/>\n<meta property=\"og:site_name\" content=\"Affordable VPS Server Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-17T23:07:28+00:00\" \/>\n<meta name=\"author\" content=\"Affordable-Vps-Server-Author\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Affordable-Vps-Server-Author\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/affordablevpsserver.com\/blog\/self-hosted-photo-library-vps-storage-cpu-math\/\",\"url\":\"https:\/\/affordablevpsserver.com\/blog\/self-hosted-photo-library-vps-storage-cpu-math\/\",\"name\":\"Self-Hosted Photo Library on a Budget VPS: Storage and CPU Math - Affordable VPS Server Blog\",\"isPartOf\":{\"@id\":\"https:\/\/affordablevpsserver.com\/blog\/#website\"},\"datePublished\":\"2026-11-17T23:07:28+00:00\",\"author\":{\"@id\":\"https:\/\/affordablevpsserver.com\/blog\/#\/schema\/person\/685a02c93a3c45030f7427ec928b0df7\"},\"description\":\"Sizing a self-hosted media library on a cheap VPS: how much disk originals and derivatives really take, why the CPU cost sits in the first import, RAM floors for Immich, PhotoPrism and Paperless, and when to split originals to object storage.\",\"breadcrumb\":{\"@id\":\"https:\/\/affordablevpsserver.com\/blog\/self-hosted-photo-library-vps-storage-cpu-math\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/affordablevpsserver.com\/blog\/self-hosted-photo-library-vps-storage-cpu-math\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/affordablevpsserver.com\/blog\/self-hosted-photo-library-vps-storage-cpu-math\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/affordablevpsserver.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Self-Hosted Photo Library on a Budget VPS: Storage and CPU Math\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/affordablevpsserver.com\/blog\/#website\",\"url\":\"https:\/\/affordablevpsserver.com\/blog\/\",\"name\":\"Affordable VPS Server Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/affordablevpsserver.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/affordablevpsserver.com\/blog\/#\/schema\/person\/685a02c93a3c45030f7427ec928b0df7\",\"name\":\"Affordable-Vps-Server-Author\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/affordablevpsserver.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8fa20973a7dd04621d396c26ba26b5c5e6c19595583335121958527393f6f95e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8fa20973a7dd04621d396c26ba26b5c5e6c19595583335121958527393f6f95e?s=96&d=mm&r=g\",\"caption\":\"Affordable-Vps-Server-Author\"},\"sameAs\":[\"https:\/\/affordablevpsserver.com\/blog\"],\"url\":\"https:\/\/affordablevpsserver.com\/blog\/author\/affordablevpsserver\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Self-Hosted Photo Library on a Budget VPS: Storage and CPU Math - Affordable VPS Server Blog","description":"Sizing a self-hosted media library on a cheap VPS: how much disk originals and derivatives really take, why the CPU cost sits in the first import, RAM floors for Immich, PhotoPrism and Paperless, and when to split originals to object storage.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/affordablevpsserver.com\/blog\/self-hosted-photo-library-vps-storage-cpu-math\/","og_locale":"en_US","og_type":"article","og_title":"Self-Hosted Photo Library on a Budget VPS: Storage and CPU Math","og_description":"Self-Hosted Photo Library on a Budget VPS: Storage and CPU Math","og_url":"https:\/\/affordablevpsserver.com\/blog\/self-hosted-photo-library-vps-storage-cpu-math\/","og_site_name":"Affordable VPS Server Blog","article_published_time":"2026-11-17T23:07:28+00:00","author":"Affordable-Vps-Server-Author","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Affordable-Vps-Server-Author","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/affordablevpsserver.com\/blog\/self-hosted-photo-library-vps-storage-cpu-math\/","url":"https:\/\/affordablevpsserver.com\/blog\/self-hosted-photo-library-vps-storage-cpu-math\/","name":"Self-Hosted Photo Library on a Budget VPS: Storage and CPU Math - Affordable VPS Server Blog","isPartOf":{"@id":"https:\/\/affordablevpsserver.com\/blog\/#website"},"datePublished":"2026-11-17T23:07:28+00:00","author":{"@id":"https:\/\/affordablevpsserver.com\/blog\/#\/schema\/person\/685a02c93a3c45030f7427ec928b0df7"},"description":"Sizing a self-hosted media library on a cheap VPS: how much disk originals and derivatives really take, why the CPU cost sits in the first import, RAM floors for Immich, PhotoPrism and Paperless, and when to split originals to object storage.","breadcrumb":{"@id":"https:\/\/affordablevpsserver.com\/blog\/self-hosted-photo-library-vps-storage-cpu-math\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/affordablevpsserver.com\/blog\/self-hosted-photo-library-vps-storage-cpu-math\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/affordablevpsserver.com\/blog\/self-hosted-photo-library-vps-storage-cpu-math\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/affordablevpsserver.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Self-Hosted Photo Library on a Budget VPS: Storage and CPU Math"}]},{"@type":"WebSite","@id":"https:\/\/affordablevpsserver.com\/blog\/#website","url":"https:\/\/affordablevpsserver.com\/blog\/","name":"Affordable VPS Server Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/affordablevpsserver.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/affordablevpsserver.com\/blog\/#\/schema\/person\/685a02c93a3c45030f7427ec928b0df7","name":"Affordable-Vps-Server-Author","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/affordablevpsserver.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8fa20973a7dd04621d396c26ba26b5c5e6c19595583335121958527393f6f95e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8fa20973a7dd04621d396c26ba26b5c5e6c19595583335121958527393f6f95e?s=96&d=mm&r=g","caption":"Affordable-Vps-Server-Author"},"sameAs":["https:\/\/affordablevpsserver.com\/blog"],"url":"https:\/\/affordablevpsserver.com\/blog\/author\/affordablevpsserver\/"}]}},"_links":{"self":[{"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/posts\/1782","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/comments?post=1782"}],"version-history":[{"count":1,"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/posts\/1782\/revisions"}],"predecessor-version":[{"id":1786,"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/posts\/1782\/revisions\/1786"}],"wp:attachment":[{"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/media?parent=1782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/categories?post=1782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affordablevpsserver.com\/blog\/wp-json\/wp\/v2\/tags?post=1782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}