Software-based VM-centric and flash-friendly VM storage + free version
Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)
-
jeffhamm
- Posts: 47
- Joined: Mon Jan 03, 2011 6:43 pm
Wed Jun 08, 2011 10:03 pm
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
-
deiruch
- Posts: 35
- Joined: Wed May 25, 2011 12:16 pm
Thu Jun 09, 2011 12:59 pm
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).
-
Max (staff)
- Staff
- Posts: 533
- Joined: Tue Apr 20, 2010 9:03 am
Thu Jun 09, 2011 7:34 pm
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
Max Kolomyeytsev
StarWind Software
-
jeffhamm
- Posts: 47
- Joined: Mon Jan 03, 2011 6:43 pm
Thu Jun 09, 2011 9:45 pm
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
-
Max (staff)
- Staff
- Posts: 533
- Joined: Tue Apr 20, 2010 9:03 am
Fri Jun 10, 2011 11:17 am
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.
Max Kolomyeytsev
StarWind Software
-
jeffhamm
- Posts: 47
- Joined: Mon Jan 03, 2011 6:43 pm
Tue Jun 14, 2011 2:17 pm
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?
-
Max (staff)
- Staff
- Posts: 533
- Joined: Tue Apr 20, 2010 9:03 am
Tue Jun 14, 2011 2:50 pm
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)
Max Kolomyeytsev
StarWind Software
-
deiruch
- Posts: 35
- Joined: Wed May 25, 2011 12:16 pm
Wed Jun 15, 2011 8:32 pm
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])
-
anton (staff)
- Site Admin
- Posts: 4021
- Joined: Fri Jun 18, 2004 12:03 am
- Location: British Virgin Islands
-
Contact:
Fri Jun 17, 2011 6:14 am
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])
Regards,
Anton Kolomyeytsev
Chief Technology Officer & Chief Architect, StarWind Software

-
deiruch
- Posts: 35
- Joined: Wed May 25, 2011 12:16 pm
Fri Jun 17, 2011 2:02 pm
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.
-
anton (staff)
- Site Admin
- Posts: 4021
- Joined: Fri Jun 18, 2004 12:03 am
- Location: British Virgin Islands
-
Contact:
Fri Jun 17, 2011 2:22 pm
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.
Regards,
Anton Kolomyeytsev
Chief Technology Officer & Chief Architect, StarWind Software
