Repository navigation
Closed
Description
Starting a large data set (32gb allocated, 4gb resident) in the api server causes about 7.5gb allocations of regexp.(*bitState).reset. The tree for that shows:
1.56GB 100% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/OpenAPIv2.NewParameter
0 0% 23.08% 1.56GB 4.76% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/OpenAPIv2.NewBodyParameter
1.14GB 72.82% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/compiler.PatternMatches
0.40GB 25.67% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/compiler.InvalidKeysInMap
0.02GB 1.51% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/OpenAPIv2.NewSchema
----------------------------------------------------------+-------------
0.23GB 100% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/OpenAPIv2.NewDocument
0 0% 23.08% 0.23GB 0.72% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/OpenAPIv2.NewDefinitions
0.23GB 100% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/OpenAPIv2.NewSchema
----------------------------------------------------------+-------------
7.56GB 100% | github.com/openshift/origin/vendor/k8s.io/apiserver/pkg/server/openapi.toProtoBinary
0 0% 23.08% 7.56GB 23.08% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/OpenAPIv2.NewDocument
7.32GB 96.90% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/OpenAPIv2.NewPaths
0.23GB 3.10% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/OpenAPIv2.NewDefinitions
----------------------------------------------------------+-------------
0.10GB 100% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/OpenAPIv2.NewSchemaItem
0 0% 23.08% 0.10GB 0.31% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/OpenAPIv2.NewFileSchema
0.06GB 56.66% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/compiler.PatternMatches
0.04GB 43.34% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/compiler.InvalidKeysInMap
----------------------------------------------------------+-------------
1.08GB 100% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/OpenAPIv2.NewNonBodyParameter
0 0% 23.08% 1.08GB 3.29% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/OpenAPIv2.NewFormDataParameterSubSchema
1.06GB 97.95% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/compiler.PatternMatches
0.02GB 2.05% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/compiler.InvalidKeysInMap
----------------------------------------------------------+-------------
1.12GB 100% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/OpenAPIv2.NewNonBodyParameter
0 0% 23.08% 1.12GB 3.41% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/OpenAPIv2.NewHeaderParameterSubSchema
1.10GB 98.42% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/compiler.PatternMatches
0.02GB 1.58% | github.com/openshift/origin/vendor/github.com/googleapis/gnostic/compiler.InvalidKeysInMap
Is OpenAPI being invoked excessively from some place? Is this only dynamic discovery?
Activity
smarterclayton commentedon Jul 28, 2017
This is one of the top reasons integration is slow. here's the allocations from a single integration run:
@deads2k this is almost obscene, and is mostly what is causing your problems with slow integration.
smarterclayton commentedon Jul 28, 2017
I ran the parallel integration suite. It took 1400 seconds on an 8 hyper thread mac and ALL cores were at 100% the entire time. I.e. about 3 core hours to run the suite.
CPU for the test above (across 3 runs to get better metrics):
smarterclayton commentedon Jul 28, 2017
The 20% of CPU we are spending in openapi is creating 30% of our garbage, which probably accounts for the bulk of the 40% of our time we spend in GC. So I'm comfortable with saying that the problem that has to be fixed is to make this disappear - we do that, and you should cut the integration test runtime to a third of what it is today.
I'd like to get a volunteer to go fix this.
deads2k commentedon Jul 28, 2017
Opened kubernetes/kubernetes#49776 upstream and I'll see what workarounds we have in our 3.7.
Merge pull request #15528 from deads2k/agg-14-disconnectopenapi
smarterclayton commentedon Jul 31, 2017
So... sometime around 2-3pm today we went back to taking 2h10m. I don't know that it's #15537, but it's the only thing I know of that touched integration today.