Other Performance of the symlink on file on RAMDisk. How it works?

Hello all!

The server using symlinks on files located on RAMDisk. Have some questions related to it:
-- How will be affected server performance if symlink on physical HDD but file on RAMDisk? Or it's better to have symlinks on RAMDisk too?
-- What is the maximum count of files on RAM disk? Is there any limits for RAMDisks?
 
Imagine a program opening the file. It first has to find the sym link in a directory, then read the sym link. On a HDD, that reading on average takes one seek (since we don't know ahead of time where on disk the sym link is located), or on average 10 ms. Which comes from the fact that a disk drive can do about 100 seeks (or small random IOs) per second.

Now, is that relevant? Depends. How big is the file? If the file on RAM disk is only a few kilobytes, then reading the file itself will take microseconds, and the 10 ms for the sym links is a lot. If there is also a directory read required to even find the sym link, and that directory is not yet cached and on hard disk, that's an unavoidable extra 10ms. If the file is then dozens of MB in size, reading it will take dozens or hundreds of ms. At that point, the extra 10ms for the sym link is no longer relevant. So the answer is: it depends on many other things.

What is the maximum count of files on RAM disk? Depends on what file system you use for that disk. In ZFS, unlimited. In UFS, as many as you reserved inodes for. On RAM disk, for reasonable file sizes, you are probably limited more by disk space than by file count. Unless your files are really tiny. Look at the other thread, for UFS the math is explained in the man page for newfs.

Disclaimer: I have never tried creating a ZFS file system in a RAM disk. I don't even know whether it works.
 
The server using symlinks on files located on RAMDisk. Have some questions related to it:
-- How will be affected server performance if symlink on physical HDD but file on RAMDisk? Or it's better to have symlinks on RAMDisk too?
-- What is the maximum count of files on RAM disk? Is there any limits for RAMDisks?
You haven't actually said what you mean by RAMDisk. Do you mean tmpfs, some form of md device, or what?
 
Back
Top