{"id":1103,"date":"2025-09-23T16:39:45","date_gmt":"2025-09-23T13:39:45","guid":{"rendered":"https:\/\/narhost.com\/destek\/?p=1103"},"modified":"2026-09-12T14:53:35","modified_gmt":"2026-09-12T11:53:35","slug":"sistem-bellegi-ram-takibi-nasil-yapilir","status":"publish","type":"post","link":"https:\/\/narhost.com\/destek\/sistem-bellegi-ram-takibi-nasil-yapilir\/","title":{"rendered":"Linux RAM Kullan\u0131m\u0131 Nas\u0131l \u0130zlenir (free, top, htop)"},"content":{"rendered":"<p class=\"kb-dogrulama\">Son do\u011frulama: Eyl\u00fcl 2026 \u00b7 Ubuntu 24.04 test sunucusunda denendi<\/p>\n<div id=\"hizli-cozum\" class=\"ai-box ai-box--cozum\">\n<p class=\"ai-box-title\">H\u0131zl\u0131 \u00e7\u00f6z\u00fcm<\/p>\n<p><strong>Linux RAM kullan\u0131m\u0131<\/strong> izlemenin en h\u0131zl\u0131 yolu <code>free -h<\/code> komutudur; &#8220;free&#8221; s\u00fctunu d\u00fc\u015f\u00fck g\u00f6r\u00fcnse de &#8220;available&#8221; s\u00fctunu as\u0131l bo\u015f belle\u011fi g\u00f6sterir, swap ve OOM riskini de ayn\u0131 ad\u0131mda kontrol edersiniz.<\/p>\n<ol>\n<li><code>free -h<\/code> \u00e7al\u0131\u015ft\u0131r\u0131p &#8220;available&#8221; s\u00fctununa bak\u0131n, d\u00fc\u015f\u00fck &#8220;free&#8221; de\u011feri tek ba\u015f\u0131na sorun de\u011fildir.<\/li>\n<li><code>swapon --show<\/code> ile swap kullan\u0131m\u0131n\u0131 g\u00f6r\u00fcn; s\u00fcrekli dolu swap ger\u00e7ek bellek darl\u0131\u011f\u0131na i\u015faret eder.<\/li>\n<li>Belle\u011fi en \u00e7ok t\u00fcketen s\u00fcreci <code>ps aux --sort=-%mem | head<\/code> ile bulun.<\/li>\n<li>Sunucu beklenmedik bi\u00e7imde bir s\u00fcreci kapatt\u0131ysa <code>dmesg | grep -i oom<\/code> ile OOM killer izini aray\u0131n.<\/li>\n<\/ol>\n<\/div>\n<table class=\"kb-uyg\">\n<tr>\n<th>Panel<\/th>\n<td>Yok \u2014 VPS\/VDS y\u00f6netimsizdir; izleme i\u015fletim sistemi \u00fczerinden yap\u0131l\u0131r<\/td>\n<\/tr>\n<tr>\n<th>Sistem<\/th>\n<td>Ubuntu 22.04\/24.04, Debian 12, AlmaLinux 8\/9, Rocky 9 (coreutils <code>free<\/code>, <code>ps<\/code>, <code>vmstat<\/code> her da\u011f\u0131t\u0131mda yerle\u015fik)<\/td>\n<\/tr>\n<tr>\n<th>Yetki<\/th>\n<td>Sunucunuzun herhangi bir kullan\u0131c\u0131s\u0131; OOM g\u00fcnl\u00fc\u011f\u00fc i\u00e7in sudo\/root \u00f6nerilir<\/td>\n<\/tr>\n<tr>\n<th>Narhost \u00fcr\u00fcn\u00fc<\/th>\n<td><a href=\"https:\/\/narhost.com\/vps-sunucu\" title=\"Narhost VPS Sunucu paketleri\">VPS Sunucu<\/a>, VDS Sunucu<\/td>\n<\/tr>\n<\/table>\n<div class=\"kb-once\">\n<p class=\"label\">Ba\u015flamadan \u00f6nce<\/p>\n<ul>\n<li>Sunucunuza SSH ile ba\u011fl\u0131 olun.<\/li>\n<li>\u015eik\u00e2yetin ne zaman ba\u015flad\u0131\u011f\u0131n\u0131 not edin (belirli bir saat, belirli bir i\u015flem ya da yay\u0131n an\u0131).<\/li>\n<li>Sunucunuzda swap alan\u0131 olup olmad\u0131\u011f\u0131n\u0131 bilin; yoksa <code>swapon --show<\/code> bo\u015f d\u00f6ner, bu normaldir.<\/li>\n<li>VPS\/VDS y\u00f6netimsizdir: i\u015fletim sistemi ve \u00fczerindeki yaz\u0131l\u0131mlar sizin sorumlulu\u011funuzdad\u0131r, Narhost yaln\u0131zca altyap\u0131 ve a\u011f\u0131 sa\u011flar.<\/li>\n<\/ul>\n<\/div>\n<h2>Linux RAM Kullan\u0131m\u0131 Neden Yanl\u0131\u015f Yorumlan\u0131r<\/h2>\n<p>Linux RAM kullan\u0131m\u0131 \u00f6l\u00e7\u00fcl\u00fcrken en s\u0131k yap\u0131lan hata <a href=\"https:\/\/man7.org\/linux\/man-pages\/man1\/free.1.html\" title=\"free komutu resmi man sayfas\u0131 \u2014 man7.org\" target=\"_blank\" rel=\"noopener\"><code>free -h<\/code><\/a> \u00e7\u0131kt\u0131s\u0131ndaki &#8220;free&#8221; s\u00fctununu esas almakt\u0131r. \u00c7ekirdek, bo\u015fta kalan belle\u011fi \u00e7\u00f6pe atmaz; disk \u00f6nbelle\u011fine (<code>buff\/cache<\/code>) ay\u0131r\u0131r ve bir uygulama istedi\u011fi an bu alan\u0131 geri al\u0131r. Bu y\u00fczden &#8220;free&#8221; d\u00fc\u015f\u00fck g\u00f6r\u00fcnse de sunucu s\u0131k\u0131\u015f\u0131k de\u011fildir; ger\u00e7ek durumu <code>available<\/code> s\u00fctunu g\u00f6sterir, o d\u00fc\u015f\u00fckse sorun vard\u0131r.<\/p>\n<p>Bellek ger\u00e7ekten yetersiz kald\u0131\u011f\u0131nda iki \u015fey olur: sistem swap alan\u0131na yazmaya ba\u015flar (disk h\u0131z\u0131nda oldu\u011fu i\u00e7in belirgin yava\u015flama hissedilir) ya da \u00e7ekirde\u011fin OOM (Out Of Memory) killer&#8217;\u0131 en \u00e7ok bellek t\u00fcketen s\u00fcreci \u00f6ld\u00fcrerek sunucuyu ayakta tutar. \u0130kisi de <code>free -h<\/code>, <a href=\"https:\/\/man7.org\/linux\/man-pages\/man8\/vmstat.8.html\" title=\"vmstat komutu resmi man sayfas\u0131 \u2014 man7.org\" target=\"_blank\" rel=\"noopener\"><code>vmstat<\/code><\/a> ve <code>dmesg<\/code> \u00e7\u0131kt\u0131s\u0131nda iz b\u0131rak\u0131r; ad\u0131mlar bu izleri s\u0131rayla okur.<\/p>\n<figure class=\"nh-sema\"><img src=\"https:\/\/narhost.com\/destek\/wp-content\/uploads\/2026\/09\/sistem-bellegi-ram-takibi-nasil-yapilir-sema-narhost.webp\" alt=\"linux ram kullan\u0131m\u0131 ak\u0131\u015f \u015femas\u0131 \u2014 available ve buff\/cache fark\u0131, swap kontrol\u00fc, s\u00fcre\u00e7 tespiti, OOM killer izi ad\u0131mlar\u0131\" width=\"1200\" height=\"500\" loading=\"lazy\" decoding=\"async\"><figcaption>Linux RAM kullan\u0131m\u0131 d\u00f6rt ad\u0131mda \u00f6zetlenir: available\/buff-cache fark\u0131n\u0131 g\u00f6rme, swap kontrol\u00fc, en \u00e7ok bellek kullanan s\u00fcreci bulma, OOM killer izini arama.<\/figcaption><\/figure>\n<h2>Ad\u0131m Ad\u0131m free, ps ve dmesg ile Bellek Takibi<\/h2>\n<ol class=\"kb-adimlar\">\n<li><strong>Genel bellek durumunu g\u00f6r\u00fcn.<\/strong><code>-h<\/code> bayra\u011f\u0131 baytlar\u0131 okunabilir birime (Gi\/Mi) \u00e7evirir.\n<pre><code class=\"language-bash\">free -h<\/code><\/pre>\n<p class=\"kb-cikti\">Beklenen sonu\u00e7 (test sunucusunda al\u0131nan ger\u00e7ek \u00e7\u0131kt\u0131): <code>total 31Gi, used 1.2Gi, free 29Gi, buff\/cache 1.2Gi, available 30Gi<\/code>. &#8220;used&#8221; d\u00fc\u015f\u00fck, &#8220;buff\/cache&#8221; k\u00fc\u00e7\u00fck; sunucu rahat \u00e7al\u0131\u015f\u0131yor demektir.<\/p>\n<\/li>\n<li><strong>&#8220;available&#8221; ile &#8220;free&#8221; fark\u0131n\u0131 kontrol edin.<\/strong> Aradaki fark tamamen \u00f6nbellekten gelir, kay\u0131p bellek de\u011fildir.\n<pre><code class=\"language-bash\">cat \/proc\/meminfo | grep -E \"^Mem(Total|Free|Available):\"<\/code><\/pre>\n<p class=\"kb-cikti\">Beklenen sonu\u00e7: test sunucusunda <code>MemTotal 32819460 kB<\/code>, <code>MemFree 30668660 kB<\/code>, <code>MemAvailable 31471536 kB<\/code> \u2014 &#8220;available&#8221; de\u011feri her zaman &#8220;free&#8221;ye e\u015fit ya da ondan b\u00fcy\u00fck \u00e7\u0131kar.<\/p>\n<\/li>\n<li><strong>Swap kullan\u0131m\u0131n\u0131 g\u00f6r\u00fcn.<\/strong> Swap disk \u00fczerinde \u00e7al\u0131\u015ft\u0131\u011f\u0131 i\u00e7in RAM&#8217;den \u00e7ok daha yava\u015ft\u0131r.\n<pre><code class=\"language-bash\">swapon --show<\/code><\/pre>\n<p class=\"kb-cikti\">Beklenen sonu\u00e7 (test sunucusunda al\u0131nan ger\u00e7ek \u00e7\u0131kt\u0131): <code>\/swap.img file 1.5G 0B -2<\/code>. &#8220;USED&#8221; s\u00fctunu 0&#8217;a yak\u0131nsa swap&#8217;a ihtiya\u00e7 yok; s\u00fcrekli y\u00fcksekse RAM ger\u00e7ekten yetersizdir.<\/p>\n<\/li>\n<li><strong>Belle\u011fi en \u00e7ok kullanan s\u00fcreci bulun.<\/strong><code>%MEM<\/code> s\u00fctunuyla s\u0131ralay\u0131n; bir paket kurulumu ya da g\u00fcncelleme s\u00fcr\u00fcyorsa ilgili s\u00fcre\u00e7ler listenin ba\u015f\u0131na \u00e7\u0131kar, bu beklenen bir durumdur.\n<pre><code class=\"language-bash\">ps aux --sort=-%mem | head -6<\/code><\/pre>\n<p class=\"kb-cikti\">Beklenen sonu\u00e7: s\u00fctunlar <code>%MEM<\/code>, <code>RSS<\/code> (ger\u00e7ek fiziksel bellek, KB) ve <code>COMMAND<\/code>&#8216;\u0131 g\u00f6sterir; en \u00fcstteki s\u00fcre\u00e7 anl\u0131k en \u00e7ok RAM t\u00fcketendir.<\/p>\n<\/li>\n<li><strong>Swap etkinli\u011fini zaman i\u00e7inde izleyin.<\/strong><code>si<\/code> (swap in) ve <code>so<\/code> (swap out) s\u00fctunlar\u0131 saniyede ka\u00e7 KB&#8217;\u0131n diske yaz\u0131l\u0131p okundu\u011funu g\u00f6sterir.\n<pre><code class=\"language-bash\">vmstat 1 3<\/code><\/pre>\n<p class=\"kb-cikti\">Beklenen sonu\u00e7 (test sunucusunda al\u0131nan ger\u00e7ek \u00e7\u0131kt\u0131): <code>si 0, so 0<\/code>; bu de\u011ferler s\u0131f\u0131rdan uzakla\u015f\u0131rsa sunucu aktif olarak swap&#8217;a yaz\u0131yor, performans d\u00fc\u015f\u00fc\u015f\u00fc buradan gelir.<\/p>\n<\/li>\n<li><strong>OOM killer izini aray\u0131n.<\/strong> Bir servis a\u00e7\u0131klamas\u0131z \u015fekilde durduysa \u00e7ekirdek g\u00fcnl\u00fc\u011f\u00fcne bak\u0131n.\n<pre><code class=\"language-bash\">dmesg | grep -i \"out of memory\\|oom\"<\/code><\/pre>\n<p class=\"kb-cikti\">Beklenen sonu\u00e7: test sunucusunda bu komut bo\u015f d\u00f6nd\u00fc (OOM olay\u0131 yok). Bir kay\u0131t varsa <code>Out of memory: Killed process &lt;PID&gt; (&lt;isim&gt;)<\/code> sat\u0131r\u0131, \u00f6ld\u00fcr\u00fclen s\u00fcreci ve zaman\u0131 verir.<\/p>\n<\/li>\n<\/ol>\n<h2>Do\u011frulama<\/h2>\n<div class=\"success-box\">\n<p class=\"label\">Sonu\u00e7<\/p>\n<p><code>free -h<\/code>&#8216;taki &#8220;available&#8221; s\u00fctunu ihtiyac\u0131n\u0131z\u0131n belirgin \u00fczerindeyse, <code>swapon --show<\/code>&#8216;daki &#8220;USED&#8221; s\u0131f\u0131ra yak\u0131nsa ve <code>dmesg<\/code>&#8216;de OOM kayd\u0131 yoksa, linux RAM kullan\u0131m\u0131 bu sunucuda g\u00fcvenli s\u0131n\u0131rda demektir.<\/p>\n<\/div>\n<h2>H\u00e2l\u00e2 \u00c7\u00f6z\u00fclmediyse<\/h2>\n<ul>\n<li><strong>&#8220;available&#8221; d\u00fc\u015f\u00fck ve swap s\u00fcrekli dolu.<\/strong> Kal\u0131c\u0131 \u00e7\u00f6z\u00fcm bellek ihtiyac\u0131n\u0131 azaltmak ya da pakedi b\u00fcy\u00fctmektir; ge\u00e7ici rahatlama i\u00e7in <a href=\"https:\/\/narhost.com\/destek\/swap-alani-nasil-olusturulur\/\" title=\"Swap Alan\u0131 Nas\u0131l Olu\u015fturulur \u2014 Narhost Destek\">swap alan\u0131 olu\u015fturma kart\u0131na<\/a> bak\u0131n.<\/li>\n<li><strong>Tek bir s\u00fcre\u00e7 s\u00fcrekli bellek b\u00fcy\u00fct\u00fcyor (bellek s\u0131z\u0131nt\u0131s\u0131).<\/strong> Servisi g\u00fcvenle yeniden ba\u015flatma ad\u0131mlar\u0131 <a href=\"https:\/\/narhost.com\/destek\/linux-servisini-durdurma-ve-aktif-etme\/\" title=\"Linux Servisini Durdurma ve Aktif Etme (systemctl) \u2014 Narhost Destek\">servis y\u00f6netimi kart\u0131nda<\/a>.<\/li>\n<li><strong>Genel y\u00fck CPU&#8217;da da y\u00fcksek g\u00f6r\u00fcn\u00fcyor.<\/strong><a href=\"https:\/\/narhost.com\/destek\/top-htop-ile-kaynak-izleme\/\" title=\"Top Htop ile Kaynak \u0130zleme \u2014 Narhost Destek\">top\/htop ile kaynak izleme kart\u0131<\/a> CPU ve s\u00fcre\u00e7 tablosunu birlikte okumay\u0131 anlat\u0131r.<\/li>\n<li><strong>Yeni al\u0131nan bir VDS beklenenden yava\u015f \u00e7al\u0131\u015f\u0131yor.<\/strong><a href=\"https:\/\/narhost.com\/destek\/vds-aldim-ama-kasiyor-ne-yapmaliyim\/\" title=\"VDS Ald\u0131m Ama Kas\u0131yor, Ne Yapmal\u0131y\u0131m \u2014 Narhost Destek\">VDS kas\u0131yor kart\u0131ndaki<\/a> genel te\u015fhis s\u0131ras\u0131n\u0131 izleyin.<\/li>\n<\/ul>\n<div class=\"cta-box\">\n<p class=\"label\">Narhost deste\u011fi<\/p>\n<p>Talebe \u015funlar\u0131 ekleyin: sunucunuzun IP adresi, i\u015fletim sisteminiz, <code>free -h<\/code> ve <code>swapon --show<\/code> \u00e7\u0131kt\u0131s\u0131, varsa <code>dmesg<\/code>&#8216;deki OOM sat\u0131r\u0131.<\/p>\n<p><a class=\"cta-btn\" href=\"https:\/\/narhost.com\/submitticket.php\" title=\"Narhost destek talebi olu\u015ftur\">Destek talebi a\u00e7<\/a><\/div>\n<div class=\"kb-ilgili\">\n<p class=\"label\">Sonraki ad\u0131mlar<\/p>\n<ul>\n<li><a href=\"https:\/\/narhost.com\/destek\/vps-vds-ilk-kurulum-rehberi\/\" title=\"VPS VDS Sunucu \u0130lk Kurulum Rehberi \u2014 Narhost Destek\">VPS\/VDS ilk kurulum rehberinin tamam\u0131<\/a><\/li>\n<li><a href=\"https:\/\/narhost.com\/destek\/top-htop-ile-kaynak-izleme\/\" title=\"Top Htop ile Kaynak \u0130zleme \u2014 Narhost Destek\">top\/htop ile CPU ve RAM&#8217;i birlikte izleme<\/a><\/li>\n<li><a href=\"https:\/\/narhost.com\/destek\/swap-alani-nasil-olusturulur\/\" title=\"Swap Alan\u0131 Nas\u0131l Olu\u015fturulur \u2014 Narhost Destek\">Swap alan\u0131 olu\u015fturma<\/a><\/li>\n<li><a href=\"https:\/\/narhost.com\/destek\/vds-aldim-ama-kasiyor-ne-yapmaliyim\/\" title=\"VDS Ald\u0131m Ama Kas\u0131yor, Ne Yapmal\u0131y\u0131m \u2014 Narhost Destek\">VDS genel performans te\u015fhisi<\/a><\/li>\n<\/ul>\n<\/div>\n<div class=\"kb-faq\">\n<h2>S\u0131k\u00e7a sorulan sorular<\/h2>\n<h3>Linux RAM kullan\u0131m\u0131 takibinde &#8220;free&#8221; s\u00fctunu neden bu kadar d\u00fc\u015f\u00fck \u00e7\u0131kar?<\/h3>\n<p>\u00c7ekirdek kullan\u0131lmayan RAM&#8217;i bo\u015fa harcamaz, disk \u00f6nbelle\u011fine (<code>buff\/cache<\/code>) ay\u0131r\u0131r ve uygulama istedi\u011fi an geri verir. Ger\u00e7ek bo\u015f belle\u011fi g\u00f6rmek i\u00e7in &#8220;free&#8221; de\u011fil &#8220;available&#8221; s\u00fctununa bak\u0131l\u0131r.<\/p>\n<h3>Swap kullan\u0131m\u0131 g\u00f6rmek, RAM&#8217;in yetersiz oldu\u011fu anlam\u0131na m\u0131 gelir?<\/h3>\n<p>Hay\u0131r, tek seferlik k\u00fc\u00e7\u00fck swap kullan\u0131m\u0131 normaldir. Sorun, <code>swapon --show<\/code>&#8216;daki &#8220;USED&#8221; de\u011ferinin s\u00fcrekli y\u00fcksek kalmas\u0131 ve <code>vmstat<\/code>&#8216;taki <code>si<\/code>\/<code>so<\/code> s\u00fctunlar\u0131n\u0131n s\u0131f\u0131rdan uzakla\u015fmas\u0131d\u0131r; bu, sunucunun aktif olarak diske yazd\u0131\u011f\u0131n\u0131 g\u00f6sterir.<\/p>\n<h3>OOM killer bir s\u00fcreci ne zaman \u00f6ld\u00fcr\u00fcr?<\/h3>\n<p>\u00c7ekirdek, kullan\u0131labilir bellek ve swap t\u00fckendi\u011finde sunucunun tamamen kilitlenmesini \u00f6nlemek i\u00e7in en \u00e7ok bellek t\u00fcketen s\u00fcreci sonland\u0131r\u0131r. Bu olay <code>dmesg | grep -i oom<\/code> \u00e7\u0131kt\u0131s\u0131nda <code>Killed process<\/code> sat\u0131r\u0131yla g\u00f6r\u00fcn\u00fcr.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Linux RAM kullan\u0131m\u0131: free -h ile available\/buff-cache fark\u0131, swapon &#8211;show ile swap durumu, ps aux &#8211;sort=-%mem ile s\u00fcre\u00e7 tespiti ve dmesg ile OOM killer izini ger\u00e7ek komut \u00e7\u0131kt\u0131lar\u0131yla okuma.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,13],"tags":[164,253],"class_list":["post-1103","post","type-post","status-publish","format-standard","hentry","category-vds-server","category-vps-server","tag-ram","tag-free"],"meta_box":[],"_links":{"self":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts\/1103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/comments?post=1103"}],"version-history":[{"count":3,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts\/1103\/revisions"}],"predecessor-version":[{"id":1463,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/posts\/1103\/revisions\/1463"}],"wp:attachment":[{"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/media?parent=1103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/categories?post=1103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/narhost.com\/destek\/wp-json\/wp\/v2\/tags?post=1103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}