Change in vdsm[master]: Improvement of the GuestAgent class memory usage

vfeenstr at redhat.com vfeenstr at redhat.com
Sun Dec 23 21:11:16 UTC 2012


Vinzenz Feenstra has posted comments on this change.

Change subject: Improvement of the GuestAgent class memory usage
......................................................................


Patch Set 9: (3 inline comments)

....................................................
File vdsm/guestIF.py
Line 58: 
Line 59: class GuestAgent ():
Line 60:     def __init__(self, socketName, channelListener, log, user='Unknown',
Line 61:                  ips='', connect=True):
Line 62:         self.MAX_MESSAGE_SIZE = \
Done
Line 63:             config.getint('vars', 'guest_agent_max_allowed_message_size')
Line 64:         self.log = log
Line 65:         self._sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
Line 66:         # Save the socket's fileno because a call to fileno() fails if the


Line 288:             line = ''.join(self._buffer) + line
Line 289:             self._clearReadBuffer()
Line 290:             if self._messageState is MessageState.TOO_BIG:
Line 291:                 self._messageState = MessageState.NORMAL
Line 292:                 self.log.warning("[GuestAgent._handleData] Not processing "
Done
Line 293:                                  "current message because it was too big")
Line 294:             else:
Line 295:                 self._processMessage(line)
Line 296: 


Line 300:         if self._bufferSize >= self.MAX_MESSAGE_SIZE:
Line 301:             self.log.warning("[GuestAgent._handleData] Discarding buffer with "
Line 302:                              "size: %d because the message reached maximum "
Line 303:                              "size of %d bytes before message end was reached."
Line 304:                              % (self._bufferSize, self.MAX_MESSAGE_SIZE))
Done
Line 305:             self._messageState = MessageState.TOO_BIG
Line 306:             self._clearReadBuffer()
Line 307: 
Line 308:     @staticmethod


--
To view, visit http://gerrit.ovirt.org/9239
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf6274bb10c9e3b80962b69c5df316f03ee21214
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Gal Hammer <ghammer at redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky at redhat.com>
Gerrit-Reviewer: Peter V. Saveliev <peet at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list