This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2024555 - Move zero page detection to multifd threads
Summary: Move zero page detection to multifd threads
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: qemu-kvm
Version: 9.0
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: beta
: 9.0
Assignee: Juan Quintela
QA Contact: Li Xiaohui
URL:
Whiteboard:
Depends On:
Blocks: 2054231
TreeView+ depends on / blocked
 
Reported: 2021-11-18 10:38 UTC by Juan Quintela
Modified: 2023-09-22 17:32 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-22 17:32:24 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-7488 0 None Migrated None 2023-09-22 17:32:17 UTC
Red Hat Issue Tracker RHELPLAN-103140 0 None None None 2021-11-18 10:41:12 UTC

Description Juan Quintela 2021-11-18 10:38:58 UTC
Description of problem:

Whith huge memory guests (multi terabyte ram size), zero page detection takes too much time.  Move the code that detects zero pages to the multifd threads.

Version-Release number of selected component (if applicable):

All.

How reproducible:

Migrate with a 4TB guest.


Actual results:

Ends having more than 74% of the time on is_zero page


Expected results:

is_zero_page don't show on the main thread profile.  This is the main performance bottleneck.

Additional info:

Comment 1 Juan Quintela 2021-11-18 12:09:48 UTC
This values were colected by Peter Xu.  One can see how long it takes to do the is_zero_range()


Idle guest precopy test
(Corresponds to "idle db")
==========================

Summary: Most cpu time consumed on zero page detection.  live_migration eats
100% cpu.  Expected.

+   74.73%     0.07%  qemu-system-x86_64       [.] is_zero_range
+   74.66%     0.18%  qemu-system-x86_64       [.] buffer_is_zero
+   74.46%     0.12%  qemu-system-x86_64       [.] select_accel_fn
+   74.37%    74.23%  qemu-system-x86_64       [.] buffer_zero_avx2
+   51.77%     0.29%  qemu-system-x86_64       [.] ram_save_host_page
+   48.75%     0.23%  qemu-system-x86_64       [.] ram_save_target_page
+   47.60%     0.18%  qemu-system-x86_64       [.] save_zero_page
+   47.42%     0.14%  qemu-system-x86_64       [.] save_zero_page_to_file
+   35.42%     0.00%  qemu-system-x86_64       [.] ram_save_iterate

Comment 5 Li Xiaohui 2023-04-21 02:50:01 UTC
Have requested Nitesh and Juan to help see this bug, below is the talk through Gchat:
-- I: this bug is close to out of stale, it's an RFE bug, do we have the plan to support it on RHEL 9.3.0?
-- Nitesh: I have requested Juan to update the status once he does that we will extend the stale date


Let's wait for Juan's update.

Comment 7 Juan Quintela 2023-05-08 14:46:40 UTC
Hi
So get meassurement this working, I got that our counters are not up to the task.  I started improving the counters upstream, last sent url was:

[PATCH 00/21] Migration: More migration atomic counters
https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg01870.html
Migration: Make more ram_counters atomic (v4)
https://lists.gnu.org/archive/html/qemu-devel/2023-04/msg04210.html
[PATCH v3 00/12] Migration: Make more ram_counters atomic
https://www.mail-archive.com/qemu-devel@nongnu.org/msg955025.html

There has been more in the last three weeks.  After that the zero page detection is only three patches on top of that.

Thanks, Juan.

Comment 8 Juan Quintela 2023-05-08 14:59:44 UTC
There is no easy way to check that the counters are better quality.  But there is one that before was completely wrong and that is multifd_bytes when we are using multifd compression.  With the old code it shows as if there is no compression, transferred_bytes = number of pages * page_size (+ some headers sizes), with the new ones it is much smaller (depending of the compression of the pages we are talking about).

Comment 9 RHEL Program Management 2023-09-22 17:31:27 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 10 RHEL Program Management 2023-09-22 17:32:24 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


Note You need to log in before you can comment on or make changes to this bug.