go tool pprof 127.0.0.1:6000/debug/pprof/allocs Fetching profile over HTTP from http://127.0.0.1:6000/debug/pprof/allocs Saved profile in /home/adr/pprof/pprof.kcp.alloc_objects.alloc_space.inuse_objects.inuse_space.005.pb.gz File: kcp Type: alloc_space Time: Oct 5, 2023 at 12:31pm (CEST) Entering interactive mode (type "help" for commands, "o" for options) (pprof) top30 Showing nodes accounting for 3.94GB, 52.22% of 7.55GB total Dropped 2859 nodes (cum <= 0.04GB) Showing top 30 nodes out of 512 flat flat% sum% cum cum% 0.54GB 7.13% 7.13% 0.70GB 9.33% k8s.io/apimachinery/pkg/apis/meta/v1.(*ObjectMeta).DeepCopyInto 0.36GB 4.76% 11.90% 0.36GB 4.76% go.etcd.io/etcd/server/v3/mvcc/backend.(*bucketBuffer).Copy 0.26GB 3.49% 15.38% 0.99GB 13.14% k8s.io/api/rbac/v1.(*ClusterRoleBinding).DeepCopy (inline) 0.25GB 3.28% 18.67% 0.25GB 3.28% github.com/prometheus/client_golang/prometheus.(*histogram).Write 0.24GB 3.24% 21.91% 0.24GB 3.24% k8s.io/apimachinery/pkg/runtime.DeepCopyJSONValue 0.23GB 3.08% 24.99% 0.23GB 3.08% k8s.io/utils/buffer.NewRingGrowing 0.17GB 2.22% 27.20% 0.17GB 2.22% google.golang.org/grpc/internal/transport.(*serverHandlerTransport).HandleStreams.func5 0.16GB 2.07% 29.27% 0.37GB 4.87% encoding/json.mapEncoder.encode 0.13GB 1.74% 31.01% 0.13GB 1.74% k8s.io/apimachinery/pkg/conversion.ConversionFuncs.AddUntyped 0.13GB 1.72% 32.73% 0.13GB 1.72% k8s.io/apimachinery/pkg/apis/meta/v1.(*FieldsV1).DeepCopyInto (inline) 0.12GB 1.62% 34.35% 0.20GB 2.65% k8s.io/apimachinery/pkg/runtime.(*Scheme).AddKnownTypeWithName 0.12GB 1.58% 35.93% 0.12GB 1.58% bytes.growSlice 0.10GB 1.36% 37.29% 0.10GB 1.36% reflect.copyVal 0.10GB 1.27% 38.56% 0.10GB 1.27% go.etcd.io/etcd/api/v3/mvccpb.(*KeyValue).Unmarshal 0.09GB 1.24% 39.80% 0.09GB 1.24% k8s.io/apiextensions-apiserver/pkg/apiserver/schema/defaulting.getSchemaForField 0.09GB 1.18% 40.98% 0.09GB 1.18% k8s.io/apimachinery/pkg/apis/meta/v1/unstructured.setNestedFieldNoCopy 0.08GB 1.13% 42.11% 0.12GB 1.54% sigs.k8s.io/json/internal/golang/encoding/json.(*decodeState).objectInterface 0.08GB 1.07% 43.18% 0.10GB 1.27% k8s.io/apiextensions-apiserver/pkg/apiserver/schema/objectmeta.(*coercer).coerce 0.08GB 1.05% 44.23% 0.37GB 4.88% encoding/json.Marshal 0.07GB 0.93% 45.17% 0.07GB 0.93% net/http.(*Request).WithContext 0.06GB 0.8% 45.96% 0.07GB 0.94% encoding/json.(*decodeState).objectInterface 0.06GB 0.78% 46.74% 0.06GB 0.79% k8s.io/apiextensions-apiserver/pkg/apiserver/schema/pruning.prune 0.06GB 0.76% 47.50% 0.06GB 0.76% internal/reflectlite.Swapper 0.06GB 0.73% 48.23% 0.07GB 0.92% compress/flate.NewWriter 0.05GB 0.73% 48.96% 0.05GB 0.73% github.com/json-iterator/go.Parse 0.05GB 0.71% 49.66% 0.05GB 0.71% go.etcd.io/etcd/server/v3/mvcc/backend.newBucketBuffer 0.05GB 0.69% 50.35% 1.07GB 14.17% github.com/kcp-dev/kcp/pkg/virtual/framework/wrappers/rbac.mergedClusterRoleBindingLister.List 0.05GB 0.65% 51.00% 0.05GB 0.65% golang.org/x/net/http2.(*Framer).readMetaFrame.func1 0.05GB 0.62% 51.62% 0.73GB 9.65% k8s.io/api/rbac/v1.(*ClusterRoleBinding).DeepCopyInto 0.05GB 0.6% 52.22% 0.05GB 0.6% runtime/pprof.writeGoroutineStacks