How to cache ROX thumbnails to a ram drive

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
Bruce B

How to cache ROX thumbnails to a ram drive

#1 Post by Bruce B »

It seems to me that someone asked a question about how to prevent ROX from filling up the PUP Home device with thumbnails. I.e., can you cache the thumbnails to RAM?

I can't find the original post. In any event I've been playing around with using a RAM disk for caching the ROX thumbnails. It has been working fine.

Here is a HOW I DONE IT:

1) In the /etc/profile file I added the following lines BEFORE the exec xwin line at the bottom of the file:

# make a ram drive probably will be about 10 MB by default
mke2fs /dev/ram0
# make a mount point for the ram drive
mkdir /mnt/ram0
# mount the ram drive
mount /dev/ram0 /mnt/ram0

2) I deleted the /root/.thumbnails directory and made a link to the ram drive with the following commands

cd
rm -r .thumbnails
ln -s /mnt/ram0 .thumbnails

-----------------

It works fine and ROX caches the thumbnails to RAM. I also close Puppy by leaving X to the shell prompt and unmount the devices I mounted. Then I reboot.

I think it a good practice to unmount the RAM disk before rebooting. It is up to you.

I hope someone found this little HOW-TO useful

----------

Edited orginal post to add this comment:

To check size and available space in the RAM drive I type the following
command at the prompt:

df -h
Last edited by Bruce B on Wed 25 May 2005, 15:06, edited 1 time in total.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#2 Post by BarryK »

yes, I wonder how much things get slowed down, having the thumbnails in /root, hence on the hard drive?

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#3 Post by GuestToo »

you could just symlink to a dir in ram ... maybe something like this:

put these lines somewhere in your startup files, for example, rc.local:

mkdir /tmp/.thumbnails
ln -sf /tmp/.thumbnails /root/.thumbnails

delete the /root/.thumbnails dir and your thumbnails will be in ram the next time you reboot

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#4 Post by GuestToo »

of course, if you have an option 2 install, /tmp will not be ram

Bruce B

#5 Post by Bruce B »

GuestToo wrote:you could just symlink to a dir in ram ... maybe something like this:

put these lines somewhere in your startup files, for example, rc.local:

mkdir /tmp/.thumbnails
ln -sf /tmp/.thumbnails /root/.thumbnails

delete the /root/.thumbnails dir and your thumbnails will be in ram the next time you reboot
Duh.

I really do appreciate your expertise and apparent genius. Thanks.

Post Reply