I think I remember reading somewhere that they only thing you really care about on a Mediaproxy server is the network interface...  Processor and memory doesn&#39;t matter.<br /><br />On , Saúl Ibarra Corretgé &lt;saul@ag-projects.com&gt; wrote:<br />&gt; Hi Jim,<br />&gt; <br />&gt; <br />&gt; <br />&gt; On Oct 19, 2011, at 4:08 PM, JimDoesVoip wrote:<br />&gt; <br />&gt; <br />&gt; <br />&gt; &gt; Hi All,<br />&gt; <br />&gt; &gt;  I have the impression (perhaps wrong) that we can run multiple media-relay<br />&gt; <br />&gt; &gt; processes on a single server and have them connect to the same media<br />&gt; <br />&gt; &gt; dispatcher(s).  I also have the perception that media-relay not<br />&gt; <br />&gt; &gt; multi-threaded.  Searched the mail list and didn&#39;t find indications that<br />&gt; <br />&gt; &gt; anyone was doing this.  Here are more details of what we are attempting:<br />&gt; <br />&gt; &gt;<br />&gt; <br />&gt; &gt; The scenario is that we have 4 bare metal servers running centOS 6.  Two of<br />&gt; <br />&gt; &gt; these servers are running openSIPS and media-dispatcher processes.  We are<br />&gt; <br />&gt; &gt; using mediaproxy 2.5.2.  To take advantage of the multiple cores [each<br />&gt; <br />&gt; &gt; server has 4 cores] we&#39;d like to run about the same number of media relay<br />&gt; <br />&gt; &gt; processes on the servers that aren&#39;t running openSIPS.  Each of the<br />&gt; <br />&gt; &gt; media-relay processes would connect to both dispatchers to have things be as<br />&gt; <br />&gt; &gt; flexible / resilient as possible.<br />&gt; <br />&gt; &gt;<br />&gt; <br />&gt; <br />&gt; <br />&gt; You don&#39;t need to do that with MediaProxy. MediaProxy is single threaded (uses Twisted) and it will open 2 pairs of ports for each connection. When *a single* RTP packet was received from both sides, a conntrack rule is created in kernel space, so no packets are relayed in userspace anymore.<br />&gt; <br />&gt; <br />&gt; <br />&gt; Thus, you&#39;ll not get better relaying performance for running multiple instances, the kernel will do the relaying for you.<br />&gt; <br />&gt; <br />&gt; <br />&gt; You can run the relay in the same host as the dispatcher, btw.<br />&gt; <br />&gt; <br />&gt; <br />&gt; &gt; We are able to start multiple media-relays, run out of different<br />&gt; <br />&gt; &gt; directories, with different media port ranges on a single server using the<br />&gt; <br />&gt; &gt; --pid option.  When doing this, and connecting 2 of these media-relays to<br />&gt; <br />&gt; &gt; the same media-dispatcher we see errors in the logs that indicate that the<br />&gt; <br />&gt; &gt; media-relays are being disconnected and reconnected.  We are attempting to<br />&gt; <br />&gt; &gt; run the media-relays on the same IP address (well.. the media relays that<br />&gt; <br />&gt; &gt; are on the same server).  Do the media relays connecting to a particular<br />&gt; <br />&gt; &gt; dispatcher need their own IP address?  Do we need to run the media-relays on<br />&gt; <br />&gt; &gt; different IP addresses on the servers?<br />&gt; <br />&gt; &gt;<br />&gt; <br />&gt; <br />&gt; <br />&gt; The --pid option is not enough. You need different configuration, different port range and a different IP address. The dispatcher maps the relays by IP address, so you can&#39;t have two on the same. What you see in the logs is the dispatcher being confused by two connections from the same IP, which he thinks is a single relay.<br />&gt; <br />&gt; <br />&gt; <br />&gt; <br />&gt; <br />&gt; Regards,<br />&gt; <br />&gt; <br />&gt; <br />&gt; --<br />&gt; <br />&gt; Saúl Ibarra Corretgé<br />&gt; <br />&gt; AG Projects<br />&gt; <br />&gt; <br />&gt; <br />&gt; <br />&gt; <br />&gt; <br />&gt; <br />&gt; <br />&gt; <br />&gt; _______________________________________________<br />&gt; <br />&gt; Users mailing list<br />&gt; <br />&gt; Users@lists.opensips.org<br />&gt; <br />&gt; http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br />&gt; <br />&gt;