Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support pin mo binary in memory #568

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions api/core/v1alpha1/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ type PodSet struct {
// OperatorVersion is the controller version of mo-operator that should be used to
// reconcile this set
OperatorVersion *string `json:"operatorVersion,omitempty"`

// MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
// Binary would be loaded from disk if MemoryFsSize is not set
// +optional
MemoryFsSize *resource.Quantity `json:"memoryFsSize,omitempty"`
}

// MainContainer is the description of the main container of a Pod
Expand Down
4 changes: 4 additions & 0 deletions api/core/v1alpha1/matrixonecluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package v1alpha1

import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down Expand Up @@ -99,6 +100,9 @@ type MatrixOneClusterSpec struct {
SemanticVersion *string `json:"semanticVersion,omitempty"`

OperatorVersion *string `json:"operatorVersion,omitempty"`

// +optional
MemoryFsSize *resource.Quantity `json:"memoryFsSize,omitempty"`
}

func (m *MatrixOneCluster) GetMetricReaderEnabled() bool {
Expand Down
10 changes: 10 additions & 0 deletions api/core/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,15 @@ spec:
image:
description: Image is the docker image of the main container
type: string
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,15 @@ spec:
image:
description: Image is the docker image of the main container
type: string
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ spec:
image:
description: Image is the docker image of the main container
type: string
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ spec:
from the given path when hakeeper is bootstrapped
type: string
type: object
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,15 @@ spec:
image:
description: Image is the docker image of the main container
type: string
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down Expand Up @@ -477,6 +486,15 @@ spec:
image:
description: Image is the docker image of the main container
type: string
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down Expand Up @@ -828,6 +846,15 @@ spec:
image:
description: Image is the docker image of the main container
type: string
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down Expand Up @@ -1032,6 +1059,15 @@ spec:
from the given path when hakeeper is bootstrapped
type: string
type: object
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down Expand Up @@ -1261,6 +1297,12 @@ spec:
- sharedStorage
- volume
type: object
memoryFsSize:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
metricReaderEnabled:
description: |-
MetricReaderEnabled enables metric reader for operator and other apps to query
Expand Down Expand Up @@ -1298,6 +1340,15 @@ spec:
image:
description: Image is the docker image of the main container
type: string
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down Expand Up @@ -1488,6 +1539,15 @@ spec:
image:
description: Image is the docker image of the main container
type: string
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down Expand Up @@ -1697,6 +1757,15 @@ spec:
image:
description: Image is the docker image of the main container
type: string
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down Expand Up @@ -2019,6 +2088,15 @@ spec:
description: PullPolicy describes a policy for if/when to pull
a container image
type: string
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ spec:
image:
description: Image is the docker image of the main container
type: string
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ spec:
description: PullPolicy describes a policy for if/when to pull a container
image
type: string
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down
9 changes: 9 additions & 0 deletions deploy/crds/core.matrixorigin.io_cnpools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,15 @@ spec:
image:
description: Image is the docker image of the main container
type: string
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down
9 changes: 9 additions & 0 deletions deploy/crds/core.matrixorigin.io_cnsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,15 @@ spec:
image:
description: Image is the docker image of the main container
type: string
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down
9 changes: 9 additions & 0 deletions deploy/crds/core.matrixorigin.io_dnsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ spec:
image:
description: Image is the docker image of the main container
type: string
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down
9 changes: 9 additions & 0 deletions deploy/crds/core.matrixorigin.io_logsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ spec:
from the given path when hakeeper is bootstrapped
type: string
type: object
memoryFsSize:
anyOf:
- type: integer
- type: string
description: |-
MemoryFsSize is the size of memory filesystem, which will be used to store matrixone binary to skip page cache overhead
Binary would be loaded from disk if MemoryFsSize is not set
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
memoryLimitPercent:
description: |-
MemoryLimitPercent is percent used to set GOMEMLIMIT env, its value must be in interval (0, 100].
Expand Down
Loading
Loading