You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-users@jakarta.apache.org by Timo Nentwig <tn...@verisign.com> on 2006/06/15 15:02:39 UTC

Storing disk cache on NFS

Hello everybody,

I came up with a quite simple idea to share cache between multiple servers: putting the disk
cache in an NFS share.

Has somebody already done this? Or don't I even have to try for certain reasons?

Thanks a lot
Timo

---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Re: Storing disk cache on NFS

Posted by Timo Nentwig <tn...@verisign.com>.
Aaron Smuts wrote:
> We need to make the disk behavior configurable, that

This is something I'd really like to see in JCS!

---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Re: Storing disk cache on NFS

Posted by Aaron Smuts <as...@yahoo.com>.
We need to make the disk behavior configurable, that
is, whether or not you want items to go to disk only
when the memory size is reached, or if you want all
items to go to disk regardless of how much room is
left in the memory auxiliary.

--- Timo Nentwig <tn...@verisign.com> wrote:

> Aaron Smuts wrote:
> >> I forgot to mention that we wrote our own disk
> cache
> >> which simply
> >> stores every cache item in a single file on disk
> >> (groups are directories).
> > 
> > I thought of making an implementation like that,
> but
> > it can make too many files.   . . .  The indexed
> disk
> 
> Some ten thousands, yes. But since most of the cache
> is held
> in memory this is no problem.
> 
> > cache is the fastest way to go.  It's keeps a
> handle
> > on the data file and just skips into position to
> read.
> 
> We emphasize on persistence. We also patched JCS to
> write cache items
> immediately to disk and not wait until memory "flows
> over".
> 
> It's important for us that in case of server crashes
> or whatever we
> can restart the server and it gets up - which it
> doesn't in high-traffic
> situation without cache.
> 
> > Yes, of course.  You don't use your OLTP database
> for
> > the cache.  You run additional MySQL instances for
> > cached data . . .  For JCS I run a remote server
> > cluster.  Each is backed by its own MySQL instance
> > running on the same box as the JCS server.  
> 
> Okay, so I'm going to have a shot at the NFS idea
> and if it
> fails I'll try this.
> 
> Thanks a lot!
> Timo
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jcs-users-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jcs-users-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Re: Storing disk cache on NFS

Posted by Timo Nentwig <tn...@verisign.com>.
Aaron Smuts wrote:
>> I forgot to mention that we wrote our own disk cache
>> which simply
>> stores every cache item in a single file on disk
>> (groups are directories).
> 
> I thought of making an implementation like that, but
> it can make too many files.   . . .  The indexed disk

Some ten thousands, yes. But since most of the cache is held
in memory this is no problem.

> cache is the fastest way to go.  It's keeps a handle
> on the data file and just skips into position to read.

We emphasize on persistence. We also patched JCS to write cache items
immediately to disk and not wait until memory "flows over".

It's important for us that in case of server crashes or whatever we
can restart the server and it gets up - which it doesn't in high-traffic
situation without cache.

> Yes, of course.  You don't use your OLTP database for
> the cache.  You run additional MySQL instances for
> cached data . . .  For JCS I run a remote server
> cluster.  Each is backed by its own MySQL instance
> running on the same box as the JCS server.  

Okay, so I'm going to have a shot at the NFS idea and if it
fails I'll try this.

Thanks a lot!
Timo

---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Re: Storing disk cache on NFS

Posted by Aaron Smuts <as...@yahoo.com>.
> I forgot to mention that we wrote our own disk cache
> which simply
> stores every cache item in a single file on disk
> (groups are directories).

I thought of making an implementation like that, but
it can make too many files.   . . .  The indexed disk
cache is the fastest way to go.  It's keeps a handle
on the data file and just skips into position to read.
. . .

> 
> > You can use the jdbc disk cache backed by mysql. 
> It
> > can be shared.
> 
> We use JCS mainly because of DB load problems :)

Yes, of course.  You don't use your OLTP database for
the cache.  You run additional MySQL instances for
cached data . . .  For JCS I run a remote server
cluster.  Each is backed by its own MySQL instance
running on the same box as the JCS server.  

Aaron



---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Re: Storing disk cache on NFS

Posted by Timo Nentwig <tn...@verisign.com>.
Aaron Smuts wrote:
> The indexed disk cache cannot share its files.  Since
> it keeps the keys in memory, another client wouldn't
> know what data was on disk.

I forgot to mention that we wrote our own disk cache which simply
stores every cache item in a single file on disk (groups are directories).

> You can use the jdbc disk cache backed by mysql.  It
> can be shared.

We use JCS mainly because of DB load problems :)

---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Re: Storing disk cache on NFS

Posted by Aaron Smuts <as...@yahoo.com>.
The indexed disk cache cannot share its files.  Since
it keeps the keys in memory, another client wouldn't
know what data was on disk.

You can use the jdbc disk cache backed by mysql.  It
can be shared.

Cheers,

Aaron

--- Timo Nentwig <tn...@verisign.com> wrote:

> Hello everybody,
> 
> I came up with a quite simple idea to share cache
> between multiple servers: putting the disk
> cache in an NFS share.
> 
> Has somebody already done this? Or don't I even have
> to try for certain reasons?
> 
> Thanks a lot
> Timo
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jcs-users-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jcs-users-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org