[Linux] Re: /dev/shm ve tmpfs

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Volkan YAZICI (yazicivo@ttnet.net.tr)
Date: Wed 25 May 2005 - 19:29:24 EEST


Merhaba,

On Wed, May 25, 2005 at 05:07:34PM +0300, recep yagci wrote:
> uzun bir aradan sonra bilgisayarima dagitim olarak redhat
> kurdum(centos 4) ve /dev/shm diye bir baglanti(tmpfs dosya sistemi
> imis) kullandigini gordum.
[...]
> Birincisi bu dosya sistemi,ne kadar RAM den ne kadar da disk ten
> kullaniyor

Bu (neredeyse) tamamen çekirdek tarafından belirleniyor. Eğer RAM
üzerine yeterli alan varsa, onu size sunabilir. Ya da size RAM üstünde
sunduğu bir alanı, daha yüksek önceliğe (priority) sahip bir programın
RAM ihtiyacı olması durumunda, sizden geri alıp programa verdikten
sonra, size eskisine denk boyutta bir alanı SWAP üzerinden verebilir.
(Tam bu noktada pek emin değilim. Bundan, kendi dökümantasyonunda da
bahsedilmemiş. Birinin üşenmeyip ilgili kodlara bakması lazım. Ama
düşünüldüğü zaman, abidik gubudik programların /tmp ihtiyaçları için
Rsunucuların ihtiyaç duyacağı RAM'den vermek pek de akıl karı
görünmüyor.)

> ben kurulum yaparken herhangi bir ayar yapmadim,ya da gozumden kacmis
> olabilir.

  «tmpfs has three mount options for sizing:
  size: The limit of allocated bytes for this tmpfs instance. [...]
  nr_blocks: The same as size, but in blocks of PAGE_CACHE_SIZE. [...]
  nr_inodes: The maximum number of inodes for this instance. [...]»

  «So 'mount -t tmpfs -o size=10G,nr_inodes=10k,mode=700 tmpfs /mytmpfs'
  will give you tmpfs instance on /mytmpfs which can allocate 10GB
  RAM/SWAP in 10240 inodes and it is only accessible by root.»

> Ikincisi boyle bir dosya sistemine niye gerek var,zaten onceden de
> kernel swap ve RAM kullnarak bu isi halletmiyor muydu(shared memory
> icin falan yazildi diyor ama zaten RAM de ve swap de de bu olaylar
> yapilmiyor mu).

  «tmpfs puts everything into the kernel internal caches and grows
  and shrinks to accommodate the files it contains and is able to
  swap unneeded pages out to swap space. It has maximum size limits
  which can be adjusted on the fly via 'mount -o remount ...'»

  «If you compare it to ramfs (which was the template to create
  tmpfs) you gain swapping and limit checking. [...] Ramdisks
  cannot swap and you do not have the possibility to resize them.»

İyi çalışmalar.

P.S. Yapılan alıntılar çekirdekteki Documentation/filesystems dizininin
altında yer alan tmpfs.txt dosyasından alınmıştır.

_______________________________________________
Linux mailing list
Linux@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.