Skip to content

Commit

Permalink
Revert fuse max_readahead default option (fluid-cloudnative#202)
Browse files Browse the repository at this point in the history
* Revert fuse max_readahead default option

* Fix samples

* Fix samples
  • Loading branch information
TrafalgarZZZ authored Sep 30, 2020
1 parent e0296d2 commit 9836259
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 53 deletions.
22 changes: 1 addition & 21 deletions config/samples/data_v1alpha1_alluxioruntime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,7 @@ spec:
quota: 2Gi
high: "0.95"
low: "0.7"
properties:
alluxio.user.file.writetype.default: MUST_CACHE
alluxio.master.journal.folder: /journal
alluxio.master.journal.type: UFS
master:
replicas: 1
jvmOptions:
- "-Xmx4G"
properties: {}
ports: {}
resources: {}
worker:
jvmOptions:
- "-Xmx4G"
properties: {}
ports: {}
resources: {}
fuse:
jvmOptions:
- "-Xmx4G "
- "-Xms4G "
args:
- fuse
- --fuse-opts=direct_io,ro,max_read=131072,attr_timeout=7200,entry_timeout=7200
- --fuse-opts=kernel_cache,ro,max_read=131072,attr_timeout=7200,entry_timeout=7200,max_readahead=0
4 changes: 4 additions & 0 deletions docs/en/samples/accelerate_data_accessing.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ spec:
alluxio.user.local.reader.chunk.size.bytes: 256MB
alluxio.worker.network.reader.buffer.size: 256MB
alluxio.user.streaming.data.timeout: 300sec
fuse:
args:
- fuse
- --fuse-opts=kernel_cache,ro,max_read=131072,attr_timeout=7200,entry_timeout=7200,nonempty,max_readahead=0
EOF
```

Expand Down
4 changes: 4 additions & 0 deletions docs/en/samples/data_co_locality.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ spec:
alluxio.user.local.reader.chunk.size.bytes: 256MB
alluxio.worker.network.reader.buffer.size: 256MB
alluxio.user.streaming.data.timeout: 300sec
fuse:
args:
- fuse
- --fuse-opts=kernel_cache,ro,max_read=131072,attr_timeout=7200,entry_timeout=7200,nonempty,max_readahead=0
EOF
```
In this snippet of yaml, there are many specifications used by Fluid to launch an Alluxio instance. The `spec.replicas` in the yaml above is set to 2, which means an Alluxio instance with 1 master and 2 workers is expected to be launched.
Expand Down
15 changes: 1 addition & 14 deletions docs/en/userguide/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,27 +87,14 @@ Fluid provides cloud-native data acceleration and management capabilities, and u
high: "0.95"
low: "0.7"
properties:
alluxio.user.file.writetype.default: MUST_CACHE
alluxio.master.journal.folder: /journal
alluxio.master.journal.type: UFS
alluxio.user.block.size.bytes.default: 256MB
alluxio.user.streaming.reader.chunk.size.bytes: 256MB
alluxio.user.local.reader.chunk.size.bytes: 256MB
alluxio.worker.network.reader.buffer.size: 256MB
alluxio.user.streaming.data.timeout: 300sec
master:
jvmOptions:
- "-Xmx4G"
worker:
jvmOptions:
- "-Xmx4G"
fuse:
jvmOptions:
- "-Xmx4G "
- "-Xms4G "
args:
- fuse
- --fuse-opts=direct_io,ro,max_read=131072
- --fuse-opts=kernel_cache,ro,max_read=131072,attr_timeout=7200,entry_timeout=7200,nonempty,max_readahead=0 alluxio.user.streaming.data.timeout: 300sec
EOF
```
Expand Down
4 changes: 4 additions & 0 deletions docs/zh/samples/accelerate_data_accessing.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ spec:
alluxio.user.local.reader.chunk.size.bytes: 256MB
alluxio.worker.network.reader.buffer.size: 256MB
alluxio.user.streaming.data.timeout: 300sec
fuse:
args:
- fuse
- --fuse-opts=kernel_cache,ro,max_read=131072,attr_timeout=7200,entry_timeout=7200,nonempty,max_readahead=0
EOF
```

Expand Down
4 changes: 4 additions & 0 deletions docs/zh/samples/data_co_locality.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ spec:
alluxio.user.local.reader.chunk.size.bytes: 256MB
alluxio.worker.network.reader.buffer.size: 256MB
alluxio.user.streaming.data.timeout: 300sec
fuse:
args:
- fuse
- --fuse-opts=kernel_cache,ro,max_read=131072,attr_timeout=7200,entry_timeout=7200,nonempty,max_readahead=0
EOF
```
该配置文件片段中,包含了许多与Alluxio相关的配置信息,这些信息将被Fluid用来启动一个Alluxio实例。上述配置片段中的`spec.replicas`属性被设置为2,这表明Fluid将会启动一个包含1个Alluxio Master和2个Alluxio Worker的Alluxio实例
Expand Down
16 changes: 2 additions & 14 deletions docs/zh/userguide/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Fluid提供了云原生的数据加速和管理能力,并抽象出了`数据
```
2. 创建 `AlluxioRuntime` CRD对象,用来描述支持这个数据集的 Runtime, 在这里我们使用[Alluxio](https://www.alluxio.io/)作为其Runtime
```shell
```yaml
$ cat<<EOF >runtime.yaml
apiVersion: data.fluid.io/v1alpha1
kind: AlluxioRuntime
Expand All @@ -88,27 +88,15 @@ Fluid提供了云原生的数据加速和管理能力,并抽象出了`数据
high: "0.95"
low: "0.7"
properties:
alluxio.user.file.writetype.default: MUST_CACHE
alluxio.master.journal.folder: /journal
alluxio.master.journal.type: UFS
alluxio.user.block.size.bytes.default: 256MB
alluxio.user.streaming.reader.chunk.size.bytes: 256MB
alluxio.user.local.reader.chunk.size.bytes: 256MB
alluxio.worker.network.reader.buffer.size: 256MB
alluxio.user.streaming.data.timeout: 300sec
master:
jvmOptions:
- "-Xmx4G"
worker:
jvmOptions:
- "-Xmx4G"
fuse:
jvmOptions:
- "-Xmx4G "
- "-Xms4G "
args:
- fuse
- --fuse-opts=direct_io,ro,max_read=131072
- --fuse-opts=kernel_cache,ro,max_read=131072,attr_timeout=7200,entry_timeout=7200,nonempty,max_readahead=0
EOF
```
使用`kubectl`完成创建
Expand Down
2 changes: 1 addition & 1 deletion pkg/ddc/alluxio/transform_fuse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestTransformFuseWithNoArgs(t *testing.T) {
MountPoint: "local:///mnt/test",
Name: "test",
}},
}}, &Alluxio{}, "--fuse-opts=kernel_cache,ro,max_read=131072,max_readahead=0,attr_timeout=7200,entry_timeout=7200,nonempty,allow_other"},
}}, &Alluxio{}, "--fuse-opts=kernel_cache,ro,max_read=131072,attr_timeout=7200,entry_timeout=7200,nonempty,allow_other"},
}
for _, test := range tests {
engine := &AlluxioEngine{Log: log.NullLogger{}}
Expand Down
2 changes: 1 addition & 1 deletion pkg/ddc/alluxio/transform_optimization.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (e *AlluxioEngine) optimizeDefaultFuse(runtime *datav1alpha1.AlluxioRuntime
if len(runtime.Spec.Fuse.Args) > 0 {
value.Fuse.Args = runtime.Spec.Fuse.Args
} else {
value.Fuse.Args = []string{"fuse", "--fuse-opts=kernel_cache,ro,max_read=131072,max_readahead=0,attr_timeout=7200,entry_timeout=7200,nonempty"}
value.Fuse.Args = []string{"fuse", "--fuse-opts=kernel_cache,ro,max_read=131072,attr_timeout=7200,entry_timeout=7200,nonempty"}
}

}
2 changes: 1 addition & 1 deletion pkg/ddc/alluxio/transform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestTransformFuse(t *testing.T) {
GID: &x,
},
},
}, &Alluxio{}, []string{"fuse", "--fuse-opts=kernel_cache,ro,max_read=131072,max_readahead=0,attr_timeout=7200,entry_timeout=7200,nonempty,uid=1000,gid=1000,allow_other"}},
}, &Alluxio{}, []string{"fuse", "--fuse-opts=kernel_cache,ro,max_read=131072,attr_timeout=7200,entry_timeout=7200,nonempty,uid=1000,gid=1000,allow_other"}},
}
for _, test := range tests {
engine := &AlluxioEngine{}
Expand Down
4 changes: 4 additions & 0 deletions samples/accelerate/runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ spec:
alluxio.user.local.reader.chunk.size.bytes: 256MB
alluxio.worker.network.reader.buffer.size: 256MB
alluxio.user.streaming.data.timeout: 300sec
fuse:
args:
- fuse
- --fuse-opts=kernel_cache,ro,max_read=131072,attr_timeout=7200,entry_timeout=7200,nonempty,max_readahead=0
4 changes: 4 additions & 0 deletions samples/co-locality/runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ spec:
alluxio.user.local.reader.chunk.size.bytes: 256MB
alluxio.worker.network.reader.buffer.size: 256MB
alluxio.user.streaming.data.timeout: 300sec
fuse:
args:
- fuse
- --fuse-opts=kernel_cache,ro,max_read=131072,attr_timeout=7200,entry_timeout=7200,nonempty,max_readahead=0
2 changes: 1 addition & 1 deletion samples/ufspath/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
labels:
app: nginx
spec:
replicas: 1
replicas: 2
serviceName: "nginx"
podManagementPolicy: "Parallel"
selector: # define how the deployment finds the pods it manages
Expand Down
3 changes: 3 additions & 0 deletions samples/ufspath/dataset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ spec:
alluxio.user.local.reader.chunk.size.bytes: 256MB
alluxio.worker.network.reader.buffer.size: 256MB
alluxio.user.streaming.data.timeout: 300sec
args:
- fuse
- --fuse-opts=kernel_cache,ro,max_read=131072,attr_timeout=7200,entry_timeout=7200,nonempty,max_readahead=0

0 comments on commit 9836259

Please sign in to comment.