Operating System - HP-UX
1833788 Members
2669 Online
110063 Solutions
New Discussion

overhead using symbolic links ?

 
SOLVED
Go to solution
Sami Koskela
Occasional Contributor

overhead using symbolic links ?

Hi !

Is there lot of overhead when you use symbolic links to files that are accessed very often.

that is, instead of accessing
/dsk1/db/sales.db

you access it via symbolic link:
/home/sales/db/sales.db
where
db in /home/sales/ is symbolic link to:
/dsk1/db/

I would think there is, but is there really, and how much ?

thanks,

Sami
4 REPLIES 4
Steven Gillard_2
Honored Contributor
Solution

Re: overhead using symbolic links ?

Only when the file is first opened - there are some extra disk reads to read the symbolic link information, then open the appropriate file. Once the file is open there is no additional overhead, so unless your application opens and closes the file a lot using a symlink you won't notice any slowdowns. In a database this is unlikely to be the case.

Regards,
Steve
Sami Koskela
Occasional Contributor

Re: overhead using symbolic links ?

Thanks,
that helped. I guess I'm ok with my db-files.

however, I will take a deeper look at the log files that are opened/closed often via symbolic link...

-
sami
John Carr_2
Honored Contributor

Re: overhead using symbolic links ?

Hi

as per what Steven said you would need to be opening thousands of files to even be able to start to quantify the degradation in performance. Hardware and disks are so fast these days I would not loose any sleep over the issue.

good luck
john.
A. Clay Stephenson
Acclaimed Contributor

Re: overhead using symbolic links ?

Hi:

There is only 1 level of indirection and the overhead is quite trivial. Adding this indirection more than makes up for it when you need to move the database files. You simply remake the link and you are done; no database changes are needed at all.
If it ain't broke, I can fix that.