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

cpu tuning and Iothreads allocation GSoC #58196

Merged
merged 17 commits into from Nov 30, 2020
Merged

cpu tuning and Iothreads allocation GSoC #58196

merged 17 commits into from Nov 30, 2020

Conversation

gqlo
Copy link
Contributor

@gqlo gqlo commented Aug 14, 2020

What does this PR do?

Making IOThreads allocation available. These are dedicated event loop threads for supported disk devices to perform block I/O requests. Iothreads parameter specify the number of IOThreads to be assigned to the domain by supported target storage devices.

IOThreads can be pined using iothreadpin parameter in cputune which provides details regarding the CPU tunable parameters for the domain. cputune contains the following parameters:

  • vcpupin
  • emulatorpin
  • iothreadpin
  • shares
  • period
  • quota
  • global_period
  • global_quota
  • emulator_period
  • emulator_quota
  • iothread_period
  • iothread_quota
  • vcpusched, iothreadsched and emulatorsched
  • cachetune
  • memorytune

Detailed Libvirt domain xml info can be found at iothreads and cpu tuning

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes/No

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@gqlo gqlo changed the title support cpu tune and Iothreads allocation support cpu tune and Iothreads allocation GSoC Aug 19, 2020
@gqlo gqlo changed the title support cpu tune and Iothreads allocation GSoC cpu tune and Iothreads allocation GSoC Aug 19, 2020
@gqlo gqlo force-pushed the cpu_tune branch 2 times, most recently from 75fcca4 to 664874b Compare August 19, 2020 07:35
Copy link
Contributor

@cbosdo cbosdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comments inline. Also please merge the cputune-related commits into one

salt/modules/virt.py Outdated Show resolved Hide resolved
salt/modules/virt.py Outdated Show resolved Hide resolved
salt/states/virt.py Outdated Show resolved Hide resolved
salt/states/virt.py Outdated Show resolved Hide resolved
salt/modules/virt.py Outdated Show resolved Hide resolved
salt/modules/virt.py Outdated Show resolved Hide resolved
salt/modules/virt.py Show resolved Hide resolved
salt/modules/virt.py Outdated Show resolved Hide resolved
@gqlo gqlo force-pushed the cpu_tune branch 7 times, most recently from e64d146 to 8e0e3a5 Compare August 30, 2020 14:46
@gqlo gqlo force-pushed the cpu_tune branch 2 times, most recently from 6d2960e to 7321524 Compare September 1, 2020 23:31
@gqlo gqlo marked this pull request as ready for review September 2, 2020 00:44
@gqlo gqlo requested a review from a team as a code owner September 2, 2020 00:44
@ghost ghost requested review from Akm0d and removed request for a team September 2, 2020 00:44
@gqlo gqlo changed the title cpu tune and Iothreads allocation GSoC cpu tuning and Iothreads allocation GSoC Sep 2, 2020
Akm0d
Akm0d previously approved these changes Sep 2, 2020
Copy link
Contributor

@cbosdo cbosdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments to address.

salt/modules/virt.py Show resolved Hide resolved
salt/modules/virt.py Outdated Show resolved Hide resolved
salt/modules/virt.py Outdated Show resolved Hide resolved
salt/modules/virt.py Outdated Show resolved Hide resolved
salt/states/virt.py Outdated Show resolved Hide resolved
Copy link
Contributor

@cbosdo cbosdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another round of questions and things to enhance

salt/modules/virt.py Outdated Show resolved Hide resolved
salt/modules/virt.py Outdated Show resolved Hide resolved
salt/modules/virt.py Outdated Show resolved Hide resolved
salt/modules/virt.py Outdated Show resolved Hide resolved
tests/unit/modules/test_virt.py Outdated Show resolved Hide resolved
Copy link
Contributor

@cbosdo cbosdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still a Magnesium laying around, but the rest is OK

salt/states/virt.py Outdated Show resolved Hide resolved
cbosdo and others added 8 commits November 16, 2020 18:08
Add unit tests for _gen_xml() on the recently added memory parameters.
Also fixes an issue with an optional attribute.
Introduce mapping structures in order to help reusing the common patterns
in the virt._gen_xml() context pre processing.
In XPath the node numbers are counted from 1 rather than 0.
Thus /foo/bar[0] is invalid and should be /foo/bar[1].

Since in the change_xml function we are getting the index from python
lists in these cases, we need to offset these.
@gqlo
Copy link
Contributor Author

gqlo commented Nov 16, 2020

re-run centos

Copy link
Contributor

@cbosdo cbosdo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now

@cbosdo
Copy link
Contributor

cbosdo commented Nov 16, 2020

@dwoz could you please merge this PR?

@sagetherage sagetherage added the Aluminium Release Post Mg and Pre Si label Nov 30, 2020
@dwoz dwoz merged commit 50701b3 into saltstack:master Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Aluminium Release Post Mg and Pre Si
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants