Recommended LEMP Configuration for Init Manga on Small Servers (1–2 vCPU, 2–4GB RAM)

With Init Manga, a small server does not mean weak performance. When configured in the right direction—prioritizing stability and avoiding excessive tuning—a VPS with 1–2 vCPU and 2–4GB RAM can still run very smoothly for manga sites with moderate traffic. This article proposes a LEMP configuration refined from a system that is running well in production, with overly aggressive settings scaled back to better suit small servers.

Recommended LEMP Configuration for Init Manga on Small Servers (1–2 vCPU, 2–4GB RAM)

Optimization goals for small servers

  • Reduce pressure on RAM and file descriptors.
  • Avoid “maxed-out” configurations when traffic is still moderate.
  • Prioritize long-term stability over short-term benchmarks.
  • Well-suited for Init Manga with cache and Redis.

Optimized Nginx configuration for small servers

Compared to the original setup, Nginx is lightened in key areas such as worker_connections, open_file_cache, buffers, and keepalive settings to prevent unnecessary RAM usage.

user www-data;
worker_processes auto;
pid /run/nginx.pid;
error_log /var/log/nginx/error.log crit;

include /etc/nginx/modules-enabled/*.conf;

worker_rlimit_nofile 65535;

events {
    worker_connections 4096;
    use epoll;
    multi_accept on;
}

http {
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    types_hash_max_size 2048;
    server_tokens off;

    keepalive_timeout 20;
    keepalive_requests 20000;
    reset_timedout_connection on;

    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    access_log off;

    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers on;

    open_file_cache max=50000 inactive=30s;
    open_file_cache_valid 60s;
    open_file_cache_min_uses 2;
    open_file_cache_errors on;

    gzip on;
    gzip_static on;
    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 5;
    gzip_min_length 1024;
    gzip_buffers 16 8k;
    gzip_http_version 1.1;
    gzip_types
        text/plain
        text/css
        application/json
        application/javascript
        application/xml
        image/svg+xml
        font/ttf
        font/otf;

    client_body_buffer_size 128k;
    client_header_buffer_size 32k;
    large_client_header_buffers 4 64k;
    client_max_body_size 128m;

    fastcgi_buffering on;
    fastcgi_buffers 8 16k;
    fastcgi_buffer_size 16k;

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}

Quick explanation of reduced settings

  • worker_connections 4096: Sufficient for small servers without holding too many sockets.
  • open_file_cache: Significantly reduced to save RAM when the site does not yet serve hundreds of thousands of static files.
  • keepalive_requests: Lowered to a safe level to avoid keeping connections open for too long.
  • buffers: Reduced to prevent RAM spikes on large requests.

PHP-FPM configuration for Init Manga (small server)

PHP-FPM is often the hidden bottleneck when over-tuned. With Init Manga, fewer but more stable processes are preferred.

pm = dynamic
pm.max_children = 6
pm.start_servers = 3
pm.min_spare_servers = 2
pm.max_spare_servers = 4
pm.max_requests = 500

This configuration fits well within 2–4GB RAM, accounting for both Redis and MySQL.

Recommended php.ini settings

post_max_size = 128M
upload_max_filesize = 128M
max_file_uploads = 128
memory_limit = 512M
max_execution_time = 60
max_input_time = 60

memory_limit 512M is a safe level for Init Manga when handling complex filters and heavy queries.

Redis configuration for small servers

Redis is used purely as a cache layer, not for long-term data storage.

maxmemory 512mb
maxmemory-policy allkeys-lru
save ""
tcp-backlog 65536
timeout 300
tcp-keepalive 300
loglevel warning

512MB is a good balance between cache efficiency and total RAM usage.

Optimized MySQL configuration for Init Manga

Init Manga runs on WordPress, with a strong focus on InnoDB and no need for query cache.

[mysqld]
bind_address = 127.0.0.1
max_connections = 100
connect_timeout = 10
wait_timeout = 300
interactive_timeout = 300

table_open_cache = 256
table_definition_cache = 256
thread_cache_size = 8

query_cache_type = 0
query_cache_size = 0

default_storage_engine = InnoDB
innodb_buffer_pool_size = 256M
innodb_log_file_size = 64M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 2
innodb_flush_method = O_DIRECT
innodb_io_capacity = 400
innodb_read_io_threads = 4
innodb_write_io_threads = 4
innodb_buffer_pool_instances = 1

slow_query_log = 1
long_query_time = 1

skip_log_bin

Recommended VPS providers for running Init Manga

To ensure the configurations above deliver their full potential, choosing a stable VPS provider from the start is crucial. Based on real-world Init Manga deployments, the following providers offer strong performance and long-term reliability.

Vultr is a solid choice if you need international VPS infrastructure, stable CPU performance, and flexible scaling from small to large servers. It is especially suitable for Init Manga sites targeting global traffic or multiple locations.

Veesp is well suited for projects that require stable VPS performance, generous bandwidth, near-offshore locations, and long-term consistency. For Init Manga, Veesp performs well on both mid-range and large servers, especially when combined with Redis and static file caching.

Both providers are suitable for directly applying the LEMP configurations outlined above, helping Init Manga run stably and scale smoothly as traffic grows.

Conclusion

On small servers, Init Manga does not require “maxed-out” configurations. Keeping Nginx moderate, PHP-FPM lean but reliable, Redis efficient, and MySQL well-balanced ensures long-term stability with fewer issues and easier upgrades later. In the next article, we will move on to configurations for mid-range servers, where traffic and concurrency start to increase significantly.

Comments


  • No comments yet.

Init Toolbox

Press Ctrl + \ on desktop, or swipe left anywhere on mobile.

Login