summaryrefslogtreecommitdiffstats
path: root/spec/acfg/if/imfs-memfile-bytes-per-block.yml
blob: 7f7ed899ffd86edf966bf4e675c2cfe75f5ec0f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
appl-config-option-type: integer
constraints:
  set:
  - 16
  - 32
  - 64
  - 128
  - 256
  - 512
copyrights:
- Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)
default-value: 128
description: |
  The value of this configuration option defines the block size for in-memory
  files managed by the IMFS.
enabled-by: true
index-entries: []
interface-type: appl-config-option
links:
- role: appl-config-group-member
  uid: group-filesystem
name: CONFIGURE_IMFS_MEMFILE_BYTES_PER_BLOCK
notes: |
  The configured block size has two impacts. The first is the average amount of
  unused memory in the last block of each file.  For example, when the block
  size is 512, on average one-half of the last block of each file will remain
  unused and the memory is wasted. In contrast, when the block size is 16, the
  average unused memory per file is only 8 bytes. However, it requires more
  allocations for the same size file and thus more overhead per block for the
  dynamic memory management.

  Second, the block size has an impact on the maximum size file that can be
  stored in the IMFS. With smaller block size, the maximum file size is
  correspondingly smaller. The following shows the maximum file size possible
  based on the configured block size:

  * when the block size is 16 bytes, the maximum file size is 1,328 bytes.

  * when the block size is 32 bytes, the maximum file size is 18,656 bytes.

  * when the block size is 64 bytes, the maximum file size is 279,488 bytes.

  * when the block size is 128 bytes, the maximum file size is 4,329,344 bytes.

  * when the block size is 256 bytes, the maximum file size is 68,173,568 bytes.

  * when the block size is 512 bytes, the maximum file size is 1,082,195,456
    bytes.
text: ''
type: interface