Skip to content

feat(NFS Server): add support to configure resource requirements on NFS Server#92

Merged
mynktl merged 3 commits intoopenebs-archive:developfrom
mittachaitu:server_req_limits
Aug 24, 2021
Merged

feat(NFS Server): add support to configure resource requirements on NFS Server#92
mynktl merged 3 commits intoopenebs-archive:developfrom
mittachaitu:server_req_limits

Conversation

@mittachaitu
Copy link
Copy Markdown
Contributor

@mittachaitu mittachaitu commented Aug 18, 2021

Pull Request template

Why is this PR required? What issue does it fix?:
This PR ensures the QoS of NFS server by providing a way to configure
resource requests & limits on server deployment via NFS SC.

What this PR does?:
This PR adds support to configure resource requirements[requests & limits]
for NFS Server via NFS StorageClass. Values specified in StorageClass
annotation(.metadata.annotation.cas\.openebs\.io/config) will be propagated
to NFS Server deployment.

Sample StorageClass With Limits & Requests:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: openebs-rwx
  annotations:
    openebs.io/cas-type: nfsrwx
    cas.openebs.io/config: |
      - name: NFSServerType
        value: "kernel"
      - name: BackendStorageClass
        value: "openebs-hostpath"
      #  NFSServerResourceRequests defines the resource requests for NFS Server
      - name: NFSServerResourceRequests
        value: |-
            memory: 50Mi
            cpu: 50m
      #  NFSServerResourceLimits defines the resource limits for NFS Server
      - name: NFSServerResourceLimits
        value: |-
            memory: 100Mi
            cpu: 100m
provisioner: openebs.io/nfsrwx
reclaimPolicy: Delete

Does this PR require any upgrade changes?:
No

If the changes in this PR are manually verified, list down the scenarios covered::

  • Deployed busy-box application without configuring server resource limits & requests.
  • Deployed busy-box application by configuring both server resource limits & requests on NFS SC.
  • Deployed busy-box application by configuring only server resource limits on NFS SC
  • Deployed busy-box application by configuring only server requests on NFS SC

Any additional information for your reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs

  • Verified consumption of RAM and CPU of NFS server by running various
    fio tests on NFS mount point. It was observed that user process running in
    NFS server pod doesn't consume much RAM & CPU, moreover, it was observed
    that CPU usage went to ~8millicores and RAM is at ~5Mb(Irrespective of workload).
    To have a definite QoS NFS Server request can have 50Mi memory and 50m cpu and
    limits can go till 100Mi memory and 100m cpu.
  • IOs will be processing by Kernel space process i.e nfsd(It will consume more CPU ~3cores at
    peak time) more information and stats are available in this doc.

TODO

Checklist:

…FS Server

This PR adds support to configure resource requirements[requests & limits]
for NFS Server via NFS StorageClass. Values specified in StorageClass annotation
will be propogated to NFS Server deployment.

**Sample NFS SC YAML**:
```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: openebs-rwx
  annotations:
    openebs.io/cas-type: nfsrwx
    cas.openebs.io/config: |
      - name: NFSServerType
        value: "kernel"
      - name: BackendStorageClass
        value: "openebs-hostpath"
      #  NFSServerResourceRequests defines the resource requests for NFS Server
      - name: NFSServerResourceRequests
        value: |-
            memory: 50Mi
            cpu: 50m
      #  NFSServerResourceLimits defines the resource limits for NFS Server
      - name: NFSServerResourceLimits
        value: |-
            memory: 100Mi
            cpu: 100m
provisioner: openebs.io/nfsrwx
reclaimPolicy: Delete
```

Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 18, 2021

Codecov Report

Merging #92 (2a81ff6) into develop (d995814) will increase coverage by 0.03%.
The diff coverage is 36.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #92      +/-   ##
===========================================
+ Coverage    46.85%   46.89%   +0.03%     
===========================================
  Files           29       29              
  Lines         2356     2380      +24     
===========================================
+ Hits          1104     1116      +12     
- Misses        1174     1185      +11     
- Partials        78       79       +1     
Impacted Files Coverage Δ
provisioner/provisioner_kernel_nfs_server.go 0.00% <0.00%> (ø)
provisioner/config.go 12.19% <40.00%> (+12.19%) ⬆️
provisioner/helper_kernel_nfs_server.go 79.63% <60.00%> (-0.44%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d995814...2a81ff6. Read the comment docs.

@mittachaitu mittachaitu requested review from kmova and mynktl August 18, 2021 14:30
@mittachaitu mittachaitu self-assigned this Aug 18, 2021
@mynktl mynktl added the enhancement New feature or request label Aug 23, 2021
…st & limits

Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
@mynktl mynktl merged commit 817441c into openebs-archive:develop Aug 24, 2021
mittachaitu pushed a commit that referenced this pull request Aug 30, 2021
…FS Server (#92)

This PR adds support to configure resource requirements[requests & limits]
for NFS Server via NFS StorageClass. Values specified in StorageClass annotation
will be propagated to NFS Server deployment.

**Sample NFS SC YAML**:
```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: openebs-rwx
  annotations:
    openebs.io/cas-type: nfsrwx
    cas.openebs.io/config: |
      - name: NFSServerType
        value: "kernel"
      - name: BackendStorageClass
        value: "openebs-hostpath"
      #  NFSServerResourceRequests defines the resource requests for NFS Server
      - name: NFSServerResourceRequests
        value: |-
            memory: 50Mi
            cpu: 50m
      #  NFSServerResourceLimits defines the resource limits for NFS Server
      - name: NFSServerResourceLimits
        value: |-
            memory: 100Mi
            cpu: 100m
provisioner: openebs.io/nfsrwx
reclaimPolicy: Delete
```

Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request release-activity PR needs to be considered for releaes activity, i.e chart release, changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants