 Open Flags 调研© XXX Page 1 of 23 open flags 调研(已实现)© XXX Page 2 of 23 open接口原型 open flags flags定义 flags的含义 libfuse open open flags 在curvefs上的测试 open flags 实现方式 整体flags支持方案 具体flag的实现方案 O_TRUNC I/O模式类 O_DIRECT O_SYNC FASYNC, O_TMPFILE 结论 参考文献 open接口原型 # man page open, openat, creat - open and possibly create a file #include Open Flags 调研© XXX Page 1 of 23 open flags 调研(已实现)© XXX Page 2 of 23 open接口原型 open flags flags定义 flags的含义 libfuse open open flags 在curvefs上的测试 open flags 实现方式 整体flags支持方案 具体flag的实现方案 O_TRUNC I/O模式类 O_DIRECT O_SYNC FASYNC, O_TMPFILE 结论 参考文献 open接口原型 # man page open, openat, creat - open and possibly create a file #include- int open(const char *pathname, int flags); int open(const char *pathname, int flags int flags, mode_t mode); int openat2(int dirfd, const char *pathname, const struct open_how *how, size_t size); open系统调用会打开pathname指定的文件(如果不存在,如果携带O_CREAT flag则会创建),返回一个文件描述符fd(该fd是进程打开文件描述符表的index), 0 码力 | 23 页 | 524.47 KB | 6 月前3
 OID CND Asia Slide: CurveFSstorage Design objectives Achievements in CURVE Key designs used by CURVE CURVE Roadmap CURVE Community You can take awayWhy develop Storage requirements ● Hardware requirements ○ more CPU cores, with data locations ● Requirements for elastic block storage ● Requirements for file systemopen-source storage ● Requirements ○ Cloud Native ○ Easy operation and maintenance ○ High performance ● storage � Design objectives Achievements in CURVE Key designs used by CURVE CURVE Roadmap CURVE Community You can take awayDesign objectives App scenario & requires ● Database scenario ● Elastic block0 码力 | 24 页 | 3.47 MB | 6 月前3 OID CND Asia Slide: CurveFSstorage Design objectives Achievements in CURVE Key designs used by CURVE CURVE Roadmap CURVE Community You can take awayWhy develop Storage requirements ● Hardware requirements ○ more CPU cores, with data locations ● Requirements for elastic block storage ● Requirements for file systemopen-source storage ● Requirements ○ Cloud Native ○ Easy operation and maintenance ○ High performance ● storage � Design objectives Achievements in CURVE Key designs used by CURVE CURVE Roadmap CURVE Community You can take awayDesign objectives App scenario & requires ● Database scenario ● Elastic block0 码力 | 24 页 | 3.47 MB | 6 月前3
 CurveBS IO Processing FlowThe client provids posix-like interface, such as read/write/aioread/aiowrite in data plane and open/create/rename/extend, etc in control plane. 2. Depending on libCurve, the application must be restarted consistency protocol which needs all replicas successful, it provides lower write latencies. Ceph community have compared majority replicas case with all replicas case on write latency difference: https://github0 码力 | 13 页 | 2.03 MB | 6 月前3 CurveBS IO Processing FlowThe client provids posix-like interface, such as read/write/aioread/aiowrite in data plane and open/create/rename/extend, etc in control plane. 2. Depending on libCurve, the application must be restarted consistency protocol which needs all replicas successful, it provides lower write latencies. Ceph community have compared majority replicas case with all replicas case on write latency difference: https://github0 码力 | 13 页 | 2.03 MB | 6 月前3
 curvefs client删除文件和目录功能设计* unlink, rmdir or rename will be followed closely by forget * unless the file or directory is open, in which case the * kernel issues forget only after the release or releasedir * calls. * 不应该完全依赖forget接口去实现inode的移除,因为forget接口可能不会被内核调用(例如client崩溃) 相关调研 moosefs moosefs 未对接forget moosefs 实现了在mds上open,因此删除时可以判断文件是否被打开 moosefs使用了两种机制,来实现上述功能,分别是trash机制和reserve机制(最新版本叫sustained),两种机制如下: trash机制: 对 文件的客户端因为持有该节点inodeid,所以不影响它对该文件的读写操作,当所有客户端都关闭该文件后,该文 件节点才会从 被清除。 reserve 使用了session机制,记录client端的open状态 通过META文件系统访问reserve 使用CUTOMA_FUSE_RESERVED_INODES消息保持和释放inode 实现了Timer,定期判断是否还有session,如果没有client打开,则进行清理。0 码力 | 15 页 | 325.42 KB | 6 月前3 curvefs client删除文件和目录功能设计* unlink, rmdir or rename will be followed closely by forget * unless the file or directory is open, in which case the * kernel issues forget only after the release or releasedir * calls. * 不应该完全依赖forget接口去实现inode的移除,因为forget接口可能不会被内核调用(例如client崩溃) 相关调研 moosefs moosefs 未对接forget moosefs 实现了在mds上open,因此删除时可以判断文件是否被打开 moosefs使用了两种机制,来实现上述功能,分别是trash机制和reserve机制(最新版本叫sustained),两种机制如下: trash机制: 对 文件的客户端因为持有该节点inodeid,所以不影响它对该文件的读写操作,当所有客户端都关闭该文件后,该文 件节点才会从 被清除。 reserve 使用了session机制,记录client端的open状态 通过META文件系统访问reserve 使用CUTOMA_FUSE_RESERVED_INODES消息保持和释放inode 实现了Timer,定期判断是否还有session,如果没有client打开,则进行清理。0 码力 | 15 页 | 325.42 KB | 6 月前3
 CurveFS Client 概要设计1 of 11 CurveFS Client 概要设计(已实现)© XXX Page 2 of 11 背景 概述 关键接口分析 init destroy lookup write read open create & mknod mkdir forget unlink rmdir opendir readdir getattr & setattr access rename symlink & +readlink +mknod© XXX Page 4 of 11 +mkdir +unlink +rmdir +symlink +rename +link +open +read +write +flush +release +fsync +opendir +readdir +releasedir +fsyncdir len]数据。(这里同样要考虑4k对齐的问题,如果不对齐,则需要读取对齐的区域,然后去掉多读的部分)(读写可以做数据缓存, 当前先不考虑)。 open void (*open) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi); posix语义中open支持的oflag主要有: O_RDONLY 只读打开 O_WRONLY 只写打开 O_RDWR 读写打开0 码力 | 11 页 | 487.92 KB | 6 月前3 CurveFS Client 概要设计1 of 11 CurveFS Client 概要设计(已实现)© XXX Page 2 of 11 背景 概述 关键接口分析 init destroy lookup write read open create & mknod mkdir forget unlink rmdir opendir readdir getattr & setattr access rename symlink & +readlink +mknod© XXX Page 4 of 11 +mkdir +unlink +rmdir +symlink +rename +link +open +read +write +flush +release +fsync +opendir +readdir +releasedir +fsyncdir len]数据。(这里同样要考虑4k对齐的问题,如果不对齐,则需要读取对齐的区域,然后去掉多读的部分)(读写可以做数据缓存, 当前先不考虑)。 open void (*open) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi); posix语义中open支持的oflag主要有: O_RDONLY 只读打开 O_WRONLY 只写打开 O_RDWR 读写打开0 码力 | 11 页 | 487.92 KB | 6 月前3
 CurveFS Copyset与FS对应关系copyset个数是否可以动态调整? 4、curvefs的topo信息 5、curvefs mds和metaserver的心跳 6、详细设计 6.1 创建fs 6.2、挂载fs 6.3、创建文件/目录 6.4、open流程 6.5、读写流程 6.6、topology 7、工作评估 7.1 client端 7.2 mds端 7.3 metaserver端 metaserver 子模块拆分 8、inode和dentry的内存估算 of 19© XXX Page 13 of 19 6.4、open流程© XXX Page 14 of 19© XXX Page 15 of 19 6.5、读写流程 读写流程和之前的读写流程大致保持不变。变化点在于之前inode修改是直接去metaserver上修改,现在变成了去copyset上修改。 client端缓存所有open的inode,读写的时候,根据inode的元数据,去对应的v0 码力 | 19 页 | 383.29 KB | 6 月前3 CurveFS Copyset与FS对应关系copyset个数是否可以动态调整? 4、curvefs的topo信息 5、curvefs mds和metaserver的心跳 6、详细设计 6.1 创建fs 6.2、挂载fs 6.3、创建文件/目录 6.4、open流程 6.5、读写流程 6.6、topology 7、工作评估 7.1 client端 7.2 mds端 7.3 metaserver端 metaserver 子模块拆分 8、inode和dentry的内存估算 of 19© XXX Page 13 of 19 6.4、open流程© XXX Page 14 of 19© XXX Page 15 of 19 6.5、读写流程 读写流程和之前的读写流程大致保持不变。变化点在于之前inode修改是直接去metaserver上修改,现在变成了去copyset上修改。 client端缓存所有open的inode,读写的时候,根据inode的元数据,去对应的v0 码力 | 19 页 | 383.29 KB | 6 月前3
 TGT服务器的优化修复损坏的副本,并且可扩容。无论在可靠性、稳定性还是性价比方面都很有优势, 使用廉价硬件搭建。iSCSI软件 • Client端: iscsi initiator,系统自带 • Linux open-iscsi • Windows iSCSI 发起者 • 服务器端 • 必须是CurveBS原生支持的平台,因为需要curve原生接口,目前是LinuxiSCSI target服务器 • LINUX --lun 1 --params disksize=auto • Initiator 重新发送SCSI READ CAPACITY命令 • Windows 磁盘管理器refresh • Linux open-iscsi, iscsiadm --mode node -RDPO & FUA • DPO是disable page out的缩写,FUA是force unit access的缩写 • FUA0 码力 | 15 页 | 637.11 KB | 6 月前3 TGT服务器的优化修复损坏的副本,并且可扩容。无论在可靠性、稳定性还是性价比方面都很有优势, 使用廉价硬件搭建。iSCSI软件 • Client端: iscsi initiator,系统自带 • Linux open-iscsi • Windows iSCSI 发起者 • 服务器端 • 必须是CurveBS原生支持的平台,因为需要curve原生接口,目前是LinuxiSCSI target服务器 • LINUX --lun 1 --params disksize=auto • Initiator 重新发送SCSI READ CAPACITY命令 • Windows 磁盘管理器refresh • Linux open-iscsi, iscsiadm --mode node -RDPO & FUA • DPO是disable page out的缩写,FUA是force unit access的缩写 • FUA0 码力 | 15 页 | 637.11 KB | 6 月前3
 MySQL 兼容性可以做到什么程度like a duck, swims like a duck, and quacks like a duck, then it probably is a duck.业务系统 上游 Single Source of Truth 问题背景 数据孤岛怎么办? 下游MySQL 怎么做 Binlog Maxwell DebeziumPolarDB-X 完全兼容 MySQL Binlog 可行性 • • Flink CDC 性能指标 • 25w rps • 8GB 大事务 • 5s 延迟* 下一步 • 验证更多工具 • GTID • 多流业务系统 上游 Single Source of Truth 问题背景 已有系统迁移怎么办? 下游Demo for ReplicationPolarDB-X Replication 特性详情 提供与 MySQL 主备复制的能力 产品体验0 码力 | 18 页 | 3.02 MB | 6 月前3 MySQL 兼容性可以做到什么程度like a duck, swims like a duck, and quacks like a duck, then it probably is a duck.业务系统 上游 Single Source of Truth 问题背景 数据孤岛怎么办? 下游MySQL 怎么做 Binlog Maxwell DebeziumPolarDB-X 完全兼容 MySQL Binlog 可行性 • • Flink CDC 性能指标 • 25w rps • 8GB 大事务 • 5s 延迟* 下一步 • 验证更多工具 • GTID • 多流业务系统 上游 Single Source of Truth 问题背景 已有系统迁移怎么办? 下游Demo for ReplicationPolarDB-X Replication 特性详情 提供与 MySQL 主备复制的能力 产品体验0 码力 | 18 页 | 3.02 MB | 6 月前3
 Curve for CNCF Mainmagnification PERFORMANCE High Need to optimize rocksdbCurveFS Features • CurveFS can manage storages (open cloud storage and on-prem storage) and expose unified file space for app accessing • RAFT for0 码力 | 21 页 | 4.56 MB | 6 月前3 Curve for CNCF Mainmagnification PERFORMANCE High Need to optimize rocksdbCurveFS Features • CurveFS can manage storages (open cloud storage and on-prem storage) and expose unified file space for app accessing • RAFT for0 码力 | 21 页 | 4.56 MB | 6 月前3
 NJSD eBPF 技术文档 - 0924版本差异⼤,延迟⾼FUSE⽂件IO读写流程 • 场景1 pytorch example word_language_model • LOOKUP inode 返回 fstat + timeout设置 • OPEN 打开 inode返回ok • GETATTR 返回fstat • READ inode 读取的内容不等从16KB到128KB • 关闭⽂件时会发送FLUSH请求和RELEASE请求0 码力 | 20 页 | 7.40 MB | 6 月前3 NJSD eBPF 技术文档 - 0924版本差异⼤,延迟⾼FUSE⽂件IO读写流程 • 场景1 pytorch example word_language_model • LOOKUP inode 返回 fstat + timeout设置 • OPEN 打开 inode返回ok • GETATTR 返回fstat • READ inode 读取的内容不等从16KB到128KB • 关闭⽂件时会发送FLUSH请求和RELEASE请求0 码力 | 20 页 | 7.40 MB | 6 月前3
共 16 条
- 1
- 2













