Bug 34138

Summary: Move /var/lib/xenstore/tdb on tmpfs
Product: UCS Reporter: Philipp Hahn <hahn>
Component: Virtualization - XenAssignee: UCS maintainers <ucs-maintainers>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P5 CC: gohmann, walkenhorst
Version: UCS 3.2   
Target Milestone: UCS 3.x   
Hardware: All   
OS: Linux   
What kind of report is it?: --- What type of bug is this?: ---
Who will be affected by this bug?: --- How will those affected feel about the bug?: ---
User Pain: Enterprise Customer affected?:
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional): Large environments, UCS Performance
Max CVSS v3 score:
Bug Depends on: 28309    
Bug Blocks:    

Description Philipp Hahn univentionstaff 2014-02-17 14:27:52 CET
Ticket#: 2014021721004459

I a large Xen environment with 18 VMs running on a single host, xenstored generated so much load, that "virsh list" took ages and "virsh dumpxml $DOM" didn't return for several minutes.

This is caused by
xen/tools/python/xen/xend/XendDomainInfo.py # _update_consoles()
1638                     # The value is unchanged. Just for xenstore watcher
1639                     console_ctrl.writeBackend(0, 'uuid', console_uuid)
which writes back the DB for each VM looked up. Each lookup took roughly 1 seconds, for a total of 15 seconds for all 18 VMs. As UVMMd is querying all VMs every 30 seconds, this seems to get in some kind of loop.
("virsh dumpxml $DOM" also iterates over all VMs, even wen $DOM matches the name/UUID/ID.)

Putting the tdb on a tempfs solved the problem. We should do something like the following for Xen systems:
  echo "xenstored /var/lib/xenstored tmpfs rw,mode=755 0 0" >>/etc/fstab

+++ This bug was initially created as a clone of Bug #28309 +++
The original bug only added zapping the /var/lib/xenstored/tdb file for reboots.
In newer Debian the file is in /var/run/=/run/=tmpfs by default.
Comment 1 Philipp Hahn univentionstaff 2017-04-21 16:23:59 CEST
UCS-3.x is OoM.
Xen is OoM.