SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
Alluxio FUSE在京东的实践
2019-09-01
京东零售 技术与数据中台 数据基础平台部
刘洪通
1 2
3 4
Alluxio FUSE在京东的应用 解读Alluxio FUSE原理和架构
Alluxio FUSE的POSIX兼容性 京东在Alluxio社区的贡献
目录
Alluxio FUSE在京东的应用1
Alluxio FUSE在京东的应用 - 平台架构
4
Alluxio FUSE在京东的应用 – 早期海量文件共享服务
5
劣势
费时
数据从HDFS推送至
Cephfs,约增加一倍耗时
费力
需要数据一致性校
验,耗费大量时间
难度大Ceph集群不易运维,新
手难以掌握
稳定性
内核ceph模块增加
操作系统不稳定性
一写多读
Alluxio FUSE在京东的应用 – 海量文件高速共享服务
6
缺点
• Alluxio FUSE宜采用Direct_IO,无Page Cache加速
• FUSE受限于架构设计,性能不及内核态fs
• Alluxio的稳定性将影响BDP SLA
A
Hadoop Client集成Alluxio
Client,应用编程无感知,只需
替换Schema
B
数据经过Alluxio同步地写穿到
HDFS,耗时只是略微增加,省去
推送环节,较早期模型约缩短一
倍时间
C 不影响操作系统稳定性
D
同样使用Native fs,文件消
费者无感知
Alluxio FUSE在京东的应用 - 备选方案
7
待改进
distributedLoad实际效果相比load性能提升有限,待进一步优化
解读Alluxio FUSE原理和架构
2
解读Alluxio FUSE原理和架构 - 核心架构
 FUSE: Filesystem in Userspace(用户空间文件系统)
AlluxioFuseFileSystem extends FuseStubFS {
+ int create(String path, long mode, FuseFileInfo fi)
+ int open(String path, FuseFileInfo fi)
+ int chmod(String path, long mode)
+ int chown(String path, long uid, long gid)
+ int mkdir(String path, long mode)
+ int readdir(String path, Pointer buff, FuseFillDir filter, long offset,
FuseFileInfo fi)
......
}
1
2
3
4
5
6
AlluxioFuse
jnr-fuse
libfuse
vfs
Alluxio基于jnr-fuse
实现用户态文件系统
的守护进程
fuse 的用户态库
An FUSE implementation
in java using Java Native
Runtime
Virtual File System,
虚拟文件系统
/dev/fuse
fuse模块创建的字符设
备,是内核与libfuse
交互的通道,所有挂载
点(Mount Point)共享
kernel fuse
基于vfs实现的内核模块
解读Alluxio FUSE原理和架构 - 使用方法
 安装依赖
# yum install -y fuse-libs fuse
 配置
# cat alluxio-2.0.0/conf/alluxio-site.properties
alluxio.master.hostname=x.x.x.x
# echo user_allow_other >> /etc/fuse.conf
 挂载Alluxio FUSE
# ./alluxio-2.0.0/integration/fuse/bin/alluxio-fuse mount -o <options> /mountpoint /path/in/alluxio
 查看Alluxio FUSE挂载点
# ./alluxio-2.0.0/integration/fuse/bin/alluxio-fuse stat
pid mount_point alluxio_path
130741 /mountpoint /path/in/alluxio
 查看挂载参数
# mount -t fuse.alluxio-fuse
alluxio-fuse on /mountpoint type fuse.alluxio-fuse 
(rw,nosuid,nodev,relatime,user_id=1001,group_id=1001,allow_other)
 查看存储空间
# df -h -t fuse.alluxio-fuse
Filesystem Size Used Avail Use% Mounted on
alluxio-fuse 211T 53G 211T 1% /mountpoint
 卸载Alluxio FUSE
# ./alluxio-2.0.0/integration/fuse/bin/alluxio-fuse umount /mountpoint
或 # umount /mountpoint
解读Alluxio FUSE原理和架构 - 初始化流程
1. jnr-fuse将AlluxioFuseFileSystem打
包传给libfuse
2. libfuse打开/dev/fuse字符设备,返回
文件描述符fd(File Descriptor)。fd在
进程内的线程间共享,因此fuse很容
易支持multi-thread模式;fd在进程
间不共享,且file支持私有数据,因此
fuse支持多种类型的挂载点
3. mount系统调用传参fd,libfuse和
kernel fuse通过fd这个桥梁建立虚拟
连接
4. super_block和file的私有数据对应虚拟连接
5. multi-thread模式下,多个线程同时从/dev/fuse读取请求
6. 当前无请求时,read系统调用阻塞
7. 当请求到来时,唤醒被阻塞的线程,read返回文件系统请求
解读Alluxio FUSE原理和架构 - mkdir流程
Alluxio FUSE的POSIX兼容性
3
Alluxio FUSE的POSIX兼容性 - 兼容性测试
14
 fstest - 简化版的文件系统POSIX兼容性测试套件
https://www.tuxera.com/community/posix-test-suite/
 使用方法
