List:General Discussion« Previous MessageNext Message »
From:prabhat kumar Date:January 29 2010 6:53am
Subject:Re: Using symlinks for database creation in mysql
View as plain text  
And, IF the application uses the file a lot, but opens it infrequently, for
example an MySQL data file, then the incremental cost is truly neglectable.

IF the symlink is looked up and followed frequently then caches will make it
neglectable.

IF the application touches a wide range (hundreds of thousands) of symlinks
frequently and performs very little actual access work (small files), then
there will be a potential significant overhead.


On Fri, Jan 29, 2010 at 12:20 PM, prabhat kumar <aim.prabhat@stripped>wrote:

> I don't agree, Don't have any specific documents but seems to make a bit
> of sense to me.
>
> Opening a file that is a symbolic link takes more time than one that isn't
> as you need to do more operations. Search the directory for the symbolic
> link, open it (probably, though an inode look up might be enough), find the
> file it points to and then open that.
>
> Furthermore, I believe that an application that opened a symbolic link is
> only ever going to reference that file via that link (as that's the file
> handle it got when it opened the thing). This means that all io to and from
> that file probably needs to go through a longer path.
>
> Where you have hundreds of these going on, those additional system calls
> are going to add up to a degradation in performance.
>
>
> On Fri, Jan 29, 2010 at 12:14 PM, Suresh Kuna <sureshkumarilu@stripped>wrote:
>
>> Not a problem as you are doing it from a whole data directory.
>>
>> Thanks
>> Suresh Kuna
>> MySQL DBA
>>
>> On Fri, Jan 29, 2010 at 11:56 AM, Manasi Save <
>> manasi.save@stripped> wrote:
>>
>> > Hi All,
>> >
>> >
>> > I am creating symlinks as database.
>> >
>> > I have mysql data directory created on /var/lib/mysql/databasename.
>> >
>> >
>> > on the same path I am creating /var/lib/mydatabase
>> >
>> > and creating symlink from /var/lib/mydatabase to
>> >  /var/lib/mysql/databasename
>> >
>> >
>> > will there any performance issues as there will be quite a few folders
>> and
>> > symlinks on the same path?
>> >
>> >
>> > Thanks in advance.
>> >
>> >
>> > --
>> > Regards,
>> > Manasi Save
>> >
>> >
>>
>>
>> --
>> Thanks
>> Suresh Kuna
>> MySQL DBA
>>
>
>
>
> --
> Best Regards,
>
> Prabhat Kumar
> MySQL DBA
> Datavail-India Mumbai
> Mobile     : 91-9987681929
> www.datavail.com
>
> My Blog: http://adminlinux.blogspot.com
> My LinkedIn: http://www.linkedin.com/in/profileprabhat
>



-- 
Best Regards,

Prabhat Kumar
MySQL DBA
Datavail-India Mumbai
Mobile     : 91-9987681929
www.datavail.com

My Blog: http://adminlinux.blogspot.com
My LinkedIn: http://www.linkedin.com/in/profileprabhat

Thread
Using symlinks for database creation in mysqlManasi Save29 Jan
  • Re: Using symlinks for database creation in mysqlSuresh Kuna29 Jan
    • Re: Using symlinks for database creation in mysqlprabhat kumar29 Jan
      • Re: Using symlinks for database creation in mysqlprabhat kumar29 Jan
        • Re: Using symlinks for database creation in mysqlJohan De Meersman29 Jan