<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Tahoma size=2>Hi there.</FONT></DIV>
<DIV><FONT face=Tahoma size=2>I am writing a file transfer program using twisted
as my framework. </FONT></DIV>
<DIV><FONT face=Tahoma size=2>I have been having some problems as far as memory
usage is concerned (i.e. both client and server just eat through
available memory without ever releasing it back to the kernel while transfering
data). I am aware that in theory, the client and server will consume at least as
much memory as the file to be transferred, but this memory should also be made
available to the O/S after the operation has completed.</FONT></DIV>
<DIV><FONT face=Tahoma size=2>I also use a garbage collector, which makes things
just marginally better and the only TWISTED operations I use are a few
transport write and callLater commands.</FONT></DIV>
<DIV><FONT face=Tahoma size=2>The only culprits responsible for this I can
imagine to be a difference between the hardcoded buffer sizes in TWISTED and the
amount of data I send (I send 64Kb of data per request for faster delivery in
LANs) and/or possibly that this memory lost is in many small chunks of data --
in this case no O/S can free this data, since there are always limits only above
which the kernel will deem an amount of memory worth the trouble to be released
(I think glibc has around a 2MB limit)...</FONT></DIV>
<DIV><FONT face=Tahoma size=2>As professional network programmers, do you
believe my diagnosis is correct? Have you encountered such problems in the past?
Are there workarounds for this?</FONT></DIV>
<DIV><FONT face=Tahoma size=2></FONT> </DIV>
<DIV><FONT face=Tahoma size=2>Many thanks,</FONT></DIV>
<DIV><FONT face=Tahoma size=2></FONT> </DIV>
<DIV><FONT face=Tahoma size=2>Nick.</FONT></DIV></BODY></HTML>