wget http://download.tuxera.com/sw/qa/pjd-fstest-20080816.tgz
tar xf pjd-fstest-20080816.tgz
cd pjd-fstest-20080816
make
(切记,进入待测试目录!!!)
cd /your/test/dir
整体测试
prove -r pjd-fstest-20080816/tests
单独测试
prove pjd-fstest-20080816/tests/unlink/00.t
 定位失败测试
# strace -T -f -r prove pjd-fstest-20080816/tests/mkfifo/00.t > /tmp/ mkfifo.log 2>&1
[pid 54451] mknod("fstest_34c2d9dbec1aed322d9ffc452ce32469", S_IFIFO|0644 <unfinished ...>
[pid 54451] <... mknod resumed> ) = -1 ENOSYS (Function not implemented) <0.000814>
01
03
02
04
05
06
ext4
极少数失败
kernel ceph
极少数失败
Alluxio-fuse
部分失败
xfs
极少数失败
ceph-fuse
少数失败
hdfs-fuse
大部分失败
Alluxio FUSE的POSIX兼容性 - 兼容性
15
 兼容列表
create, rename, open, unlink
getattr, chmod, chown
mkdir, readdir ,rmdir
read, write, flush
dup2
……
 不兼容列表
不支持在创建文件或目录时指定权限<已解决>
不支持修改文件属主或属组为当前不存在的用户或组
不支持软连接
未检查文件名长度是否超出255 <已解决>
不支持mkfifo, mknod
不支持truncate
不支持扩展属性
不支持fallocate
不支持utimes
不支持append
......
 User & Group
POSIX定义的文件元数据中记录User & Group ID
如果系统中不存在该ID对应的User或Group:
# chown 12345:12345 TODO
stat显示UNKNOWN
# stat TODO
Uid: (12345/ UNKNOWN) Gid: (12345/ UNKNOWN)
ls显示ID
# ls -l TODO
-rw-r--r-- 1 12345 12345 6972 Dec 4 2013 TODO
Alluxio使用User & Group Name
如果系统中不存在该User或Group,则无法转换为ID,
目前折中的方案是使用挂载用户的User & Group ID
京东在Alluxio社区的贡献
4
JD Contribution to Alluxio
17
Business
Strategy
ui-grid based
sort/pagination/filter add
an input field
New Web UI
high watermark start evict
low watermark stop evict
Watermark Evict Strategy
check startsup
check every time
Cache Consistency
monitor JVM pause periodically
log message and metrics
JVM Pause Monitor
cp/ls/load/rm/format
Shell Command
Deadlock
thrift add timeout time
…
Bugfix
shell
RESTful API
Change Log Level
SyncQuery
AlluxioTools
…
Test
京东在Alluxio社区的贡献
18
近期贡献
4
3
1
2
6
5
解决偶发umount失败问题
创建文件或目录时支持指定permission
支持statfs,通过df命令可以查询挂载点信息
限制文件名长度不超过255个字符
解决CACHE_THROUGH模式下Alluxio
和HDFS文件属主不一致的问题
支持文件或目录的真实创建者
京东在Alluxio社区的贡献
19
持续发力
新功能开发
社区合作
技术分享
兼容性提升
Q & A
Thank You!

Contenu connexe

Tendances

Open Source Security Tools for Big Data
Open Source Security Tools for Big DataOpen Source Security Tools for Big Data
Open Source Security Tools for Big DataRommel Garcia
 
Snowflake + Power BI: Cloud Analytics for Everyone
Snowflake + Power BI: Cloud Analytics for EveryoneSnowflake + Power BI: Cloud Analytics for Everyone
Snowflake + Power BI: Cloud Analytics for EveryoneAngel Abundez
 
Snowflake SnowPro Certification Exam Cheat Sheet
Snowflake SnowPro Certification Exam Cheat SheetSnowflake SnowPro Certification Exam Cheat Sheet
Snowflake SnowPro Certification Exam Cheat SheetJeno Yamma
 
Building robust CDC pipeline with Apache Hudi and Debezium
Building robust CDC pipeline with Apache Hudi and DebeziumBuilding robust CDC pipeline with Apache Hudi and Debezium
Building robust CDC pipeline with Apache Hudi and DebeziumTathastu.ai
 
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)Spark Summit
 
Power BI Architecture
Power BI ArchitecturePower BI Architecture
Power BI ArchitectureArthur Graus
 
Building Your Data Warehouse with Amazon Redshift
Building Your Data Warehouse with Amazon RedshiftBuilding Your Data Warehouse with Amazon Redshift
Building Your Data Warehouse with Amazon RedshiftAmazon Web Services
 
Introduction to Apache NiFi dws19 DWS - DC 2019
Introduction to Apache NiFi   dws19 DWS - DC 2019Introduction to Apache NiFi   dws19 DWS - DC 2019
Introduction to Apache NiFi dws19 DWS - DC 2019Timothy Spann
 
Data warehousing with Hadoop
Data warehousing with HadoopData warehousing with Hadoop
Data warehousing with Hadoophadooparchbook
 
Scalable Filesystem Metadata Services with RocksDB
Scalable Filesystem Metadata Services with RocksDBScalable Filesystem Metadata Services with RocksDB
Scalable Filesystem Metadata Services with RocksDBAlluxio, Inc.
 
