Page 1 of 1
cahce expiry period - what number offers the best performanc
Posted: Wed Jun 08, 2011 10:03 pm
by jeffhamm
Trying to maximize Read performance. A couple of quick questions:
1) What is the max value you can use for the cache expiry setting?
2) Will setting this to the max be best from a performance perspective?
3) Any pitfalls to setting this to the max value?
Thanks,
Jeff
Re: cahce expiry period - what number offers the best performanc
Posted: Thu Jun 09, 2011 12:59 pm
by deiruch
I believe the value only applies to the write back cache. So it doesn't matter what you use there for read performance.
The value specified how long unwritten things can stay in the write back cache. If you set it to 37 seconds, you will lose at most 37 seconds worth of data in the event of a sudden power loss (or something similar).
Re: cahce expiry period - what number offers the best performanc
Posted: Thu Jun 09, 2011 7:34 pm
by Max (staff)
Deiruch is correct here, playing with WriteBack expiry periods is not the best idea - if you are using a single SAN - go for write through caching, the maximum size which worked in my environment was 1gb/1TB of storage for synthetic tests, need to run some VM tests too
Re: cahce expiry period - what number offers the best performanc
Posted: Thu Jun 09, 2011 9:45 pm
by jeffhamm
We're using 2 boxes in HA mode, so no worries on using write back caching. But I thought there was a read cache as well? Or is there only a write cache?
Thanks,
Jeff
Re: cahce expiry period - what number offers the best performanc
Posted: Fri Jun 10, 2011 11:17 am
by Max (staff)
You're right - in case of HA Write back is the best one, you just didn't mention it in the first post.
StarWind's caching is used both for reads and writes, currently manual distribution is not available.
Re: cahce expiry period - what number offers the best performanc
Posted: Tue Jun 14, 2011 2:17 pm
by jeffhamm
So just to make sure I'm clear on this, the cache expiry period applies ONLY to the write back cache, NOT to the read cache - is this correct?
Re: cahce expiry period - what number offers the best performanc
Posted: Tue Jun 14, 2011 2:50 pm
by Max (staff)
The expiry period specifies the time which should pass before the written block is flushed to the disk (but not removed from the cache until it is overwritten with other data)
Re: cahce expiry period - what number offers the best performanc
Posted: Wed Jun 15, 2011 8:32 pm
by deiruch
jeffhamm wrote:So just to make sure I'm clear on this, the cache expiry period applies ONLY to the write back cache, NOT to the read cache - is this correct?
Correct.
(When would discarding cached data ever make sense? [Except under memory pressure])
Re: cahce expiry period - what number offers the best performanc
Posted: Fri Jun 17, 2011 6:14 am
by anton (staff)
Discarding (freeing memory w/o data written to disk) cache is an extremely effective way to render whole volume useless. As a result who-knows-how-many last writes would not reach the medium. So the answer to you question is: NEVER.
deiruch wrote:jeffhamm wrote:So just to make sure I'm clear on this, the cache expiry period applies ONLY to the write back cache, NOT to the read cache - is this correct?
Correct.
(When would discarding cached data ever make sense? [Except under memory pressure])
Re: cahce expiry period - what number offers the best performanc
Posted: Fri Jun 17, 2011 2:02 pm
by deiruch
anton (staff) wrote:Discarding (freeing memory w/o data written to disk) cache is an extremely effective way to render whole volume useless. As a result who-knows-how-many last writes would not reach the medium. So the answer to you question is: NEVER.
deiruch wrote:(When would discarding cached data ever make sense? [Except under memory pressure])
That was a rhethorical question

. Also I was talking about read caches (should've written that more clearly) which can be discarded always without problems but usually are kept as long as possible.
Re: cahce expiry period - what number offers the best performanc
Posted: Fri Jun 17, 2011 2:22 pm
by anton (staff)
Read caches don't have influence on anything. They are dropped on LRU (Least Recently Used) basis after hitting upper watermark for free physical memory usage. AFAIK it's 80% or so.
deiruch wrote:anton (staff) wrote:Discarding (freeing memory w/o data written to disk) cache is an extremely effective way to render whole volume useless. As a result who-knows-how-many last writes would not reach the medium. So the answer to you question is: NEVER.
deiruch wrote:(When would discarding cached data ever make sense? [Except under memory pressure])
That was a rhethorical question

. Also I was talking about read caches (should've written that more clearly) which can be discarded always without problems but usually are kept as long as possible.