EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Dropped frames from GigE cameras on Linux
From: Mark Rivers <[email protected]>
To: Henrique Almeida <[email protected]>
Cc: "[email protected] Talk" <[email protected]>
Date: Sat, 23 Apr 2016 23:43:08 +0000
Hi Henrique,

> It's better not to change rmem_default, or most sockets in the system will have an increased buffer size.
> Instead, using setsockopt() will increase the buffer size only for the camera.

I see your point.  But for many of the GigE camera libraries we are using (Prosilica, Point Grey, etc.) the sockets are not exposed by the vendor API, so it is not possible to call setsockopt().

I'm not sure if the sockets are exposed in the aravis library.  The  arvgvstream.h header file defines this structure, so it may be possible to access the socket.

struct _ArvGvStream {
        ArvStream       stream;

        GSocket *socket;
        GSocketAddress *incoming_address;

        GThread *thread;
        void *thread_data;
};


I've found that 1 MB has been enough so far, but perhaps that would need to be increased under very heavy load.

Mark

________________________________
From: Henrique Almeida [[email protected]]
Sent: Saturday, April 23, 2016 2:08 PM
To: Mark Rivers
Cc: [email protected] Talk
Subject: Re: Dropped frames from GigE cameras on Linux


It's better not to change rmem_default, or most sockets in the system will have an increased buffer size. Instead, using setsockopt() will increase the buffer size only for the camera.

Also, a 1 MB buffer may not be enough, since it represents a 8 ms buffer in a 1 Gbps network. It is common for an application to be preempted for dozens of milliseconds under heavy load. I'm currently testing 2 MB for our non-GigE camera server. Our camera, however, does not support packet retransmissions, while the GigE protocol does.

Em 21/04/2016 15:19, "Mark Rivers" <[email protected]<mailto:[email protected]>> escreveu:
Folks,

I find that people frequently have problems with dropped frames when running GigE cameras on Linux, particularly under heavy CPU loading.

In 2013 I posted a message to tech-talk (http://www.aps.anl.gov/epics/tech-talk/2013/msg02491.php) about this problem.  It contained a link from Tom Cobb to a Point Grey Knowledge Base article with a solution, which involves increasing some system values as follows:

sudo sysctl -w net.core.rmem_max=1048576 net.core.rmem_default=1048576

I  found today that the Point Grey link in that message no longer works.  However, here is a new link that does work.

http://www.ptgrey.com/KB/10016

Mark




References:
Dropped frames from GigE cameras on Linux Mark Rivers
Re: Dropped frames from GigE cameras on Linux Henrique Almeida

Navigate by Date:
Prev: Re: Dropped frames from GigE cameras on Linux Henrique Almeida
Next: Question regarding caputrecorder Alireza Panna
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Dropped frames from GigE cameras on Linux Henrique Almeida
Next: Brookhaven National Laboratory - Job Opening Esposito, Peter J
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·