How Safe is Asynchronous Master-Master Setup?
 How Safe is Asynchronous Master-Master Setup? How Safe is Asynchronous Master-Master Setup?
How Safe is Asynchronous Master-Master Setup?Sveta Smirnova
 
Designing a modern data warehouse in azure
Designing a modern data warehouse in azure   Designing a modern data warehouse in azure
Designing a modern data warehouse in azure Antonios Chatzipavlis
 
Introduction to column oriented databases
Introduction to column oriented databasesIntroduction to column oriented databases
Introduction to column oriented databasesArangoDB Database
 
Why MySQL Replication Fails, and How to Get it Back
Why MySQL Replication Fails, and How to Get it BackWhy MySQL Replication Fails, and How to Get it Back
Why MySQL Replication Fails, and How to Get it BackSveta Smirnova
 
Nick Fisk - low latency Ceph
Nick Fisk - low latency CephNick Fisk - low latency Ceph
Nick Fisk - low latency CephShapeBlue
 
Strata sf - Amundsen presentation
Strata sf - Amundsen presentationStrata sf - Amundsen presentation
Strata sf - Amundsen presentationTao Feng
 
Hci solution with VxRail
Hci solution with VxRailHci solution with VxRail
Hci solution with VxRailAnton An
 

Tendances (20)

Open Source Security Tools for Big Data
Open Source Security Tools for Big DataOpen Source Security Tools for Big Data
Open Source Security Tools for Big Data
 
snowpro (1).pdf
snowpro (1).pdfsnowpro (1).pdf
snowpro (1).pdf
 
Snowflake + Power BI: Cloud Analytics for Everyone
Snowflake + Power BI: Cloud Analytics for EveryoneSnowflake + Power BI: Cloud Analytics for Everyone
Snowflake + Power BI: Cloud Analytics for Everyone
 
Architecting a datalake
Architecting a datalakeArchitecting a datalake
Architecting a datalake
 
Snowflake SnowPro Certification Exam Cheat Sheet
Snowflake SnowPro Certification Exam Cheat SheetSnowflake SnowPro Certification Exam Cheat Sheet
Snowflake SnowPro Certification Exam Cheat Sheet
 
Building robust CDC pipeline with Apache Hudi and Debezium
Building robust CDC pipeline with Apache Hudi and DebeziumBuilding robust CDC pipeline with Apache Hudi and Debezium
Building robust CDC pipeline with Apache Hudi and Debezium
 
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)
Data Storage Tips for Optimal Spark Performance-(Vida Ha, Databricks)
 
Power BI Architecture
Power BI ArchitecturePower BI Architecture
Power BI Architecture
 
Building Your Data Warehouse with Amazon Redshift
Building Your Data Warehouse with Amazon RedshiftBuilding Your Data Warehouse with Amazon Redshift
Building Your Data Warehouse with Amazon Redshift
 
Introduction to Apache NiFi dws19 DWS - DC 2019
Introduction to Apache NiFi   dws19 DWS - DC 2019Introduction to Apache NiFi   dws19 DWS - DC 2019
Introduction to Apache NiFi dws19 DWS - DC 2019
 
Data warehousing with Hadoop
Data warehousing with HadoopData warehousing with Hadoop
Data warehousing with Hadoop
 
Scalable Filesystem Metadata Services with RocksDB
Scalable Filesystem Metadata Services with RocksDBScalable Filesystem Metadata Services with RocksDB
Scalable Filesystem Metadata Services with RocksDB
 
How Safe is Asynchronous Master-Master Setup?
 How Safe is Asynchronous Master-Master Setup? How Safe is Asynchronous Master-Master Setup?
How Safe is Asynchronous Master-Master Setup?
 
Designing a modern data warehouse in azure
Designing a modern data warehouse in azure   Designing a modern data warehouse in azure
Designing a modern data warehouse in azure
 
Introduction to column oriented databases
Introduction to column oriented databasesIntroduction to column oriented databases
Introduction to column oriented databases
 
Why MySQL Replication Fails, and How to Get it Back
Why MySQL Replication Fails, and How to Get it BackWhy MySQL Replication Fails, and How to Get it Back
Why MySQL Replication Fails, and How to Get it Back
 
Rds data lake @ Robinhood
Rds data lake @ Robinhood Rds data lake @ Robinhood
Rds data lake @ Robinhood
 
Nick Fisk - low latency Ceph
Nick Fisk - low latency CephNick Fisk - low latency Ceph
Nick Fisk - low latency Ceph
 
Strata sf - Amundsen presentation
Strata sf - Amundsen presentationStrata sf - Amundsen presentation
Strata sf - Amundsen presentation
 
Hci solution with VxRail
Hci solution with VxRailHci solution with VxRail
Hci solution with VxRail
 

Similaire à Using Alluxio POSIX (FUSE) API in JD.com

鏡像檔案系統 Mirror File System : MFS
鏡像檔案系統 Mirror File System : MFS鏡像檔案系統 Mirror File System : MFS
鏡像檔案系統 Mirror File System : MFSMark Ting
 
A possibility to install OS on CEPH
A possibility to install OS on CEPHA possibility to install OS on CEPH
A possibility to install OS on CEPHJiang Yan-Ting
 
