All of lore.kernel.org
 help / color / mirror / Atom feed
* rsync and memory leak on linux 2.2?
@ 2003-02-13 17:11 Patrick O'Rourke
  2003-02-13 19:15 ` Oleg Drokin
  2003-02-14  6:38 ` Adrian Phillips
  0 siblings, 2 replies; 9+ messages in thread
From: Patrick O'Rourke @ 2003-02-13 17:11 UTC (permalink / raw)
  To: reiserfs-list

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-02-20  6:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-13 17:11 rsync and memory leak on linux 2.2? Patrick O'Rourke
2003-02-13 19:15 ` 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

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.