램디스크 설정과 구글쿠롬 램디스크 연결 방법 좀 알려주세요

안녕하세요 무식쟁이 입니다.

오늘도 고수님들께 질문드리고 싶은것이 있어 이렇게 글을 올립니다.

램디스크라는것을 알게 되었는데요 램디스크를 설정하여 임시파일을 램디스크로 지정하고

브라우저에서 설정을 해주면 인터넷속도가 빨라진다는 말을 듣고

검색해서 윈도우에서 어찌어찌하여 크롬에 설정을 하여 인터넷을 해보니

느낌인지는 잘모르겠으나 성능향상이 있는 것 처럼 느껴지더군요

그래서 궁금했습니다. 리눅스에서도 램디스를 설정해서 크롬 설정해주면

성능향상이 있을까하고 그래서 인터넷을 뒤졌습니다.

우분투케이라는 사이트에서 아래와 같은 정보를 얻었습니다.

tmpfs는 일정크기의 램 디스크를 잡고 필요할 경우에만 램에서 공간을 할당하여 사용할 수 있습니다.
다시말해 사용되지 않는 공간은 일반 램으로서 사용할 수 있다는 얘기 입니다.

.사용법
터미널에서…
sudo mkdir /media/ramdisk -> ramdisk폴더를 만들어준다.
sudo chmod 777 /media/ramdisk -> ramdisk폴더에 실행권한을 준다.
sudo mount -t tmpfs -o size=500M,nr_inodes=10k,mode=0777 tmpfs /media/ramdisk -> 500MB를 램 디스크로 할당 하고 마운트.

마운트를 해제하려면…
sudo umount /media/ramdisk

항상 램 디스크를 사용한다면…
sudo gedit /etc/fstab

에디터에서 다음 라인을 추가한 다음 저장 후 재부팅을 합니다.
tmpfs /media/ramdisk tmpfs size=500M,nr_inodes=10k,mode=777 0 0


그런데 검색을 해봐도 크롬이나 파이러폭스에서 어떻게 설정을 해야하는지 잘모르겠더군요

그래서 어찌 설정하는지 고수님께 질문을 드리고자 합니다.

고수님들의 가르침 부탁드립니다.

저는 기존의 tmp 디렉토리를 램디스크로 바꿔 활용하고 있습니다.
이렇게 한 줄을 추가하면 임시 디렉토리는 램디스크가 되고 크기는 시스템에서 관리합니다.

[code:1okfjtte]# /tmp ramdisk
tmpfs /tmp tmpfs rw 0 0[/code:1okfjtte]

파이어폭스의 경우는 주소 줄에 about:config 를 입력하면 고급설정으로 들어갈수 있는건 아시리라 생각됩니다.
고급설정창의 필터에 cache를 입력하여 보면 디스크 캐시와 메모리 캐시 관련 항목들이 보일겁니다.
그곳을 적절히 수정하면 원하는 일을 할 수 있습니다.

방법은 두 가지입니다. 둘 중 한 가지만 선택하여 진행하면 됩니다.

하나.
디스크 캐시의 경로를 램디스크 디렉토리로 변경하려면
빈공간에서 오른클릭 -> 새로 만들기 -> 문자열을 선택후 이름은 browser.cache.disk.parent_directory 값은 /tmp (혹은 램디스크 경로)를
입력하면 됩니다.

둘.
파이어폭스의 디스크 캐시 기능은 끄고 자체에 있는 메모리 캐시만 이용하려면
새로 만들기 -> 정수, 이름은 browser.cache.memory.capacity 값은 할당하려는 메모리 크기(bytes)를 입력하고
browser.cache.disk.enable 항목을 false로 변경하여 디스크 캐시를 끄면 됩니다.

참고로 최초 설정은 디스크 캐시와 메모리 캐시가 모두 켜져 있는 상태이고
메모리 캐시가 지정되어 있지 않은데 이경우 파이어폭스가 시스템 메모리량을 고려해 알아서 지정합니다.

제가 아는게 없어 고수님의 말씀을 잘 이해 하지 못하고 있습니다.

제가 알아본 저 설정대로 하고 gweere님께서 말씀해주신 /tmp ramdisk 코드를 치고

fstab에 밑에 tmpfs /tmp tmpfs rw 0 0 를 넣으라는 말씀이신지요?

아니면 처음부터 앞에 설정 무시하고 그대로 하면 된다는 말씀이신지요?

root@yas:/home/yas# /tmp ramdisk 라고 치니
bash: /tmp: is a directory 이렇게 나옵니다. ㅡ,.ㅡ;;;

우분투 입문한지 얼마안돼어 아는게 없는 무식한 초보자 입니다…

그대로 따라할수 있게 처음부터 좀 가르쳐 주시면 안될까요? 부탁드립니다. ^^;;;

[quote="무식쟁이":3kozf7fh]항상 램 디스크를 사용한다면…
sudo gedit /etc/fstab

에디터에서 다음 라인을 추가한 다음 저장 후 재부팅을 합니다.
tmpfs /media/ramdisk tmpfs size=500M,nr_inodes=10k,mode=777 0 0
[/quote:3kozf7fh]
위 내용과 마찬가지로 'tmpfs /tmp tmpfs rw 0 0’을 fstab 파일을 열어 끝에 추가하면 됩니다.
'# /tmp ramdisk ’ 이 내용은 그냥 주석이고 무시하셔도 되는 내용입니다.
fstab 파일을 열어보면 같은 형식의 줄이 많아 금방 알 수 있으리라 제멋대로 생각해버려서 혼란을 드렸네요…

/media/ramdisk 디렉토리를 램디스크로 만들어 쓰셔도 되고 /tmp 디렉토리를 램디스크로 만들어 쓰셔도 됩니다.
어느 한쪽만 선택하셔도 되고 둘다 선택하셔도 됩니다. 그건 본인 선택이세요.

보통 램디스크를 쓰면 임시디렉토리도 램디스크로 쓰는 경우가 많으니 둘을 함께 할수 있는
/tmp 디렉토리를 램디스크로 만들고 파이어폭스의 임시파일 경로를 /tmp로 바꾸는 방법을 알려드린겁니다.

파이어폭스상의 설정은 무언가 설명이 부족하다 느끼시면 구글에서 ‘파이어폭스 메모리 캐시’, ‘파이어폭스 램디스크’ 등으로 검색하면
많은 자료들이 검색되어 나오니 참고하세요.

gweere 님의 친절한 답변에 감사드립니다. ^^

크롬용…
[url:3h23inon]http://gnuandlinuxnews.blogspot.com/2010/11/move-google-chrome-cache-to-ram-disk.html[/url:3h23inon]

Move Google Chrome Cache to RAM Disc

"As we all know, Google Chrome and Chromium does not give use a option on where to put the cache on disk. But clever use of bash script and symbolic links does the trick." he began before outlining the steps needed to achieve the desired effect.

Open a fresh Terminal window and enter the following: -

[code:3h23inon]sudo gedit /etc/fstab[/code:3h23inon]

Add the following line to the bottom of the text file that opens but BE CAREFUL – do not touch, edit or enter ANYTHING else:

[code:3h23inon]tmpfs /media/ramdisk tmpfs defaults,noatime,mode=1777 0 0[/code:3h23inon]

Once entered save and exit.

Head back to the terminal window, this time enter the following: -

[code:3h23inon]sudo mkdir /media/ramdisk[/code:3h23inon]

Now lets create the script that will do the ‘magic’ for us.

Still in the Terminal enter:

[code:3h23inon]gedit ~/.chromecache[/code:3h23inon]

add this inside the textfile

[code:3h23inon]#!/bin/sh
#for the google chrome cache
/bin/rm ~/.cache/google-chrome
/bin/mkdir /media/ramdisk/google-chrome
/bin/ln -s /media/ramdisk/google-chrome ~/.cache/google-chrome
#for the chromium cache
/bin/rm ~/.cache/chromium
/bin/mkdir /media/ramdisk/chromium
/bin/ln -s /media/ramdisk/chromium ~/.cache/chromium[/code:3h23inon]

Save and exit.

Make the script executable by issuing:

[code:3h23inon]sudo chmod +x ~/.chromecache[/code:3h23inon]

Now go to ‘System > Preferences > Start-up Applications’ and add a mew entry using the following field data: -

Name: Chrome Cache
command: ~/.chromecache
comment: moving chrome browser cache to ramdisk