İçeriğe atla

Final Unicourse'tan Çalış, Yüksek Notu Garantile!

%25 İndirim Kodu: FRM25
Yükleniyor...
Dersi İzle
GÖRÜNTÜLEYENLER
+36
Premium Özellik
Bu konuyu kimlerin görüntülediğini görmek için Premium üyelik gerekir.
Premium'a Geç

Vizesine Unicourse'tan Çalış, Yüksek Notu Garantile!

A B C D Çıkmış Sorular Formül Kağıtları Konu Anlatımı Sınav İpuçları Örnek Sınav
Dersi İzle
Red Bull Basement
SPONSORLU ETKİNLİK

Fikrini Gerçeğe Dönüştür

Projeni dünyaya göstermek için sahne hazır. Red Bull Basement başvuruları açık.

Başvurunu Yap

🎉 Foruma Yeni Özellik Geldi!

Sizin için PDF toollarını getirdik!

Why is my home server using so much RAM for cache + buffer?

Selfhosted
4 4 2
  • I have noticed that my home server is strangely using lots of swap (~5 GB), despite having only a few lightweight processes running and loads of RAM installed (32 GB).

    Upon configuring Grafana + Prometheus, I noticed a trend where cache + buffer will progressively increase until swap starts to be used. My system and services combined will use ~8 GB RAM. Upon rebooting, the cache + buffer will start anywhere from 3--10 GB, progressively ramp up to ~25 GB in 1--2h, where swap will start to be needed (~3 GB). See the image attached for reference.

    My swap filesystem is on an expensive (to me) SSD, and I would like to reduce its wear by as much as possible. I understand that swap can introduce only minimal wear on SSDs depending on its nature and that it can be harmless, but I am still not sure what is causing this behavior (and why) and whether I should worry about it or not. So I figured I should investigate what is happening here.

    My main question is, how can I figure out what is causing this behavior? Is it expected? I am looking for guidance from others who are more experienced than me in the topic.

    A little bit about my system:

    I am running Debian 12 on an NVMe SSD containing the root partition (btrfs) and docker services. I also have two HDDs, one with persistent data (ext4), and the other with backups (ext4). This is majoritarily a single-user machine. I tried using the following kernel parameters, but it hasn't helped:

    vm.swappiness=10
    vm.vfs_cache_pressure=200
    

    My docker services are:

    • *arr stack
    • jellyfin
    • nextcloud
    • immich
    • open-webui + ollama
    • pi-hole
    • invidious
    • romm
    • nginx proxy manager
    • grafana + prometheus
    • other minor services that I don't think are doing much (uptime-kuma, stirlingpdf, vaultwarden, etc)
    Link Preview Image
  • I have noticed that my home server is strangely using lots of swap (~5 GB), despite having only a few lightweight processes running and loads of RAM installed (32 GB).

    Upon configuring Grafana + Prometheus, I noticed a trend where cache + buffer will progressively increase until swap starts to be used. My system and services combined will use ~8 GB RAM. Upon rebooting, the cache + buffer will start anywhere from 3--10 GB, progressively ramp up to ~25 GB in 1--2h, where swap will start to be needed (~3 GB). See the image attached for reference.

    My swap filesystem is on an expensive (to me) SSD, and I would like to reduce its wear by as much as possible. I understand that swap can introduce only minimal wear on SSDs depending on its nature and that it can be harmless, but I am still not sure what is causing this behavior (and why) and whether I should worry about it or not. So I figured I should investigate what is happening here.

    My main question is, how can I figure out what is causing this behavior? Is it expected? I am looking for guidance from others who are more experienced than me in the topic.

    A little bit about my system:

    I am running Debian 12 on an NVMe SSD containing the root partition (btrfs) and docker services. I also have two HDDs, one with persistent data (ext4), and the other with backups (ext4). This is majoritarily a single-user machine. I tried using the following kernel parameters, but it hasn't helped:

    vm.swappiness=10
    vm.vfs_cache_pressure=200
    

    My docker services are:

    • *arr stack
    • jellyfin
    • nextcloud
    • immich
    • open-webui + ollama
    • pi-hole
    • invidious
    • romm
    • nginx proxy manager
    • grafana + prometheus
    • other minor services that I don't think are doing much (uptime-kuma, stirlingpdf, vaultwarden, etc)
    Link Preview Image

    As a suggestion, ditch ollama and setup llama.cpp. it will work fine with openwebui and it's much more efficient. (Unrelated to the ram/swap issue)

  • As a suggestion, ditch ollama and setup llama.cpp. it will work fine with openwebui and it's much more efficient. (Unrelated to the ram/swap issue)

    Can you talk more about this? What are you basing this on?

  • Can you talk more about this? What are you basing this on?

    It has been a while since I looked but Ollama use to be llama.CCP with a cloud wrapper before they forked it and rewrote it. In the same way postman is curl with a cloud wrapper.

    Tossing the extra bit will make it use less resources and support the actual project not someone forking oss, slapping on a paint job, rewriting a core function and still calling it oss.


Önerilen Başlıklar

6

Çevrimiçi

8.8k

Kullanıcı

1.9k

Konu

3.7k

İleti