基于Ubuntu 12.04 LTS Server的无盘工作站
基于Ubuntu 12.04 LTS Server的无盘工作站基于Ubuntu 12.04 LTS Server的无盘工作站
基于Ubuntu 12.04 LTS Server的无盘工作站Shawn Zhung
 
Use Alluxio to Unify Storage Systems in Suning
Use Alluxio to Unify Storage Systems in SuningUse Alluxio to Unify Storage Systems in Suning
Use Alluxio to Unify Storage Systems in SuningAlluxio, Inc.
 
分会场六数据中心使用Cfs & vcs 节省it成本
分会场六数据中心使用Cfs & vcs 节省it成本分会场六数据中心使用Cfs & vcs 节省it成本
分会场六数据中心使用Cfs & vcs 节省it成本ITband
 
基于PXE实现部署Linux服务器
基于PXE实现部署Linux服务器基于PXE实现部署Linux服务器
基于PXE实现部署Linux服务器ekoing
 
Virtual file system (VFS)
Virtual file system (VFS)Virtual file system (VFS)
Virtual file system (VFS)Waylin Ch
 
[精彩回顾]Linux新手教程
[精彩回顾]Linux新手教程[精彩回顾]Linux新手教程
[精彩回顾]Linux新手教程NJU OPEN
 
使用Ubuntu架設hadoop
使用Ubuntu架設hadoop使用Ubuntu架設hadoop
使用Ubuntu架設hadooptaishanla
 
使用Ubuntu架設hadoop
使用Ubuntu架設hadoop使用Ubuntu架設hadoop
使用Ubuntu架設hadooptaishanla
 
Zh tw introduction_to_hadoop and hdfs
Zh tw introduction_to_hadoop and hdfsZh tw introduction_to_hadoop and hdfs
Zh tw introduction_to_hadoop and hdfsTrendProgContest13
 
Moodle 2.3 图文安装教程
Moodle 2.3 图文安装教程Moodle 2.3 图文安装教程
Moodle 2.3 图文安装教程YUCHENG HU
 
51 cto下载 51cto信息图:openshift vs cloudfoundry
51 cto下载 51cto信息图:openshift vs cloudfoundry51 cto下载 51cto信息图:openshift vs cloudfoundry
51 cto下载 51cto信息图:openshift vs cloudfoundryHong Cai
 
hicloud PaaS雲創平台(Java/PHP介紹)
hicloud PaaS雲創平台(Java/PHP介紹)hicloud PaaS雲創平台(Java/PHP介紹)
hicloud PaaS雲創平台(Java/PHP介紹)hicloud-paas
 
HDFS-In-Cloud
HDFS-In-CloudHDFS-In-Cloud
HDFS-In-CloudLei Xu
 
2018 普安 EonStor GSe Pro 产品线介绍 (簡中版)
2018 普安 EonStor GSe Pro 产品线介绍 (簡中版)2018 普安 EonStor GSe Pro 产品线介绍 (簡中版)
2018 普安 EonStor GSe Pro 产品线介绍 (簡中版)infortrendgroup
 
Kick start无人值守批量安装linux
Kick start无人值守批量安装linuxKick start无人值守批量安装linux
Kick start无人值守批量安装linuxYiwei Ma
 

Similaire à Using Alluxio POSIX (FUSE) API in JD.com (20)

鏡像檔案系統 Mirror File System : MFS
鏡像檔案系統 Mirror File System : MFS鏡像檔案系統 Mirror File System : MFS
鏡像檔案系統 Mirror File System : MFS
 
Overlayfs and VFS
Overlayfs and VFSOverlayfs and VFS
Overlayfs and VFS
 
A possibility to install OS on CEPH
A possibility to install OS on CEPHA possibility to install OS on CEPH
A possibility to install OS on CEPH
 
基于Ubuntu 12.04 LTS Server的无盘工作站
基于Ubuntu 12.04 LTS Server的无盘工作站基于Ubuntu 12.04 LTS Server的无盘工作站
基于Ubuntu 12.04 LTS Server的无盘工作站
 
Use Alluxio to Unify Storage Systems in Suning
Use Alluxio to Unify Storage Systems in SuningUse Alluxio to Unify Storage Systems in Suning
Use Alluxio to Unify Storage Systems in Suning
 
分会场六数据中心使用Cfs & vcs 节省it成本
分会场六数据中心使用Cfs & vcs 节省it成本分会场六数据中心使用Cfs & vcs 节省it成本
分会场六数据中心使用Cfs & vcs 节省it成本
 
儲存三二話
儲存三二話儲存三二話
儲存三二話
 
基于PXE实现部署Linux服务器
基于PXE实现部署Linux服务器基于PXE实现部署Linux服务器
基于PXE实现部署Linux服务器
 
Virtual file system (VFS)
Virtual file system (VFS)Virtual file system (VFS)
Virtual file system (VFS)
 
[精彩回顾]Linux新手教程
[精彩回顾]Linux新手教程[精彩回顾]Linux新手教程
[精彩回顾]Linux新手教程
 
使用Ubuntu架設hadoop
使用Ubuntu架設hadoop使用Ubuntu架設hadoop
使用Ubuntu架設hadoop
 
使用Ubuntu架設hadoop
使用Ubuntu架設hadoop使用Ubuntu架設hadoop
使用Ubuntu架設hadoop
 
Zh tw introduction_to_hadoop and hdfs
Zh tw introduction_to_hadoop and hdfsZh tw introduction_to_hadoop and hdfs
Zh tw introduction_to_hadoop and hdfs
 
Moodle 2.3 图文安装教程
Moodle 2.3 图文安装教程Moodle 2.3 图文安装教程
Moodle 2.3 图文安装教程
 
51 cto下载 51cto信息图:openshift vs cloudfoundry
51 cto下载 51cto信息图:openshift vs cloudfoundry51 cto下载 51cto信息图:openshift vs cloudfoundry
51 cto下载 51cto信息图:openshift vs cloudfoundry
 
hicloud PaaS雲創平台(Java/PHP介紹)
hicloud PaaS雲創平台(Java/PHP介紹)hicloud PaaS雲創平台(Java/PHP介紹)
hicloud PaaS雲創平台(Java/PHP介紹)
 
HDFS-In-Cloud
HDFS-In-CloudHDFS-In-Cloud
HDFS-In-Cloud
 
2018 普安 EonStor GSe Pro 产品线介绍 (簡中版)
2018 普安 EonStor GSe Pro 产品线介绍 (簡中版)2018 普安 EonStor GSe Pro 产品线介绍 (簡中版)
2018 普安 EonStor GSe Pro 产品线介绍 (簡中版)
 
Kick start无人值守批量安装linux
Kick start无人值守批量安装linuxKick start无人值守批量安装linux
Kick start无人值守批量安装linux
 
Linux File system
Linux File systemLinux File system
Linux File system
 

Plus de Alluxio, Inc.

Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Optimizing Data Access for Analytics And AI with Alluxio
Optimizing Data Access for Analytics And AI with AlluxioOptimizing Data Access for Analytics And AI with Alluxio
Optimizing Data Access for Analytics And AI with AlluxioAlluxio, Inc.
 
Speed Up Presto at Uber with Alluxio Caching
Speed Up Presto at Uber with Alluxio CachingSpeed Up Presto at Uber with Alluxio Caching
Speed Up Presto at Uber with Alluxio CachingAlluxio, Inc.
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLBig Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLAlluxio, Inc.
 
Alluxio Monthly Webinar | Why a Multi-Cloud Strategy Matters for Your AI Plat...
Alluxio Monthly Webinar | Why a Multi-Cloud Strategy Matters for Your AI Plat...Alluxio Monthly Webinar | Why a Multi-Cloud Strategy Matters for Your AI Plat...
Alluxio Monthly Webinar | Why a Multi-Cloud Strategy Matters for Your AI Plat...Alluxio, Inc.
 
Alluxio Monthly Webinar | Five Disruptive Trends that Every Data & AI Leader...
Alluxio Monthly Webinar | Five Disruptive Trends that Every  Data & AI Leader...Alluxio Monthly Webinar | Five Disruptive Trends that Every  Data & AI Leader...
Alluxio Monthly Webinar | Five Disruptive Trends that Every Data & AI Leader...Alluxio, Inc.
 
Data Infra Meetup | FIFO Queues are All You Need for Cache Eviction
Data Infra Meetup | FIFO Queues are All You Need for Cache EvictionData Infra Meetup | FIFO Queues are All You Need for Cache Eviction
Data Infra Meetup | FIFO Queues are All You Need for Cache EvictionAlluxio, Inc.
 
Data Infra Meetup | Accelerate Your Trino/Presto Queries - Gain the Alluxio Edge
Data Infra Meetup | Accelerate Your Trino/Presto Queries - Gain the Alluxio EdgeData Infra Meetup | Accelerate Your Trino/Presto Queries - Gain the Alluxio Edge
Data Infra Meetup | Accelerate Your Trino/Presto Queries - Gain the Alluxio EdgeAlluxio, Inc.
 
Data Infra Meetup | Accelerate Distributed PyTorch/Ray Workloads in the Cloud
Data Infra Meetup | Accelerate Distributed PyTorch/Ray Workloads in the CloudData Infra Meetup | Accelerate Distributed PyTorch/Ray Workloads in the Cloud
Data Infra Meetup | Accelerate Distributed PyTorch/Ray Workloads in the CloudAlluxio, Inc.
 
Data Infra Meetup | ByteDance's Native Parquet Reader
Data Infra Meetup | ByteDance's Native Parquet ReaderData Infra Meetup | ByteDance's Native Parquet Reader
Data Infra Meetup | ByteDance's Native Parquet ReaderAlluxio, Inc.
 
Data Infra Meetup | Uber's Data Storage Evolution
Data Infra Meetup | Uber's Data Storage EvolutionData Infra Meetup | Uber's Data Storage Evolution
Data Infra Meetup | Uber's Data Storage EvolutionAlluxio, Inc.
 
Alluxio Monthly Webinar | Why NFS/NAS on Object Storage May Not Solve Your AI...
Alluxio Monthly Webinar | Why NFS/NAS on Object Storage May Not Solve Your AI...Alluxio Monthly Webinar | Why NFS/NAS on Object Storage May Not Solve Your AI...
Alluxio Monthly Webinar | Why NFS/NAS on Object Storage May Not Solve Your AI...Alluxio, Inc.
 
AI Infra Day | Accelerate Your Model Training and Serving with Distributed Ca...
AI Infra Day | Accelerate Your Model Training and Serving with Distributed Ca...AI Infra Day | Accelerate Your Model Training and Serving with Distributed Ca...
AI Infra Day | Accelerate Your Model Training and Serving with Distributed Ca...Alluxio, Inc.
 
AI Infra Day | The AI Infra in the Generative AI Era
AI Infra Day | The AI Infra in the Generative AI EraAI Infra Day | The AI Infra in the Generative AI Era
AI Infra Day | The AI Infra in the Generative AI EraAlluxio, Inc.
 
AI Infra Day | Hands-on Lab: CV Model Training with PyTorch & Alluxio on Kube...
AI Infra Day | Hands-on Lab: CV Model Training with PyTorch & Alluxio on Kube...AI Infra Day | Hands-on Lab: CV Model Training with PyTorch & Alluxio on Kube...
AI Infra Day | Hands-on Lab: CV Model Training with PyTorch & Alluxio on Kube...Alluxio, Inc.
 
AI Infra Day | The Generative AI Market And Intel AI Strategy and Product Up...
AI Infra Day | The Generative AI Market  And Intel AI Strategy and Product Up...AI Infra Day | The Generative AI Market  And Intel AI Strategy and Product Up...
AI Infra Day | The Generative AI Market And Intel AI Strategy and Product Up...Alluxio, Inc.
 
AI Infra Day | Composable PyTorch Distributed with PT2 @ Meta
AI Infra Day | Composable PyTorch Distributed with PT2 @ MetaAI Infra Day | Composable PyTorch Distributed with PT2 @ Meta
AI Infra Day | Composable PyTorch Distributed with PT2 @ MetaAlluxio, Inc.
 
AI Infra Day | Model Lifecycle Management Quality Assurance at Uber Scale
AI Infra Day | Model Lifecycle Management Quality Assurance at Uber ScaleAI Infra Day | Model Lifecycle Management Quality Assurance at Uber Scale
AI Infra Day | Model Lifecycle Management Quality Assurance at Uber ScaleAlluxio, Inc.
 
Alluxio Monthly Webinar | Efficient Data Loading for Model Training on AWS
Alluxio Monthly Webinar | Efficient Data Loading for Model Training on AWSAlluxio Monthly Webinar | Efficient Data Loading for Model Training on AWS
Alluxio Monthly Webinar | Efficient Data Loading for Model Training on AWSAlluxio, Inc.
 

Plus de Alluxio, Inc. (20)

Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Optimizing Data Access for Analytics And AI with Alluxio
Optimizing Data Access for Analytics And AI with AlluxioOptimizing Data Access for Analytics And AI with Alluxio
Optimizing Data Access for Analytics And AI with Alluxio
 
Speed Up Presto at Uber with Alluxio Caching
Speed Up Presto at Uber with Alluxio CachingSpeed Up Presto at Uber with Alluxio Caching
Speed Up Presto at Uber with Alluxio Caching
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLBig Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
 
Alluxio Monthly Webinar | Why a Multi-Cloud Strategy Matters for Your AI Plat...
Alluxio Monthly Webinar | Why a Multi-Cloud Strategy Matters for Your AI Plat...Alluxio Monthly Webinar | Why a Multi-Cloud Strategy Matters for Your AI Plat...
Alluxio Monthly Webinar | Why a Multi-Cloud Strategy Matters for Your AI Plat...
 
Alluxio Monthly Webinar | Five Disruptive Trends that Every Data & AI Leader...
Alluxio Monthly Webinar | Five Disruptive Trends that Every  Data & AI Leader...Alluxio Monthly Webinar | Five Disruptive Trends that Every  Data & AI Leader...
Alluxio Monthly Webinar | Five Disruptive Trends that Every Data & AI Leader...
 
Data Infra Meetup | FIFO Queues are All You Need for Cache Eviction
Data Infra Meetup | FIFO Queues are All You Need for Cache EvictionData Infra Meetup | FIFO Queues are All You Need for Cache Eviction
Data Infra Meetup | FIFO Queues are All You Need for Cache Eviction
 
Data Infra Meetup | Accelerate Your Trino/Presto Queries - Gain the Alluxio Edge
Data Infra Meetup | Accelerate Your Trino/Presto Queries - Gain the Alluxio EdgeData Infra Meetup | Accelerate Your Trino/Presto Queries - Gain the Alluxio Edge
Data Infra Meetup | Accelerate Your Trino/Presto Queries - Gain the Alluxio Edge
 
Data Infra Meetup | Accelerate Distributed PyTorch/Ray Workloads in the Cloud
Data Infra Meetup | Accelerate Distributed PyTorch/Ray Workloads in the CloudData Infra Meetup | Accelerate Distributed PyTorch/Ray Workloads in the Cloud
Data Infra Meetup | Accelerate Distributed PyTorch/Ray Workloads in the Cloud
 
Data Infra Meetup | ByteDance's Native Parquet Reader
Data Infra Meetup | ByteDance's Native Parquet ReaderData Infra Meetup | ByteDance's Native Parquet Reader
Data Infra Meetup | ByteDance's Native Parquet Reader
 
Data Infra Meetup | Uber's Data Storage Evolution
Data Infra Meetup | Uber's Data Storage EvolutionData Infra Meetup | Uber's Data Storage Evolution
Data Infra Meetup | Uber's Data Storage Evolution
 
Alluxio Monthly Webinar | Why NFS/NAS on Object Storage May Not Solve Your AI...
Alluxio Monthly Webinar | Why NFS/NAS on Object Storage May Not Solve Your AI...Alluxio Monthly Webinar | Why NFS/NAS on Object Storage May Not Solve Your AI...
Alluxio Monthly Webinar | Why NFS/NAS on Object Storage May Not Solve Your AI...
 
AI Infra Day | Accelerate Your Model Training and Serving with Distributed Ca...
AI Infra Day | Accelerate Your Model Training and Serving with Distributed Ca...AI Infra Day | Accelerate Your Model Training and Serving with Distributed Ca...
AI Infra Day | Accelerate Your Model Training and Serving with Distributed Ca...
 
AI Infra Day | The AI Infra in the Generative AI Era
AI Infra Day | The AI Infra in the Generative AI EraAI Infra Day | The AI Infra in the Generative AI Era
AI Infra Day | The AI Infra in the Generative AI Era
 
AI Infra Day | Hands-on Lab: CV Model Training with PyTorch & Alluxio on Kube...
AI Infra Day | Hands-on Lab: CV Model Training with PyTorch & Alluxio on Kube...AI Infra Day | Hands-on Lab: CV Model Training with PyTorch & Alluxio on Kube...
AI Infra Day | Hands-on Lab: CV Model Training with PyTorch & Alluxio on Kube...
 
AI Infra Day | The Generative AI Market And Intel AI Strategy and Product Up...
AI Infra Day | The Generative AI Market  And Intel AI Strategy and Product Up...AI Infra Day | The Generative AI Market  And Intel AI Strategy and Product Up...
AI Infra Day | The Generative AI Market And Intel AI Strategy and Product Up...
 
AI Infra Day | Composable PyTorch Distributed with PT2 @ Meta
AI Infra Day | Composable PyTorch Distributed with PT2 @ MetaAI Infra Day | Composable PyTorch Distributed with PT2 @ Meta
AI Infra Day | Composable PyTorch Distributed with PT2 @ Meta
 
AI Infra Day | Model Lifecycle Management Quality Assurance at Uber Scale
AI Infra Day | Model Lifecycle Management Quality Assurance at Uber ScaleAI Infra Day | Model Lifecycle Management Quality Assurance at Uber Scale
AI Infra Day | Model Lifecycle Management Quality Assurance at Uber Scale
 
Alluxio Monthly Webinar | Efficient Data Loading for Model Training on AWS
Alluxio Monthly Webinar | Efficient Data Loading for Model Training on AWSAlluxio Monthly Webinar | Efficient Data Loading for Model Training on AWS
Alluxio Monthly Webinar | Efficient Data Loading for Model Training on AWS
 

