Skip to content

Commit 8f80aa8

Browse files
authored
Merge pull request #34148 from apinnick/mig747-cached-clients
MIG-747: Cached clients (MTC 1.5.0)
2 parents e638805 + 6f3da8f commit 8f80aa8

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,6 @@ include::modules/migration-writing-ansible-playbook-hook.adoc[leveloffset=+2]
4343
include::modules/migration-changing-migration-plan-limits.adoc[leveloffset=+1]
4444
include::modules/migration-excluding-resources.adoc[leveloffset=+1]
4545
include::modules/migration-enabling-pv-resizing-dvm.adoc[leveloffset=+1]
46+
include::modules/migration-enabling-cached-kubernetes-clients.adoc[leveloffset=+1]
4647

4748
:advanced-migration-options-3-4!:

migration-toolkit-for-containers/advanced-migration-options-mtc.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ include::modules/migration-writing-ansible-playbook-hook.adoc[leveloffset=+2]
4242
include::modules/migration-changing-migration-plan-limits.adoc[leveloffset=+1]
4343
include::modules/migration-excluding-resources.adoc[leveloffset=+1]
4444
include::modules/migration-enabling-pv-resizing-dvm.adoc[leveloffset=+1]
45+
include::modules/migration-enabling-cached-kubernetes-clients.adoc[leveloffset=+1]
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * migrating_from_ocp_3_to_4/advanced-migration-options-3-4.adoc
4+
// * migration-toolkit-for-containers/advanced-migration-options-mtc.adoc
5+
6+
[id="migration-enabling-cached-kubernetes-clients_{context}"]
7+
= Enabling cached Kubernetes clients
8+
9+
You can enable cached Kubernetes clients in the `MigrationController` custom resource (CR) for improved performance during migration. The greatest performance benefit is displayed when migrating between clusters in different regions or with significant network latency.
10+
11+
[NOTE]
12+
====
13+
Delegated tasks, for example, Rsync backup for direct volume migration or Velero backup and restore, however, do not show improved performance with cached clients.
14+
====
15+
16+
Cached clients require extra memory because the `MigrationController` CR caches all API resources that are required for interacting with `MigCluster` CRs. Requests that are normally sent to the API server are directed to the cache instead. The cache watches the API server for updates.
17+
18+
You can increase the memory limits and requests of the `MigrationController` CR if `OOMKilled` errors occur after you enable cached clients.
19+
20+
.Procedure
21+
22+
. Enable cached clients by running the following command:
23+
+
24+
[source,terminal]
25+
----
26+
$ oc -n openshift-migration patch migrationcontroller migration-controller --type=json --patch \
27+
'[{ "op": "replace", "path": "/spec/mig_controller_enable_cache", "value": true}]'
28+
----
29+
30+
. Optional: Increase the `MigrationController` CR memory limits by running the following command:
31+
+
32+
[source,terminal]
33+
----
34+
$ oc -n openshift-migration patch migrationcontroller migration-controller --type=json --patch \
35+
'[{ "op": "replace", "path": "/spec/mig_controller_limits_memory", "value": <10Gi>}]'
36+
----
37+
38+
. Optional: Increase the `MigrationController` CR memory requests by running the following command:
39+
+
40+
[source,terminal]
41+
----
42+
$ oc -n openshift-migration patch migrationcontroller migration-controller --type=json --patch \
43+
'[{ "op": "replace", "path": "/spec/mig_controller_requests_memory", "value": <350Mi>}]'
44+
----

0 commit comments

Comments
 (0)