




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、gfs: the google file system brad karp ucl computer science cs z03 / 4030 30th october, 2006 2 motivating application: google crawl the whole web store it all on “one big disk” process users searches on “one big cpu” more storage, cpu required than one pc can offer custom parallel supercomputer: expe
2、nsive (so much so not really available today) 3 cluster of pcs as supercomputer lots of cheap pcs, each with disk and cpu high aggregate storage capacity spread search processing across many cpus how to share data among pcs? ivy: shared virtual memory fine-grained, relatively strong consistency at l
3、oad/store level fault tolerance? nfs: share fs from one server, many clients goal: mimic original unix local fs semantics compromise: close-to-open consistency (performance) fault tolerance? gfs: file system for sharing data on clusters, designed with googles application workload specifically in min
4、d 4 google platform characteristics 100s to 1000s of pcs in cluster cheap, commodity parts in pcs many modes of failure for each pc: app bugs, os bugs human error disk failure, memory failure, net failure, power supply failure connector failure monitoring, fault tolerance, auto-recovery essential 5
5、google file system: design criteria detect, tolerate, recover from failures automatically large files, = 100 mb in size large, streaming reads (= 1 mb in size) read once large, sequential writes that append write once concurrent appends by multiple clients (e.g., producer-consumer queues) want atomi
6、city for appends without synchronization overhead among clients 6 gfs: architecture one master server (state replicated on backups) many chunk servers (100s 1000s) spread across racks; intra-rack b/w greater than inter-rack chunk: 64 mb portion of file, identified by 64- bit, globally unique id many
7、 clients accessing same and different files stored on same cluster 7 gfs: architecture (2) 8 master server holds all metadata: namespace (directory hierarchy) access control information (per-file) mapping from files to chunks current locations of chunks (chunkservers) manages chunk leases to chunkse
8、rvers garbage collects orphaned chunks migrates chunks between chunkservers holds all metadata in ram; very fast operations on file system metadata 9 chunkserver stores 64 mb file chunks on local disk using standard linux filesystem, each with version number and checksum read/write requests specify
9、chunk handle and byte range chunks replicated on configurable number of chunkservers (default: 3) no caching of file data (beyond standard linux buffer cache) 10 client issues control (metadata) requests to master server issues data requests directly to chunkservers caches metadata does no caching o
10、f data no consistency difficulties among clients streaming reads (read once) and append writes (write once) dont benefit much from caching at client 11 client api is gfs a filesystem in traditional sense? implemented in kernel, under vnode layer? mimics unix semantics? no; a library apps can link in
11、 for storage access api: open, delete, read, write (as expected) snapshot: quickly create copy of file append: at least once, possibly with gaps and/or inconsistencies among clients 12 client read client sends master: read(file name, chunk index) masters reply: chunk id, chunk version number, locati
12、ons of replicas client sends “closest” chunkserver w/replica: read(chunk id, byte range) “closest” determined by ip address on simple rack- based network topology chunkserver replies with data 13 client write some chunkserver is primary for each chunk master grants lease to primary (typically for 60
13、 sec.) leases renewed using periodic heartbeat messages between master and chunkservers client asks server for primary and secondary replicas for each chunk client sends data to replicas in daisy chain pipelined: each replica forwards as it receives takes advantage of full-duplex ethernet links 14 c
14、lient write (2) all replicas acknowledge data write to client client sends write request to primary primary assigns serial number to write request, providing ordering primary forwards write request with same serial number to secondaries secondaries all reply to primary after completing write primary
15、 replies to client 15 client write (3) 16 gfs: consistency model changes to namespace (i.e., metadata) are atomic done by single master server! master uses log to define global total order of namespace-changing operations data changes more complicated consistent: file region all clients see as same,
16、 regardless of replicas they read from defined: after data mutation, file region that is consistent, and all clients see that entire mutation 17 gfs: data mutation consistency record append completes at least once, at offset of gfs choosing apps must cope with record append semantics writerecord app
17、end serial success defined defined interspersed with inconsistent concurrent success consistent but undefined failureinconsistent 18 applications and record append semantics applications should include checksums in records they write using record append reader can identify padding / record fragments
18、 using checksums if application cannot tolerate duplicated records, should include unique id in record reader can use unique ids to filter duplicates 19 logging at master master has all metadata information lose it, and youve lost the filesystem! master logs all client requests to disk sequentially
19、replicates log entries to remote backup servers only replies to client after log entries safe on disk on self and backups! 20 chunk leases and version numbers if no outstanding lease when client requests write, master grants new one chunks have version numbers stored on disk at master and chunkserve
20、rs each time master grants new lease, increments version, informs all replicas master can revoke leases e.g., when client requests rename or snapshot of file 21 what if the master reboots? replays log from disk recovers namespace (directory) information recovers file-to-chunk-id mapping asks chunkse
21、rvers which chunks they hold recovers chunk-id-to-chunkserver mapping if chunk server has older chunk, its stale chunk server down at lease renewal if chunk server has newer chunk, adopt its version number master may have failed while granting lease 22 what if chunkserver fails? master notices missi
22、ng heartbeats master decrements count of replicas for all chunks on dead chunkserver master re-replicates chunks missing replicas in background highest priority for chunks missing greatest number of replicas 23 file deletion when client deletes file: master records deletion in its log file renamed to hidden name incl
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 护理进修培训课件
- 2024年无锡市工会社会工作者招聘考试真题
- 2024年甘肃庆阳职业技术学院引进笔试真题
- 开放式创新模式-第5篇-洞察及研究
- 农作物秸秆能源化途径-洞察及研究
- 高二升高三数学暑假作业12 空间向量与立体几何(含空间距离与空间角)(原卷版)
- 心律失常治疗及护理讲课件
- 记账实操-非营利组织会计处理分录实例
- 八年级语文一卷八年级语文(二卷试题)
- 小学四年级健康教育课讲课件
- 2025至2030中国混凝土外加剂市场供需发展及经营管理风险预警报告
- 青海中考地理试题及答案
- 《中心静脉导管的护理》课件
- 城市轨道交通应急处理自然灾害应急处理课件
- 新疆维吾尔自治区2024年普通高校招生普通类国家及地方专项、南疆单列、对口援疆计划 本科二批次投档情况 (理工)
- 基础会计教学质量分析报告
- 《宏观经济学原理》课件
- 2025新人教版七下英语单词默写表
- 2024年保山市小升初英语考试模拟试题及答案解析
- 《急性胰腺炎诊治》课件
- 变压器知识点培训课件
评论
0/150
提交评论