LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-14-2014, 01:55 PM   #1
postcd
Member
 
Registered: Oct 2013
Posts: 527

Rep: Reputation: Disabled
How raid controller cache (memory) works?


Hello,

can anyone please explain how raid controller (PCI card) memry (cache) works?

In case i have webhosting server with this raid controller and 2 HDDs attached to it in RAID1..

i mean which data is cached there? How much is it effective when this cache is used on webhosting server?
 
Old 09-14-2014, 02:22 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,345

Rep: Reputation: Disabled
A (hardware) RAID controller may have onboard cache memory. This memory may be used for two different functions:
  1. Read-ahead cache to speed up read operations
  2. Writeback cache to speed up write operations
Read-ahead caching means a program running on the RAID controller CPU monitors read requests from the host OS, and issues its own (at the time superfluous) read requests to cache the contents of sectors near the sector(s) being requested.

This program has to rely on educated guesses to figure out which sectors to read, and sometimes it gets it right (cache hits) while at other times the next read request is for a completely different sector (cache misses). Therefore, the effectiveness of read-ahead caching varies greatly with the read-ahead algorithm used and the actual server load (many vs. few threads/tasks, linear vs. random disk access etc.)

Writeback caching means write requests are marked as completed, even though the data is only stored in cache RAM and is not yet written to the disk(s). The data will be written to disk at a later time, for instance when the controller is less busy or when the read/write heads of the disks are in closer proximity to the relevant sectors. Often the controller is able to consolidate multiple write requests into fewer and far more effective I/O operations.

This is likely to have a significant positive effect on write performance regardless of server load, but there's a certain risk associated with it: if there's a power failure or a sudden reboot, the contents of the cache RAM may not get flushed to disk at all, and the result could be file systems or databases in an inconsistent/broken state.

Some RAID controllers have battery-backed cache RAM to eliminate the risks normally associated with writeback caching.

Last edited by Ser Olmy; 09-14-2014 at 02:23 PM.
 
2 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how to find that we have problem with the cache memory when I have 2 cache and 3 proc rpittala Linux - Newbie 1 02-02-2012 03:46 PM
SHM Memory Counted as Cache Memory with Kernel 2.6.18? kresyzig Programming 4 08-25-2010 11:06 PM
ICP raid controller, no automatic rebuild of raid 5 after replacing bad disk auclark@wsu.edu Linux - Newbie 3 12-14-2009 10:54 AM
RAID controller card override onboard RAID controller? Dr. Psy Linux - Enterprise 1 05-30-2005 10:35 AM
Help Configuring the Memory Used by a Process in RedHat? (Cache Memory on CPU) geogecko Linux - General 3 02-23-2005 03:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration