PageSourceSearch

https://fluid-cloudnative.github.io/assets/js/665ae452.4a553233.js

js fluid-cloudnative.github.io collected 2026-10-03 09:12:29 UTC 11,326 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkfluid_website_demo=self.webpackChunkfluid_website_demo||[]).push([[776],{7752:(e,i,t)=>{t.r(i),t.d(i,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>r,metadata:()=>s,toc:()=>d});var o=t(7624),n=t(2172);const r={sidebar_label:"Alluxio TieredStore Configuration",sidebar_position:3},a="Alluxio TieredStore Configuration",s={id:"tutorials/advanced/alluxio-tieredstore-configuration",title:"Alluxio TieredStore Configuration",description:"Alluxio is one of the distributed cache engines leveraged by Fluid.",source:"@site/docs/tutorials/advanced/alluxio-tieredstore-configuration.md",sourceDirName:"tutorials/advanced",slug:"/tutorials/advanced/alluxio-tieredstore-configuration",permalink:"/docs/next/tutorials/advanced/alluxio-tieredstore-configuration",draft:!1,unlisted:!1,editUrl:"https://github.com/fluid-cloudnative/fluid-cloudnative.github.io/tree/master/docs/tutorials/advanced/alluxio-tieredstore-configuration.md",tags:[],version:"current",lastUpdatedBy:"chenqiming",lastUpdatedAt:1712563663,formattedLastUpdatedAt:"Apr 8, 2024",sidebarPosition:3,frontMatter:{sidebar_label:"Alluxio TieredStore Configuration",sidebar_position:3},sidebar:"tutorialSidebar",previous:{title:"Accelerate Data Access by MEM or SSD",permalink:"/docs/next/tutorials/advanced/accelerate-data-access-by-mem-or-ssd"},next:{title:"Pod Scheduling Optimization",permalink:"/docs/next/tutorials/advanced/pod-scheduling-optimization"}},l={},d=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Single-Tier Configuration",id:"single-tier-configuration",level:2},{value:"Single-Tier Multi-Directory Configuration",id:"single-tier-multi-directory-configuration",level:2},{value:"Multi-Tier Configuration",id:"multi-tier-configuration",level:2}];function c(e){const i={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,n.M)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.h1,{id:"alluxio-tieredstore-configuration",children:"Alluxio TieredStore Configuration"}),"\n",(0,o.jsxs)(i.p,{children:[(0,o.jsx)(i.a,{href:"https://github.com/Alluxio/alluxio",children:"Alluxio"})," is one of the distributed cache engines leveraged by Fluid.\nIt supports tieredstores to store cached data in different location, for example different directories with different storage types.\nBy appropriate configurations on tieredstores, users can get better I/O throughput from Fluid and eliminate bottlenecks when accessing data."]}),"\n",(0,o.jsx)(i.p,{children:"The guide introduces you how to configure Alluxio's tieredstore in a declarative way in Fluid."}),"\n",(0,o.jsxs)(i.p,{children:["To get more tech detail about Alluxio's tieredstore, please refer to ",(0,o.jsx)(i.a,{href:"https://docs.alluxio.io/ee/user/stable/en/core-services/Caching.html?q=tieredstore#configuring-alluxio-storage",children:"Cache-related docs offered by Alluxio"})]}),"\n",(0,o.jsx)(i.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,o.jsxs)(i.ul,{children:["\n",(0,o.jsxs)(i.li,{children:[(0,o.jsx)(i.a,{href:"https://github.com/fluid-cloudnative/fluid",children:"Fluid"}),"(version >= 0.3.0)"]}),"\n"]}),"\n",(0,o.jsxs)(i.p,{children:["Please refer to ",(0,o.jsx)(i.a,{href:"/docs/get-started/installation",children:"Fluid installation documentation"})," to complete installation."]}),"\n",(0,o.jsx)(i.h2,{id:"single-tier-configuration",children:"Single-Tier Configuration"}),"\n",(0,o.jsx)(i.p,{children:"Here is an typical example for an AlluxioRuntime:"}),"\n",(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-yaml",children:"apiVersion: data.fluid.io/v1alpha1\nkind: AlluxioRuntime\nmetadata:\n  name: dataset\nspec:\n  ...\n  tieredstore:\n    levels:\n      - path: /dev/shm\n        mediumtype: MEM\n        quota: 2Gi\n"})}),"\n",(0,o.jsxs)(i.p,{children:[(0,o.jsx)(i.code,{children:"spec.tieredstore.levels"})," contains only one level, so Alluxio will run with single tieredstore."]}),"\n",(0,o.jsx)(i.p,{children:"A brief description for each property involved in the above-mentioned example is as follows:"}),"\n",(0,o.jsxs)(i.ul,{children:["\n",(0,o.jsxs)(i.li,{children:[(0,o.jsx)(i.co
1de,{children:"path"}),": where data cache actually stores"]}),"\n",(0,o.jsxs)(i.li,{children:[(0,o.jsx)(i.code,{children:"mediumtype"}),": one of the three values(",(0,o.jsx)(i.code,{children:"MEM"}),", ",(0,o.jsx)(i.code,{children:"SSD"}),", ",(0,o.jsx)(i.code,{children:"HDD"}),"), used to specify medium for ",(0,o.jsx)(i.code,{children:"path"})]}),"\n",(0,o.jsxs)(i.li,{children:[(0,o.jsx)(i.code,{children:"quota"}),": maximium cache capacity for the level"]}),"\n"]}),"\n",(0,o.jsx)(i.h2,{id:"single-tier-multi-directory-configuration",children:"Single-Tier Multi-Directory Configuration"}),"\n",(0,o.jsx)(i.p,{children:"The best way to demonstrate such configuration is to give an example like this:"}),"\n",(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-yaml",children:"apiVersion: data.fluid.io/v1alpha1\nkind: AlluxioRuntime\nmetadata:\n  name: dataset\nspec:\n  ...\n  tieredstore:\n    levels:\n      - path: /mnt/ssd0/cache,/mnt/ssd1/cache\n        mediumtype: SSD\n        quota: 4Gi\n"})}),"\n",(0,o.jsxs)(i.p,{children:["To use multiple directories as  Alluxio's tieredstore,\nthe only difference is to add more directories in ",(0,o.jsx)(i.code,{children:"path"}),' with comma(",") as their separator.\nTake the yaml above as an example, with ',(0,o.jsx)(i.code,{children:"path"}),' containing both "/mnt/ssd0/cache" and "/mnt/ssd1/cache",\nAlluxio will use these two directories as its cache store in the meantime.']}),"\n",(0,o.jsx)(i.p,{children:'The example also implies some best practices about when you might want to use such configuration: If there is a bottleneck\nintroduced by storage device itself(e.g. limited by Hard disk I/O throughput), using multiple storage devices("/mnt/ssd0" and "/mnt/ssd1" in the example above) as Alluxio\'s tieredstore\ncan reduce load on each device and get a higher I/O throughput.'}),"\n",(0,o.jsxs)(i.blockquote,{children:["\n",(0,o.jsx)(i.p,{children:"Note: For now, Fluid only support tieredstores with homogeneous medium type.\nThat is, it is not allowed to use different hybrid storages in a tieredstore in Fluid."}),"\n"]}),"\n",(0,o.jsxs)(i.p,{children:["Also please note that, if multi-directory tieredstore is enabled, ",(0,o.jsx)(i.code,{children:"quota"})," will be divided equally to each directory.\nTake the yaml above as an example, with ",(0,o.jsx)(i.code,{children:"quota"}),' setting to "4Gi", each directory in ',(0,o.jsx)(i.code,{children:"path"}),' will have a cache capacity of "2Gi"(i.e. 4Gi / 2)']}),"\n",(0,o.jsxs)(i.p,{children:["If that's not your desired way, Fluid also provides ",(0,o.jsx)(i.code,{children:"quotaList"})," to configure cache capacity for each directory:"]}),"\n",(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-yaml",children:"apiVersion: data.fluid.io/v1alpha1\nkind: AlluxioRuntime\nmetadata:\n  name: dataset\nspec:\n  properties:\n    ...\n    # [default property in fluid]\n    # alluxio.worker.allocator.class: alluxio.worker.block.allocator.MaxFreeAllocator\n  ...\n  tieredstore:\n    levels:\n      - path: /mnt/ssd0/cache,/mnt/ssd1/cache\n        mediumtype: SSD\n        #quota: 4Gi\n        quotaList: 3Gi,2Gi\n"})}),"\n",(0,o.jsxs)(i.p,{children:[(0,o.jsx)(i.code,{children:"quotaList"})," allows you to set maximum cache capacity for each directory.\nThe ",(0,o.jsx)(i.code,{children:"quotaList"})," will distributed its values into directories in the same order you defined in ",(0,o.jsx)(i.code,{children:"path"}),",\nso the number of ",(0,o.jsx)(i.code,{children:"quotaList"})," must be in consistent with the number of ",(0,o.jsx)(i.code,{children:"path"}),'. For example, with the yaml above,\n"/mnt/ssd0/cache" has a maximum cache capacity of "3Gi", while "/mnt/ssd1/cache" has capacity of "2Gi".']}),"\n",(0,o.jsxs)(i.p,{children:["Another Alluxio property related to multi-directory tieredstore is ",(0,o.jsx)(i.code,{children:"alluxio.worker.allocator.class"}),".\nAll the supported values are described as follows:"]}),"\n",(0,o.jsxs)(i.ul,{children:["\n",(0,o.jsx)(i.li,{children:'"MaxFreeAllocator": Always try to allocate the cache to the storage directory that currently has the most availability'}),"\n",(0,o.jsx)(i.li,{children:'"RoundRobinAllocator": On each tier, maintain a Round Robin order of storage directories. Try to allocate the new cache into a directory following the Round Robin order, and if that does not work, go to the next lower tier.'}),"\n",(0,o.jsx)(i.li,{children:'"GreedyAllocator": Always try to put the new cache into the first directory that can contain it.'}),"\n"]}),"\n",(0,o.jsxs)(i.p,{children:['By default, Fluid uses "MaxFreeAllocator" to decide where to store a new cache. Users can feel free to change this behavior b
1y setting corresponding allocator to the Alluxio property.\nFor example, users can change ',(0,o.jsx)(i.code,{children:"alluxio.worker.allocator.class"}),' to "alluxio.worker.block.allocator.RoundRobinAllocator" to choose round robin strategy.']}),"\n",(0,o.jsx)(i.h2,{id:"multi-tier-configuration",children:"Multi-Tier Configuration"}),"\n",(0,o.jsx)(i.p,{children:"Here is an example for multi-tier configuration:"}),"\n",(0,o.jsx)(i.pre,{children:(0,o.jsx)(i.code,{className:"language-yaml",children:"apiVersion: data.fluid.io/v1alpha1\nkind: AlluxioRuntime\nmetadata:\n  name: dataset\nspec:\n  ...\n  tieredstore:\n    levels:\n      - path: /dev/shm\n        mediumtype: MEM\n        quota: 2Gi\n      - path: /mnt/ssd0/cache,/mnt/ssd1/cache\n        mediumtype: SSD\n        quotaList: 3Gi,2Gi\n"})}),"\n",(0,o.jsx)(i.p,{children:"Multiple tieredstores are just tieredstores with some order. Take the yaml above as an example,\nwe specify two tieredstores: the first level uses memory for high-speed data access and the second one uses\nSSD to get bigger cache capacity."}),"\n",(0,o.jsxs)(i.p,{children:["Level order defined in ",(0,o.jsx)(i.code,{children:"spec.tieredstore.levels"})," will not affect the actual level order used by Alluxio.\nBefore Alluxio launched, Fluid will firstly sort the levels according to ",(0,o.jsx)(i.code,{children:"mediumtype"}),', and storages with higher I/O throughput will get higher priority.\nThat is, Fluid will sort tieredstores in the following orders: "MEM" < "SSD" < "HDD".']}),"\n",(0,o.jsxs)(i.blockquote,{children:["\n",(0,o.jsxs)(i.p,{children:["Note: Alluxio uses a different way to report its capacity usage when using multi-tier configuration.\nFor now, this will lead to some inaccuracy when showing ",(0,o.jsx)(i.code,{children:"Dataset.Cached"})," and ",(0,o.jsx)(i.code,{children:"Dataset.CachedPercentage"})," in Fluid."]}),"\n"]})]})}function u(e={}){const{wrapper:i}={...(0,n.M)(),...e.components};return i?(0,o.jsx)(i,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},2172:(e,i,t)=>{t.d(i,{I:()=>s,M:()=>a});var o=t(1504);const n={},r=o.createContext(n);function a(e){const i=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function s(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),o.createElement(r.Provider,{value:i},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.