Using Alluxio POSIX (FUSE) API in JD.com

  • 2. 1 2 3 4 Alluxio FUSE在京东的应用 解读Alluxio FUSE原理和架构 Alluxio FUSE的POSIX兼容性 京东在Alluxio社区的贡献 目录
  • 5. Alluxio FUSE在京东的应用 – 早期海量文件共享服务 5 劣势 费时 数据从HDFS推送至 Cephfs,约增加一倍耗时 费力 需要数据一致性校 验,耗费大量时间 难度大Ceph集群不易运维,新 手难以掌握 稳定性 内核ceph模块增加 操作系统不稳定性 一写多读
  • 6. Alluxio FUSE在京东的应用 – 海量文件高速共享服务 6 缺点 • Alluxio FUSE宜采用Direct_IO,无Page Cache加速 • FUSE受限于架构设计,性能不及内核态fs • Alluxio的稳定性将影响BDP SLA A Hadoop Client集成Alluxio Client,应用编程无感知,只需 替换Schema B 数据经过Alluxio同步地写穿到 HDFS,耗时只是略微增加,省去 推送环节,较早期模型约缩短一 倍时间 C 不影响操作系统稳定性 D 同样使用Native fs,文件消 费者无感知
  • 7. Alluxio FUSE在京东的应用 - 备选方案 7 待改进 distributedLoad实际效果相比load性能提升有限,待进一步优化
  • 9. 解读Alluxio FUSE原理和架构 - 核心架构  FUSE: Filesystem in Userspace(用户空间文件系统) AlluxioFuseFileSystem extends FuseStubFS { + int create(String path, long mode, FuseFileInfo fi) + int open(String path, FuseFileInfo fi) + int chmod(String path, long mode) + int chown(String path, long uid, long gid) + int mkdir(String path, long mode) + int readdir(String path, Pointer buff, FuseFillDir filter, long offset, FuseFileInfo fi) ...... } 1 2 3 4 5 6 AlluxioFuse jnr-fuse libfuse vfs Alluxio基于jnr-fuse 实现用户态文件系统 的守护进程 fuse 的用户态库 An FUSE implementation in java using Java Native Runtime Virtual File System, 虚拟文件系统 /dev/fuse fuse模块创建的字符设 备,是内核与libfuse 交互的通道,所有挂载 点(Mount Point)共享 kernel fuse 基于vfs实现的内核模块
  • 10. 解读Alluxio FUSE原理和架构 - 使用方法  安装依赖 # yum install -y fuse-libs fuse  配置 # cat alluxio-2.0.0/conf/alluxio-site.properties alluxio.master.hostname=x.x.x.x # echo user_allow_other >> /etc/fuse.conf  挂载Alluxio FUSE # ./alluxio-2.0.0/integration/fuse/bin/alluxio-fuse mount -o <options> /mountpoint /path/in/alluxio  查看Alluxio FUSE挂载点 # ./alluxio-2.0.0/integration/fuse/bin/alluxio-fuse stat pid mount_point alluxio_path 130741 /mountpoint /path/in/alluxio  查看挂载参数 # mount -t fuse.alluxio-fuse alluxio-fuse on /mountpoint type fuse.alluxio-fuse (rw,nosuid,nodev,relatime,user_id=1001,group_id=1001,allow_other)  查看存储空间 # df -h -t fuse.alluxio-fuse Filesystem Size Used Avail Use% Mounted on alluxio-fuse 211T 53G 211T 1% /mountpoint  卸载Alluxio FUSE # ./alluxio-2.0.0/integration/fuse/bin/alluxio-fuse umount /mountpoint 或 # umount /mountpoint
  • 11. 解读Alluxio FUSE原理和架构 - 初始化流程 1. jnr-fuse将AlluxioFuseFileSystem打 包传给libfuse 2. libfuse打开/dev/fuse字符设备,返回 文件描述符fd(File Descriptor)。fd在 进程内的线程间共享,因此fuse很容 易支持multi-thread模式;fd在进程 间不共享,且file支持私有数据,因此 fuse支持多种类型的挂载点 3. mount系统调用传参fd,libfuse和 kernel fuse通过fd这个桥梁建立虚拟 连接 4. super_block和file的私有数据对应虚拟连接 5. multi-thread模式下,多个线程同时从/dev/fuse读取请求 6. 当前无请求时,read系统调用阻塞 7. 当请求到来时,唤醒被阻塞的线程,read返回文件系统请求
  • 14. Alluxio FUSE的POSIX兼容性 - 兼容性测试 14  fstest - 简化版的文件系统POSIX兼容性测试套件 https://www.tuxera.com/community/posix-test-suite/  使用方法 wget http://download.tuxera.com/sw/qa/pjd-fstest-20080816.tgz tar xf pjd-fstest-20080816.tgz cd pjd-fstest-20080816 make (切记,进入待测试目录!!!) cd /your/test/dir 整体测试 prove -r pjd-fstest-20080816/tests 单独测试 prove pjd-fstest-20080816/tests/unlink/00.t  定位失败测试 # strace -T -f -r prove pjd-fstest-20080816/tests/mkfifo/00.t > /tmp/ mkfifo.log 2>&1 [pid 54451] mknod("fstest_34c2d9dbec1aed322d9ffc452ce32469", S_IFIFO|0644 <unfinished ...> [pid 54451] <... mknod resumed> ) = -1 ENOSYS (Function not implemented) <0.000814> 01 03 02 04 05 06 ext4 极少数失败 kernel ceph 极少数失败 Alluxio-fuse 部分失败 xfs 极少数失败 ceph-fuse 少数失败 hdfs-fuse 大部分失败
  • 15. Alluxio FUSE的POSIX兼容性 - 兼容性 15  兼容列表 create, rename, open, unlink getattr, chmod, chown mkdir, readdir ,rmdir read, write, flush dup2 ……  不兼容列表 不支持在创建文件或目录时指定权限<已解决> 不支持修改文件属主或属组为当前不存在的用户或组 不支持软连接 未检查文件名长度是否超出255 <已解决> 不支持mkfifo, mknod 不支持truncate 不支持扩展属性 不支持fallocate 不支持utimes 不支持append ......  User & Group POSIX定义的文件元数据中记录User & Group ID 如果系统中不存在该ID对应的User或Group: # chown 12345:12345 TODO stat显示UNKNOWN # stat TODO Uid: (12345/ UNKNOWN) Gid: (12345/ UNKNOWN) ls显示ID # ls -l TODO -rw-r--r-- 1 12345 12345 6972 Dec 4 2013 TODO Alluxio使用User & Group Name 如果系统中不存在该User或Group,则无法转换为ID, 目前折中的方案是使用挂载用户的User & Group ID
  • 17. JD Contribution to Alluxio 17 Business Strategy ui-grid based sort/pagination/filter add an input field New Web UI high watermark start evict low watermark stop evict Watermark Evict Strategy check startsup check every time Cache Consistency monitor JVM pause periodically log message and metrics JVM Pause Monitor cp/ls/load/rm/format Shell Command Deadlock thrift add timeout time … Bugfix shell RESTful API Change Log Level SyncQuery AlluxioTools … Test
  • 20. Q & A