Results 1 to 4 of 4

Thread: IceStorm using lots of memory

  1. #1
    borax00 is offline Registered User
    Name: Alex Brooks
    Organization: Marathon Robotics
    Project: www.marathon-robotics.com
    Join Date
    Oct 2005
    Posts
    56

    IceStorm using lots of memory

    Hi,

    I'm running icestorm, and I noticed that it's using an awful lot of memory.
    When I noticed this, I shut down every process that might be talking to IceStorm to see if one of them was responsible/related.
    After shutting them all down, the relevant line from 'top' is:

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    2313 mrsys 25 0 736m 209m 4760 S 0.0 44.3 1:45.22 icebox

    This is a lot for a process doing nothing...
    I'm out of ideas for how to debug this, it's difficult to see what IceStorm is doing -- any ideas?

    I'm running IceStorm in non-persistent mode, on Linux.
    My Ice version is 3.4.0.

    Here's my icebox/icestorm config:

    icebox:
    Ice.Warn.Connections=1
    Ice.PrintAdapterReady=1
    Ice.MessageSizeMax=30000
    IceBox.ServiceManager.Endpoints=tcp -p 9998
    IceBox.InheritProperties=1
    IceBox.LoadOrder=IceStorm
    IceBox.Service.IceStorm=IceStormService,34:createI ceStorm --Ice.Config=/etc/marathon/icestorm.cfg
    IceBox.UseSharedCommunicator.IceStormService=1

    icestorm:
    IceStorm.TopicManager.Endpoints=default -p 10000
    Ice.Warn.Connections=1
    Ice.Warn.Dispatch=2
    Ice.Warn.Endpoints=1
    Ice.Warn.AMICallback=1
    Ice.Warn.UnknownProperties=1
    Ice.ThreadPool.Client.Size=1
    Ice.ThreadPool.Client.SizeWarn=0
    Ice.ThreadPool.Client.SizeMax=2
    IceStorm.Discard.Interval=60000
    IceStorm.Trace.TopicManager=1
    IceStorm.Trace.Topic=0
    IceStorm.Trace.Subscriber=1
    IceStorm.Publish.Endpoints=default
    IceStorm.Transient=1


    I can't see anything interesting or out-of-the-ordinary in the logs.
    After I killed everything that interacted with IceStorm I see no output whatsoever in the logs (as expected).


    Thanks for any help you can offer,


    Alex
    Alex Brooks
    Marathon Robotics
    www.marathon-robotics.com

  2. #2
    borax00 is offline Registered User
    Name: Alex Brooks
    Organization: Marathon Robotics
    Project: www.marathon-robotics.com
    Join Date
    Oct 2005
    Posts
    56
    I have some more information on this -- I figured out how to reproduce the problem, it was due to a bug in my code where lots of data is sent to IceStorm extremely rapidly.

    So it seems reasonable that IceStorm uses lots of memory while this is occurring, I expect that my process was sending data faster than IceStorm could deliver it, so it needs to allocate really big buffers -- does that sound right?

    But should the memory usage decrease when I stop sending data? Is there any way IceStorm will reclaim that memory without being re-started?


    Thanks,

    Alex
    Alex Brooks
    Marathon Robotics
    www.marathon-robotics.com

  3. #3
    benoit's Avatar
    benoit is offline ZeroC Staff
    Name: Benoit Foucher
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Rennes, France
    Posts
    2,196
    Hi,

    Yes IceStorm could be consuming quite a bit of memory if you publish many large messages at the same time. I would expect IceStorm to release the memory after shutting down all the subscribers and once it has finished trying reconnecting to them (if they were not shutdown in a cleanly manner, i.e.: if they were not explicitly unsubscribed from the topic). This might take a bit of time (by default the timeout for subscribers is set to 60s so it shouldn't take a lot more than a couple of minutes).

    It's also not clear to me if RES is supposed to immediately go down after the process releases the memory... this most likely depends on the memory allocator implementation. On which platform do you see this?

    Cheers,
    Benoit.

  4. #4
    borax00 is offline Registered User
    Name: Alex Brooks
    Organization: Marathon Robotics
    Project: www.marathon-robotics.com
    Join Date
    Oct 2005
    Posts
    56
    Hi Benoit,

    I wasn't sending any large messages, but a huge number of tiny ones.

    I left IceStorm running with no subscribers overnight after I saw this, it was the same in the morning.

    I'm running on Linux.


    Alex
    Alex Brooks
    Marathon Robotics
    www.marathon-robotics.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 12-09-2008, 05:28 AM
  2. Out of Memory Error?
    By rnewport in forum Help Center
    Replies: 2
    Last Post: 05-14-2007, 09:38 AM
  3. a question about memory
    By laotee in forum Help Center
    Replies: 8
    Last Post: 06-22-2005, 10:17 PM
  4. Memory Exception
    By chuatecksiong in forum Help Center
    Replies: 1
    Last Post: 03-23-2005, 11:45 PM
  5. In-memory IceStorm
    By vukicevic in forum Patches
    Replies: 2
    Last Post: 01-20-2004, 07:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •