All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick O'Rourke <porourke@egenera.com>
To: reiserfs-list@namesys.com
Subject: rsync and memory leak on linux 2.2?
Date: 13 Feb 2003 12:11:44 -0500	[thread overview]
Message-ID: <1045156304.11405.149.camel@barnes> (raw)

We have two machines running Linux 2.2 with ReiserFS v3.5.32 and we're
seeing a memory leak which we feel is related to reiser and some interaction
with rsync.

The configuration is such that system A maintains a set of log files and
these files are mirrored via rsync on system B for redundancy.

What happens is that we put both systems under a fixed work load and after
many hours system B will start consuming lots of swap and suffer degraded
performance.  Through some kernel debugging we discovered that the 4K kmalloc
slab is slowly growing to the point where there is enough memory pressure to
start swapping.  We observe that one of the heaviest users of the 4K slab is
reiserfs_kmalloc(), and in particular, the calls issued from
get_mem_for_virtual_node() and reiserfs_file_write().  As an experiment we
ran the same work load, but this time disabled the rsync'ing of the log files
and we no longer see the growth in the 4k slab.

This leads us to believe that we have a memory leak somewhere in the reiserfs
and was wondering if anyone else has seen this, and if so, if a patch exists.

One question I have is that get_mem_for_virtual_node() will first attempt to
allocate memory atomically, and if this fails, will re-try non atomically.
In this case we return SCHEDULE_OCCURRED which results in fix_nodes()
will also return to its caller.  Is it possible for buffer allocated by
get_mem_for_virtual_node() to be lost in this case?  I did not see any
path out of reiserfs_file_write() in which we could return w/o freeing
the buffer.  Perhaps this problem is triggered via memory pressure?

I scanned the 2.2.20 reiser patch and did not see any fix that was apparent
to me.  Any suggestions / recommendations would be appreciated.

Thanks,

Pat

p.s. Please CC me on any reply, I am not subscribed to this list.

-- 
Patrick O'Rourke
porourke@egenera.com


             reply	other threads:[~2003-02-13 17:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-13 17:11 Patrick O'Rourke [this message]
2003-02-13 19:15 ` rsync and memory leak on linux 2.2? Oleg Drokin
2003-02-14  6:38 ` Adrian Phillips
2003-02-14 10:01   ` Oleg Drokin
2003-02-14 10:09     ` Adrian Phillips
2003-02-19 21:24     ` Patrick O'Rourke
2003-02-19 22:18       ` Hans Reiser
2003-02-20  6:19         ` Oleg Drokin
2003-02-14 14:04   ` Patrick O'Rourke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1045156304.11405.149.camel@barnes \
    --to=porourke@egenera.com \
    --cc=reiserfs-list@namesys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.