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

Improve performance of zhmc_partition with state=facts #654

Open
andy-maier opened this issue Apr 28, 2023 · 0 comments
Open

Improve performance of zhmc_partition with state=facts #654

andy-maier opened this issue Apr 28, 2023 · 0 comments

Comments

@andy-maier
Copy link
Member

andy-maier commented Apr 28, 2023

The current implementation of the zhmc_partition module for state=facts and no additinal expansion properties issues these HMC calls:

2023-04-28T13:56:22+0200 DEBUG zhmc_partition 46106 Module entry: params: {'hmc_host': '9.114.87.7', 'state': 'facts', 'cpc_name': 'T224', 'name': 't224-image-build-1', 'log_file':
2023-04-28T13:56:22+0200 DEBUG zhmcclient.hmc 46106 Request: POST https://9.114.87.7:6794/api/sessions, headers: {'User-Agent': 'python-zhmcclient/1.7.0', 'Content-type': 'applicat
2023-04-28T13:56:23+0200 DEBUG zhmcclient.hmc 46106 Respons: POST https://9.114.87.7:6794/api/sessions, status: 200, headers: {'Strict-Transport-Security': 'max-age=0', 'X-Frame-Op
2023-04-28T13:56:23+0200 DEBUG zhmcclient.hmc 46106 Request: GET https://9.114.87.7:6794/api/cpcs, headers: {'User-Agent': 'python-zhmcclient/1.7.0', 'Content-type': 'application/j
2023-04-28T13:56:23+0200 DEBUG zhmcclient.hmc 46106 Respons: GET https://9.114.87.7:6794/api/cpcs, status: 200, headers: {'Strict-Transport-Security': 'max-age=0', 'X-Frame-Options
2023-04-28T13:56:23+0200 DEBUG zhmcclient.hmc 46106 Request: GET https://9.114.87.7:6794/api/cpcs/7b5a7c96-41bc-3815-82ea-55c6826079b8/partitions, headers: {'User-Agent': 'python-z
2023-04-28T13:56:23+0200 DEBUG zhmcclient.hmc 46106 Respons: GET https://9.114.87.7:6794/api/cpcs/7b5a7c96-41bc-3815-82ea-55c6826079b8/partitions, status: 200, headers: {'Strict-Tr
2023-04-28T13:56:23+0200 DEBUG zhmcclient.hmc 46106 Request: GET https://9.114.87.7:6794/api/partitions/45341a20-2c28-11ec-be95-00106f240e88, headers: {'User-Agent': 'python-zhmccl
2023-04-28T13:56:23+0200 DEBUG zhmcclient.hmc 46106 Respons: GET https://9.114.87.7:6794/api/partitions/45341a20-2c28-11ec-be95-00106f240e88, status: 200, headers: {'Strict-Transpo
2023-04-28T13:56:23+0200 DEBUG zhmcclient.hmc 46106 Request: GET https://9.114.87.7:6794/api/partitions/45341a20-2c28-11ec-be95-00106f240e88/nics/4f4eec30-53fe-11ec-8975-00106f240e
2023-04-28T13:56:23+0200 DEBUG zhmcclient.hmc 46106 Respons: GET https://9.114.87.7:6794/api/partitions/45341a20-2c28-11ec-be95-00106f240e88/nics/4f4eec30-53fe-11ec-8975-00106f240e
2023-04-28T13:56:23+0200 DEBUG zhmcclient.hmc 46106 Request: GET https://9.114.87.7:6794/api/cpcs/7b5a7c96-41bc-3815-82ea-55c6826079b8/virtual-switches, headers: {'User-Agent': 'py
2023-04-28T13:56:23+0200 DEBUG zhmcclient.hmc 46106 Respons: GET https://9.114.87.7:6794/api/cpcs/7b5a7c96-41bc-3815-82ea-55c6826079b8/virtual-switches, status: 200, headers: {'Str
2023-04-28T13:56:23+0200 DEBUG zhmcclient.hmc 46106 Request: GET https://9.114.87.7:6794/api/virtual-switches/36924b5c-52ec-11ea-a210-00106f240e88, headers: {'User-Agent': 'python-
2023-04-28T13:56:23+0200 DEBUG zhmcclient.hmc 46106 Respons: GET https://9.114.87.7:6794/api/virtual-switches/36924b5c-52ec-11ea-a210-00106f240e88, status: 200, headers: {'Strict-T
2023-04-28T13:56:23+0200 DEBUG zhmcclient.hmc 46106 Request: GET https://9.114.87.7:6794/api/cpcs/7b5a7c96-41bc-3815-82ea-55c6826079b8/adapters, headers: {'User-Agent': 'python-zhm
2023-04-28T13:56:24+0200 DEBUG zhmcclient.hmc 46106 Respons: GET https://9.114.87.7:6794/api/cpcs/7b5a7c96-41bc-3815-82ea-55c6826079b8/adapters, status: 200, headers: {'Strict-Tran
2023-04-28T13:56:24+0200 DEBUG zhmcclient.hmc 46106 Request: DELETE https://9.114.87.7:6794/api/sessions/this-session, headers: {'User-Agent': 'python-zhmcclient/1.7.0', 'Content-t
2023-04-28T13:56:24+0200 DEBUG zhmcclient.hmc 46106 Respons: DELETE https://9.114.87.7:6794/api/sessions/this-session, status: 204, headers: {'Strict-Transport-Security': 'max-age=
2023-04-28T13:56:24+0200 DEBUG zhmc_partition 46106 Module exit (success): changed: False, cpc: {'maximum-memory': 16384, 'permit-des-key-import-functions': True, 'parent': '/api/c

Potential for performance improvements:

  • GET cpcs could be eliminated if GET partitions is done with name/cpc-name filter in order to get the partition URI. The required filter support in PartitionManager.list() should already be there, but maybe the server-side properties need to be updated or made dependent on the HMC/SE version.
  • GET nic, GET virtual-switches, GET virtual-switch, GET adapters are probably all caused by expanding nics by default. That could be turned off by default and made user-controllable via an expand_nics parameter like it is already done for storage groups. Ideally, we want the NIC names in the nics property, but the problem is that NICs are element objects, so there is no list operation for them, and so this would require at least a loop through Get NIC Properties using nic-uris.
@andy-maier andy-maier self-assigned this Apr 28, 2023
@andy-maier andy-maier added this to the 1.4.0 milestone Apr 28, 2023
@andy-maier andy-maier changed the title Improve zhmc_partition state=facts Improve performance of zhmc_partition with state=facts Apr 28, 2023
@andy-maier andy-maier modified the milestones: 1.4.0, 1.5.0 Jun 21, 2023
@andy-maier andy-maier modified the milestones: 1.5.0, 1.6.0 Jul 17, 2023
@andy-maier andy-maier modified the milestones: 1.6.0, 1.8.0 Aug 4, 2023
@andy-maier andy-maier modified the milestones: 1.8.0, 1.9.0 Jan 9, 2024
@andy-maier andy-maier removed their assignment Jan 12, 2024
@andy-maier andy-maier modified the milestones: 1.9.0, 1.10.0 Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant