Showing posts with label Hardware. Show all posts
Showing posts with label Hardware. Show all posts
Wednesday, January 13, 2016
Thursday, October 8, 2015
Github Architecture
How We Made GitHub Fast
We expose three primary protocols to end users of GitHub: HTTP, SSH, and Git. When browsing the site with your favorite browser, you’re using HTTP. When you clone, pull, or push to a private URL like git@github.com:mojombo/jekyll.git you’re doing so via SSH. When you clone or pull from a public repository via a URL like
Tracing an SSH Request
http://githubengineering.com/rearchitecting-github-pages/
using simple components that we understand and avoiding prematurely solving problems that aren't yet problems.
We use DRBD to sync Pages site data between the two machines in each pair. DRBD lets us synchronously replicate all filesystem changes from the active machine to the standby machine, ensuring that the standby machine is always up to date and ready to take over from the active at a moment's notice — say for example if the active machine crashes or we need to take it down for maintenance.
Distributed Replicated Block Device
Local -> Networked -> Net-Shard -> GitRPC
Automate Everything
Be stable ==> deploy constantly
http://www.infoq.com/presentations/github-evolution
http://www.zhihu.com/question/20056542
可以看到 github 主要是依赖于整个流程的优化,比如 cache 和 load-balancer。他们应该是还没有开发自己的文件系统的需要。
而且虽然管理了很多文件,但是通过 git 进行的操作 (主要是 git clone 和 git push),并不是一个个文件来的,没有大量频繁的文件存取。而通过网站的访问,估计 cache 会很起作用。
http://schacon.github.io/gitbook/7_transfer_protocols.html
Video:
http://www.infoq.com/presentations/GitHub-Pages-Riak-Webmachine
We expose three primary protocols to end users of GitHub: HTTP, SSH, and Git. When browsing the site with your favorite browser, you’re using HTTP. When you clone, pull, or push to a private URL like git@github.com:mojombo/jekyll.git you’re doing so via SSH. When you clone or pull from a public repository via a URL like
git://github.com/mojombo/jekyll.gityou’re using the Git protocol.Tracing an SSH Request
If you run a command like git clone tom@frost:mojombo/bert, what Git is doing behind the scenes is SSHing to
frost, authenticating as the tom user, and then remotely executing git upload-pack mojombo/bert. Now your client can talk to that process on the remote server by simply reading and writing over the SSH connection. Neat, huh?
Of course, allowing arbitrary execution of commands is unsafe, so SSH includes the ability to restrict what commands can be executed. In a very simple case, you can restrict execution togit-shell which is included with Git. All this script does is check the command that you’re trying to execute and ensure that it’s one of
git upload-pack, git receive-pack, or git upload-archive. If it is indeed one of those, it uses exec to replace the current process with that new process. After that, it’s as if you had just executed that command directly.
First, your Git client initiates an SSH session. The connection comes down off the internet and hits our load balancer.
From there, the connection is sent to one of the frontends where SSHD accepts it. We have patched our SSH daemon to perform public key lookups from our MySQL database. Your key identifies your GitHub user and this information is sent along with the original command and arguments to our proprietary script called Gerve (Git sERVE). Think of Gerve as a super smart version of
git-shell.
Gerve verifies that your user has access to the repository specified in the arguments. If you are the owner of the repository, no database lookups need to be performed, otherwise several SQLqueries are made to determine permissions.
Once access has been verified, Gerve uses Chimney to look up the route for the owner of the repository. The goal now is to execute your original command on the proper file server and hook your local machine up to that process. What better way to do this than with another remote SSH execution!
I know it sounds crazy but it works great. Gerve simply uses
exec(3) to replace itself with a call tossh git@<route> <command> <arg>. After this call, your client is hooked up to a process on a frontend machine which is, in turn, hooked up to a process on a file server.using simple components that we understand and avoiding prematurely solving problems that aren't yet problems.
If the router experiences any error during a query, it'll retry the query a number of times, reconnecting to a different read replica each time. We also use ngx_lua'sshared memory zones to cache routing lookups on the pages-fe node for 30 seconds to reduce load on our MySQL infrastructure and also allow us to tolerate blips a little better.
Since we're querying read replicas, we can tolerate downtime or failovers of the MySQL master. This means that existing Pages will remain online even during database maintenance windows where we have to take the rest of the site down.
We also have Fastly sitting in front of GitHub Pages caching all 200 responses. This helps minimise the availability impact of a total Pages router outage. Even in this worst case scenario, cached Pages sites are still online and unaffected.
Fileserver tierWe use DRBD to sync Pages site data between the two machines in each pair. DRBD lets us synchronously replicate all filesystem changes from the active machine to the standby machine, ensuring that the standby machine is always up to date and ready to take over from the active at a moment's notice — say for example if the active machine crashes or we need to take it down for maintenance.
Distributed Replicated Block Device
DRBD® software is a distributed replicated storage system for the Linux platform. It is implemented as several userspace management applications and some shell scripts and is normally used on high availability (HA) computer clusters.
DRBD layers logical block devices (conventionally named /dev/drbdX, where X is the device minor number) over existing local block devices on participating cluster nodes. Writes to the primary node are transferred to the lower-level block device and simultaneously propagated to the secondary node. The secondary node then transfers data to its corresponding lower-level block device. All read I/O is performed locally.
Should the primary node fail, a cluster management process promotes the secondary node to a primary state. This transition may require a subsequent verification of the integrity of the file system stacked on top of DRBD, by way of a filesystem check or a journal replay. When the failed ex-primary node returns, the system may (or may not) raise it to primary level again, after device data resynchronization. DRBD's synchronization algorithm is efficient in the sense that only those blocks that were changed during the outage must be resynchronized, rather than the device in its entirety.
In RAID, the redundancy exists in a layer transparent to the storage-using application. While there are two storage devices, there is only one instance of the application and the application is not aware of multiple copies. When the application reads, the RAID layer chooses the storage device to read. When a storage device fails, the RAID layer chooses to read the other, without the application instance knowing of the failure.
In contrast, with DRBD there are two instances of the application, and each can read only from one of the two storage devices. Should one storage device fail, the application instance tied to that device can no longer read the data. Consequently, in that case that application instance shuts down and the other application instance, tied to the surviving copy of the data, takes over.
Conversely, in RAID, if the single application instance fails, the information on the two storage devices is effectively unusable, but in DRBD, the other application instance can take over.
http://zachholman.com/talk/how-to-build-a-github/Local -> Networked -> Net-Shard -> GitRPC
Automate Everything
Be stable ==> deploy constantly
http://www.infoq.com/presentations/github-evolution
http://www.zhihu.com/question/20056542
可以看到 github 主要是依赖于整个流程的优化,比如 cache 和 load-balancer。他们应该是还没有开发自己的文件系统的需要。
而且虽然管理了很多文件,但是通过 git 进行的操作 (主要是 git clone 和 git push),并不是一个个文件来的,没有大量频繁的文件存取。而通过网站的访问,估计 cache 会很起作用。
http://schacon.github.io/gitbook/7_transfer_protocols.html
Video:
http://www.infoq.com/presentations/GitHub-Pages-Riak-Webmachine
Labels:
Hardware
Tuesday, October 6, 2015
Hardware Misc
https://www.varnish-cache.org/trac/wiki/ArchitectNotes
Varnish allocate some virtual memory, it tells the operating system to back this memory with space from a disk file. When it needs to send the object to a client, it simply refers to that piece of virtual memory and leaves the rest to the kernel.
If/when the kernel decides it needs to use RAM for something else, the page will get written to the backing file and the RAM page reused elsewhere.
When Varnish next time refers to the virtual memory, the operating system will find a RAM page, possibly freeing one, and read the contents in from the backing file.
More caches.
But there are more caches around, the silicon mafia has more or less stalled at 4GHz CPU clock and to get even that far they have had to put level 1, 2 and sometimes 3 caches between the CPU and the RAM (which is the level 4 cache), there are also things like write buffers, pipeline and page-mode fetches involved, all to make it a tad less slow to pick up something from memory.
And since they have hit the 4GHz limit, but decreasing silicon feature sizes give them more and more transistors to work with, multi-cpu designs have become the fancy of the world, despite the fact that they suck as a programming model.
https://en.wikipedia.org/wiki/CPU_cache
A CPU cache is a cache used by the central processing unit (CPU) of a computer to reduce the average time to access data from the main memory. The cache is a smaller, faster memory which stores copies of the data from frequently used main memory locations. Most CPUs have different independent caches, including instruction and data caches, where the data cache is usually organized as a hierarchy of more cache levels (L1, L2, etc.)
Multi-level caches
To address this tradeoff, many computers use multiple levels of cache, with small fast caches backed up by larger, slower caches. Multi-level caches generally operate by checking the fastest, level 1 (L1) cache first; if it hits, the processor proceeds at high speed. If that smaller cache misses, the next fastest cache (level 2, L2) is checked, and so on, before external memory is checked.
https://www.quora.com/What-is-the-L1-L2-L3-cache-of-a-microprocessor-and-how-does-it-affect-the-performance-of-it
(L1) Level 1 Cache(2KB - 64KB) - Instructions are first searched in this cache. L1 cache very small in comparison to others, thus making it faster than the rest.
(L2) Level 2 Cache(256KB - 512KB) - If the instructions are not present in the L1 cache then it looks in the L2 cache, which is a slightly larger pool of cache, thus accompanied by some latency.
(L3) Level 3 Cache (1MB -8MB) - With each cache miss, it proceeds to the next level cache. This is the largest among the all the cache, even though it is slower, its still faster than the RAM.
128MB L4 cache
The L4 cache acts a victim cache for the L3, meaning that any information evicted from L3 is promptly dumped into L4. The cache is clocked at 1.6GHz — roughly half the clock speed of the CPU.
cpu 4 ghz limit
http://electronics.stackexchange.com/questions/122050/what-limits-cpu-speed
Practically, what limits CPU speed is both the heat generated and the gate delays, but usually, the heat becomes a far greater issue before the latter kicks in.
Recent processors are manufactured using CMOS technology. Every time there is a clock cycle, power is dissipated. Therefore, higher processor speeds means more heat dissipation.
http://en.wikipedia.org/wiki/CMOS
Complementary metal–oxide–semiconductor (CMOS) 互补金属氧化物半导体
You can really see how the CPU transition power increases (exponentially!).
Clock Rate
The clock rate typically refers to the frequency at which a chip like a central processing unit (CPU), one core of a multi-core processor, is running and is used as an indicator of the processor's speed. It is measured in the SI unit hertz. The clock rate of the first generation of computers was measured in hertz or kilohertz, but in the 21st century the speed of modern CPUs is commonly advertised in gigahertz. This metric is most useful when comparing processors within the same family, holding constant other features that may impact performance.
时钟频率(是指同步电路中时钟的基础频率,它以“若干次周期每秒”来度量,量度单位采用SI单位赫兹(Hz)。例如,来自晶振的基准频率通常等于一个固定的正弦波形,则时钟频率就是这个基准频率,电子电路会为数字电子设备将它转化成对应的脉冲方波。需要补充一点的是,“速度”作为矢量不应与标量“频率”相混淆,所以使用“时钟速度”来描述这个概念是用词不当的。
Varnish allocate some virtual memory, it tells the operating system to back this memory with space from a disk file. When it needs to send the object to a client, it simply refers to that piece of virtual memory and leaves the rest to the kernel.
If/when the kernel decides it needs to use RAM for something else, the page will get written to the backing file and the RAM page reused elsewhere.
When Varnish next time refers to the virtual memory, the operating system will find a RAM page, possibly freeing one, and read the contents in from the backing file.
More caches.
But there are more caches around, the silicon mafia has more or less stalled at 4GHz CPU clock and to get even that far they have had to put level 1, 2 and sometimes 3 caches between the CPU and the RAM (which is the level 4 cache), there are also things like write buffers, pipeline and page-mode fetches involved, all to make it a tad less slow to pick up something from memory.
And since they have hit the 4GHz limit, but decreasing silicon feature sizes give them more and more transistors to work with, multi-cpu designs have become the fancy of the world, despite the fact that they suck as a programming model.
https://en.wikipedia.org/wiki/CPU_cache
A CPU cache is a cache used by the central processing unit (CPU) of a computer to reduce the average time to access data from the main memory. The cache is a smaller, faster memory which stores copies of the data from frequently used main memory locations. Most CPUs have different independent caches, including instruction and data caches, where the data cache is usually organized as a hierarchy of more cache levels (L1, L2, etc.)
Multi-level caches
To address this tradeoff, many computers use multiple levels of cache, with small fast caches backed up by larger, slower caches. Multi-level caches generally operate by checking the fastest, level 1 (L1) cache first; if it hits, the processor proceeds at high speed. If that smaller cache misses, the next fastest cache (level 2, L2) is checked, and so on, before external memory is checked.
https://www.quora.com/What-is-the-L1-L2-L3-cache-of-a-microprocessor-and-how-does-it-affect-the-performance-of-it
(L1) Level 1 Cache(2KB - 64KB) - Instructions are first searched in this cache. L1 cache very small in comparison to others, thus making it faster than the rest.
(L2) Level 2 Cache(256KB - 512KB) - If the instructions are not present in the L1 cache then it looks in the L2 cache, which is a slightly larger pool of cache, thus accompanied by some latency.
(L3) Level 3 Cache (1MB -8MB) - With each cache miss, it proceeds to the next level cache. This is the largest among the all the cache, even though it is slower, its still faster than the RAM.
128MB L4 cache
The L4 cache acts a victim cache for the L3, meaning that any information evicted from L3 is promptly dumped into L4. The cache is clocked at 1.6GHz — roughly half the clock speed of the CPU.
cpu 4 ghz limit
http://electronics.stackexchange.com/questions/122050/what-limits-cpu-speed
Practically, what limits CPU speed is both the heat generated and the gate delays, but usually, the heat becomes a far greater issue before the latter kicks in.
Recent processors are manufactured using CMOS technology. Every time there is a clock cycle, power is dissipated. Therefore, higher processor speeds means more heat dissipation.
http://en.wikipedia.org/wiki/CMOS
Complementary metal–oxide–semiconductor (CMOS) 互补金属氧化物半导体
You can really see how the CPU transition power increases (exponentially!).
Clock Rate
The clock rate typically refers to the frequency at which a chip like a central processing unit (CPU), one core of a multi-core processor, is running and is used as an indicator of the processor's speed. It is measured in the SI unit hertz. The clock rate of the first generation of computers was measured in hertz or kilohertz, but in the 21st century the speed of modern CPUs is commonly advertised in gigahertz. This metric is most useful when comparing processors within the same family, holding constant other features that may impact performance.
时钟频率(是指同步电路中时钟的基础频率,它以“若干次周期每秒”来度量,量度单位采用SI单位赫兹(Hz)。例如,来自晶振的基准频率通常等于一个固定的正弦波形,则时钟频率就是这个基准频率,电子电路会为数字电子设备将它转化成对应的脉冲方波。需要补充一点的是,“速度”作为矢量不应与标量“频率”相混淆,所以使用“时钟速度”来描述这个概念是用词不当的。
Labels:
Hardware
Thursday, September 3, 2015
RAID Explained
RAID - Wikipedia, the free encyclopedia
RAID (redundant array of independent disks) is a data storage virtualization technology that combines multiple physical disk drive components into a single logical unit for the purposes of data redundancy, performance improvement, or both.[1]
Data is distributed across the drives in one of several ways, referred to as RAID levels, depending on the required level of redundancy and performance. The different schemas, or data distribution layouts, are named by the word RAID followed by a number, for example RAID 0 or RAID 1. Each schema, or a RAID level, provides a different balance among the key goals: reliability, availability, performance, and capacity. RAID levels greater than RAID 0 provide protection against unrecoverable sector read errors, as well as against failures of whole physical drives.
RAID 0 is used to boost a server's performance. It's also known as "disk striping." With RAID 0, data is written across multiple disks. This means the work that the computer is doing is handled by multiple disks rather than just one, increasing performance because multiple drives are reading and writing data, improving disk I/O.
A minimum of two disks is required. Both software and hardware RAID support RAID 0, as do most controllers.
The downside is that there is no fault tolerance. If one disk fails, then that affects the entire array and the chances for data loss or corruption increases.
http://www.thegeekstuff.com/2010/08/raid-levels-tutorial/
The downside is that RAID 1 causes a slight drag on performance. RAID 1 can be implemented through either software or hardware. A minimum of two disks is required for RAID 1 hardware implementations. With software RAID 1, instead of two physical disks, data can be mirrored between volumes on a single disk.
One additional point to remember is that RAID 1 cuts total disk capacity in half: If a server with two 1TB drives is configured with RAID 1, then total storage capacity will be 1TB not 2TB.
RAID (redundant array of independent disks) is a data storage virtualization technology that combines multiple physical disk drive components into a single logical unit for the purposes of data redundancy, performance improvement, or both.[1]
Data is distributed across the drives in one of several ways, referred to as RAID levels, depending on the required level of redundancy and performance. The different schemas, or data distribution layouts, are named by the word RAID followed by a number, for example RAID 0 or RAID 1. Each schema, or a RAID level, provides a different balance among the key goals: reliability, availability, performance, and capacity. RAID levels greater than RAID 0 provide protection against unrecoverable sector read errors, as well as against failures of whole physical drives.
RAID 0 is used to boost a server's performance. It's also known as "disk striping." With RAID 0, data is written across multiple disks. This means the work that the computer is doing is handled by multiple disks rather than just one, increasing performance because multiple drives are reading and writing data, improving disk I/O.
A minimum of two disks is required. Both software and hardware RAID support RAID 0, as do most controllers.
The downside is that there is no fault tolerance. If one disk fails, then that affects the entire array and the chances for data loss or corruption increases.
http://www.thegeekstuff.com/2010/08/raid-levels-tutorial/
- Minimum 2 disks.
- Excellent performance ( as blocks are striped ).
- No redundancy ( no mirror, no parity ).
- Don’t use this for any critical system.
The downside is that RAID 1 causes a slight drag on performance. RAID 1 can be implemented through either software or hardware. A minimum of two disks is required for RAID 1 hardware implementations. With software RAID 1, instead of two physical disks, data can be mirrored between volumes on a single disk.
One additional point to remember is that RAID 1 cuts total disk capacity in half: If a server with two 1TB drives is configured with RAID 1, then total storage capacity will be 1TB not 2TB.
- Minimum 2 disks.
- Good performance ( no striping. no parity ).
- Excellent redundancy ( as blocks are mirrored ).
RAID Level 5 (Stripe with parity)
• RAID 5 is by far the most common RAID configuration for business servers and enterprise NAS devices.
This RAID level provides better performance than mirroring as well as fault tolerance. With RAID 5, data and parity (which is additional data used for recovery) are striped across three or more disks.
If a disk gets an error or starts to fail, data is recreated from this distributed data and parity block— seamlessly and automatically.
Essentially, the system is still operational even when one disk kicks the bucket and until you can replace the failed drive. Another benefit of RAID 5 is that it allows many NAS and server drives to be "hot-swappable" meaning in case a drive in the array fails, that drive can be swapped with a new drive without shutting down the server or NAS and without having to interrupt users who may be accessing the server or NAS. It's a great solution for fault tolerance because as drives fail (and they eventually will), the data can be rebuilt to new disks as failing disks are replaced. The downside to RAID 5 is the performance hit to servers that perform a lot of write operations.
if a drive in a RAID 5 systems dies and is replaced by a new drive, it takes hours to rebuild the swapped drive. If another drive dies during that time, you still lose all of your data. With RAID 6, the RAID array will even survive that second failure.
RAID 5 is a good all-round system that combines efficient storage with excellent security and decent performance. It is ideal for file and application servers that have a limited number of data drives.
RAID 6 is a good all-round system that combines efficient storage with excellent security and decent performance. It is preferable over RAID 5 in file and application servers that use many large drives for data storage.
Facebook uses raid 6 for its photo system.
RAID Level 10 (Mirror over stripes) combining RAID 1 & RAID 0
Writes are two times slower than reads, because both copies have to be updated. As far as writes are concerned, RAID10 of N disks is the same as RAID0 of N/2 disks.
• RAID 5 is by far the most common RAID configuration for business servers and enterprise NAS devices.
This RAID level provides better performance than mirroring as well as fault tolerance. With RAID 5, data and parity (which is additional data used for recovery) are striped across three or more disks.
If a disk gets an error or starts to fail, data is recreated from this distributed data and parity block— seamlessly and automatically.
Essentially, the system is still operational even when one disk kicks the bucket and until you can replace the failed drive. Another benefit of RAID 5 is that it allows many NAS and server drives to be "hot-swappable" meaning in case a drive in the array fails, that drive can be swapped with a new drive without shutting down the server or NAS and without having to interrupt users who may be accessing the server or NAS. It's a great solution for fault tolerance because as drives fail (and they eventually will), the data can be rebuilt to new disks as failing disks are replaced. The downside to RAID 5 is the performance hit to servers that perform a lot of write operations.
- Minimum 3 disks.
- Good performance ( as blocks are striped ).
- Good redundancy ( distributed parity ).
- Best cost effective option providing both performance and redundancy. Use this for DB that is heavily read oriented. Write operations will be slow.
RAID5 fits as large, reliable, relatively cheap storage.
RAID5 writes data blocks evenly to all the disks, in a pattern similar to RAID0. However, one additional "parity" block is written in each row. This additional parity, derived from all the data blocks in the row, provides redundancy. If one of the drives fails and thus one block in the row is unreadable, the contents of this block can be reconstructed using parity data together with all the remaining data blocks.
If all drives are OK, read requests are distributed evenly across drives, providing read speed similar to that of RAID0. For N disks in the array, RAID0 provides N times faster reads and RAID5 provides (N-1) times faster reads. If one of the drives has failed, the read speed degrades to that of a single drive, because all blocks in a row are required to serve the request.
Write speed of a RAID5 is limited by the parity updates. For each written block, its corresponding parity block has to be read, updated, and then written back. Thus, there is no significant write speed improvement on RAID5, if any at all.
The capacity of one member drive is used to maintain fault tolerance. E.g. if you have 10 drives 1TB each, the resulting RAID5 capacity would be 9TB.
If RAID5 controller fails, you can still recover data from the array with RAID 5 recovery software. Unlike RAID0, RAID5 is redundant and it can survive one member disk failure.
http://www.prepressure.com/library/technology/raid- If a drive fails, you still have access to all data, even while the failed drive is being replaced and the storage controller rebuilds the data on the new drive.
- This is complex technology. If one of the disks in an array using 4TB disks fails and is replaced, restoring the data (the rebuild time) may take a day or longer, depending on the load on the array and the speed of the controller. If another disk goes bad during that time, data are lost forever.
RAID6 is a large, highly reliable, relatively expensive storage.
RAID6 uses a block pattern similar to RAID5, but utilizes two different parity functions to derive two different parity blocks per row. If one of the drives fails, its contents are reconstructed using one set of parity data. If another drive fails before the array is recovered, the contents of the two missing drives are reconstructed by combining the remaining data and two sets of parity.
Read speed of the N-disk RAID6 is (N-2) times faster than the speed of a single drive, similar to RAID levels 0 and 5. If one or two drives fail in RAID6, the read speed degrades significantly because a reconstruction of missing blocks requires an entire row to be read.
There is no significant write speed improvement in RAID6 layout. RAID6 parity updates require even more processing than that in RAID5.
The capacity of two member drives is used to maintain fault tolerance. For an array of 10 drives 1TB each, the resulting RAID6 capacity would be 8TB.
The recovery of the RAID6 from a controller failure is fairly complicated.
if a drive in a RAID 5 systems dies and is replaced by a new drive, it takes hours to rebuild the swapped drive. If another drive dies during that time, you still lose all of your data. With RAID 6, the RAID array will even survive that second failure.
RAID 5 is a good all-round system that combines efficient storage with excellent security and decent performance. It is ideal for file and application servers that have a limited number of data drives.
RAID 6 is a good all-round system that combines efficient storage with excellent security and decent performance. It is preferable over RAID 5 in file and application servers that use many large drives for data storage.
Facebook uses raid 6 for its photo system.
RAID Level 10 (Mirror over stripes) combining RAID 1 & RAID 0
RAID10 is a large, fast, reliable, but expensive storage.
RAID10 uses two identical RAID0 arrays to hold two identical copies of the content.
Read speed of the N-drive RAID10 array is N times faster than that of a single drive. Each drive can read its block of data independently, same as in RAID0 of N disks.
Writes are two times slower than reads, because both copies have to be updated. As far as writes are concerned, RAID10 of N disks is the same as RAID0 of N/2 disks.
Half the array capacity is used to maintain fault tolerance. In RAID10, the overhead increases with the number of disks, contrary to RAID levels 5 and 6, where the overhead is the same for any number of disks. This makes RAID10 the most expensive RAID type when scaled to large capacity.
If there is a controller failure in a RAID10, any subset of the drives forming a complete RAID0 can be recovered in the same way the RAID0 is recovered.
Similarly to RAID 5, several variations of the layout are possible in implementation. For more diagrams, refer here.
It combines the mirroring of RAID 1 with the striping of RAID 0. It's the RAID level that gives the best performance, but it is also costly, requiring twice as many disks as other RAID levels, for a minimum of four. This is the RAID level ideal for highly utilized database servers or any server that's performing many write operations.
- If something goes wrong with one of the disks in a RAID 10 configuration, the rebuild time is very fast since all that is needed is copying all the data from the surviving mirror to a new drive. This can take as little as 30 minutes for drives of 1 TB.
- Half of the storage capacity goes to mirroring, so compared to large RAID 5 or RAID 6 arrays, this is an expensive way to have redundancy.
For most home users, RAID 5 may be overkill, but RAID 1 mirroring provides decent fault tolerance.
Other RAID Levels There are other RAID levels: 2, 3, 4, 7, 0+1...but they are really variants of the main RAID configurations already mentioned, and they're used for specific cases. Here are some short descriptions of each:
•RAID 2 is similar to RAID 5, but instead of disk striping using parity, striping occurs at the bit-level. RAID 2 is seldom deployed because costs to implement are usually prohibitive (a typical setup requires 10 disks) and gives poor performance with some disk I/O operations.
•RAID 3 is also similar to RAID 5, except this solution requires a dedicated parity drive. RAID 3 is seldom used except in the most specialized database or processing environments, which can benefit from it.
•RAID 4 is a configuration in which disk striping happens at the byte level, rather than at the bit-level as in RAID 3.
•RAID 7 is a proprietary level of RAID owned by the now-defunct Storage Computer Corporation.
•RAID 0+1 is often interchanged for RAID 10 (which is RAID 1+0), but the two are not same. RAID 0+1 is a mirrored array with segments that are RAID 0 arrays. It's implemented in specific infrastructures requiring high performance but not a high level of scalability.
•RAID 2 is similar to RAID 5, but instead of disk striping using parity, striping occurs at the bit-level. RAID 2 is seldom deployed because costs to implement are usually prohibitive (a typical setup requires 10 disks) and gives poor performance with some disk I/O operations.
•RAID 3 is also similar to RAID 5, except this solution requires a dedicated parity drive. RAID 3 is seldom used except in the most specialized database or processing environments, which can benefit from it.
•RAID 4 is a configuration in which disk striping happens at the byte level, rather than at the bit-level as in RAID 3.
•RAID 7 is a proprietary level of RAID owned by the now-defunct Storage Computer Corporation.
•RAID 0+1 is often interchanged for RAID 10 (which is RAID 1+0), but the two are not same. RAID 0+1 is a mirrored array with segments that are RAID 0 arrays. It's implemented in specific infrastructures requiring high performance but not a high level of scalability.
RAID is no substitute for back-up!
Read full article from RAID - Wikipedia, the free encyclopedia
Labels:
Hardware,
Review,
System Design,
System Design - Review
Subscribe to:
Posts (Atom)
Labels
Review
(572)
System Design
(334)
System Design - Review
(198)
Java
(189)
Coding
(75)
Interview-System Design
(65)
Interview
(63)
Book Notes
(59)
Coding - Review
(59)
to-do
(45)
Linux
(43)
Knowledge
(39)
Interview-Java
(35)
Knowledge - Review
(32)
Database
(31)
Design Patterns
(31)
Big Data
(29)
Product Architecture
(28)
MultiThread
(27)
Soft Skills
(27)
Concurrency
(26)
Cracking Code Interview
(26)
Miscs
(25)
Distributed
(24)
OOD Design
(24)
Google
(23)
Career
(22)
Interview - Review
(21)
Java - Code
(21)
Operating System
(21)
Interview Q&A
(20)
System Design - Practice
(20)
Tips
(19)
Algorithm
(17)
Company - Facebook
(17)
Security
(17)
How to Ace Interview
(16)
Brain Teaser
(14)
Linux - Shell
(14)
Redis
(14)
Testing
(14)
Tools
(14)
Code Quality
(13)
Search
(13)
Spark
(13)
Spring
(13)
Company - LinkedIn
(12)
How to
(12)
Interview-Database
(12)
Interview-Operating System
(12)
Solr
(12)
Architecture Principles
(11)
Resource
(10)
Amazon
(9)
Cache
(9)
Git
(9)
Interview - MultiThread
(9)
Scalability
(9)
Trouble Shooting
(9)
Web Dev
(9)
Architecture Model
(8)
Better Programmer
(8)
Cassandra
(8)
Company - Uber
(8)
Java67
(8)
Math
(8)
OO Design principles
(8)
SOLID
(8)
Design
(7)
Interview Corner
(7)
JVM
(7)
Java Basics
(7)
Kafka
(7)
Mac
(7)
Machine Learning
(7)
NoSQL
(7)
C++
(6)
Chrome
(6)
File System
(6)
Highscalability
(6)
How to Better
(6)
Network
(6)
Restful
(6)
CareerCup
(5)
Code Review
(5)
Hash
(5)
How to Interview
(5)
JDK Source Code
(5)
JavaScript
(5)
Leetcode
(5)
Must Known
(5)
Python
(5)
Popular Posts
-
-
Related: http://massivetechinterview.blogspot.com/2015/06/n00tc0d3r.html https://puncsky.com/hacking-the-software-engineer-interview#desi...
-
https://leetcode.com/problems/find-median-given-frequency-of-numbers/#/description The Numbers table keeps the value of number and its f...
-
http://www.obsidianscheduler.com/blog/java-concurrency-part-1-semaphores/ So what is semaphore? The simplest way to think of a semaphore ...
-
What is difference between fail-fast and fail-safe? Iterator fail-safe property work with the clone of underlying collection, hence it’s...
-
http://blog.csdn.net/chenyufeng1991/article/details/78242369 在Spring3之前进行类型转换都是使用PropertyEditor,使用PropertyEditor的setAsText()方法可以实现String转...
-
Implement a jigsaw puzzle ~ KodeKnight Implement a jigsaw puzzle. Design the data structures and explain an algorithm to solve the puzzle....
-
https://www.networkworld.com/article/3373502/printing-from-the-linux-command-line.html The lpstat -p command displays the status of a pr...
-
https://richardbarabe.wordpress.com/2014/02/21/java-deadlock-livelock-and-lock-starvation-examples/ Deadlock happens when a process wait...
-
Archives Archives New Posts Updated Posts System Design