Re: More performance tweaking and cleanup.
"M. Rangnathan" <[email protected]>
| Newsgroups | gmane.comp.voip.nist-sip |
|---|---|
| Message-ID | <[email protected]> |
Its internal. See UDPMessageProcessor.java The highwater and lowater mark for queue size are 100 and 50 respectively. Below 50 requests are just accepted. The range from 50 to 100 starts dropping requests/responses probabilistically (proportional to the length).. After the queue gets to 100 in length, requests are just dropped until the queue goes back within range. How did I come up with 50 and 100? Sheer numerology and guess work :-) You can tweak there a lot more and come up with fairness algorithms that prevent starvation of good guys by bad guys and so on and so forth. There is a raft of papers on such subjects. Feel free to read, implement and contribute back if you wish. If you want even better performance, you should try to reduce the number of object allocations. Here are some suggestions: There is a lot of string conversions going on. These can be eliminated using StringBuffer. Take a look at the encode method in each Header, Address and so on. Right now it returns a String. It should take a StringBuffer and return the same StringBuffer with stuff appended to it so you can keep appending to that String buffer - only converting to String when you actually send the message. Thats a fairly easy if laborious hack. You may have to change a few hundred files but I can show you what to do there. Next, you can try fiddling with NIO - harder but likely to be a big win. If you have the time, tweak away and contribute back. Regards, Ranga. Francisco Javier Tellez Vaquero wrote: > Hi all, > first thank you very much to Ranga for the improvements about > performance issue. > > About rate limiting, is it a new configuration parameter or the stack > manages it internally?? > > Regards, > Fran. > > > >> From: "Francisco Javier Tellez Vaquero" <[email protected]> >> To: [email protected], [email protected] >> Subject: RE: [nist-sip] More performance tweaking and cleanup. >> Date: Thu, 01 Jun 2006 19:42:21 +0200 >> >> Hello, >> we have repeated the tests in our machine (4 CPU's Sun UltraSparc+ >> dual-core at 1,5Ghz = 8CPUs) with this scenario: >> >> SIPP -------------------------> STACK >> >> INVITE -----------> >> 180 <--------------- >> 200 <--------------- >> ACK --------------> >> BYE --------------> >> 200 <-------------- >> >> and these are the results: >> >> ---> 10000 calls with 66cps --> each CPU takes 14% >> ---> 10000 calls with 150cps --> each CPU takes 55% >> ---> 10000 calls with 200cps -->each CPU takes 75% (finally >> performance decrease) >> >> Best Regards, >> Fran. >> >>> From: "M. Rangnathan" <[email protected]> >>> To: sip mailing <[email protected]> >>> Subject: [nist-sip] More performance tweaking and cleanup. >>> Date: Wed, 31 May 2006 14:38:57 -0400 >>> >>> Hello! >>> >>> I've added some rudimentary rate limiting (someting like a very >>> rudimentary RED) to make the stack resillient to flooding attacks. >>> Much more can be done here in terms of identifying attack sources, >>> fairness etc. I took a gross approach. >>> >>> I also eliminated some linear searches and got rid of another >>> synchronized linked list and elimiated more syncrhonization . I am >>> up to about 69 CAPS on my machine. It runs consitently with no leaks >>> over 10,000 callsetup/teardown. The CPU is running at a fairly >>> decent 70 % (combined) and the image is around 110 mb for Shootist. >>> Somebody may want to do a "sacalabiltiy with mutiprocessor" experiemnt. >>> >>> >>> Regards, >>> >>> Ranga. >>> >>> -- >>> M. Ranganathan >>> >>> Advanced Networking Technologies Division, >>> National Institute of Standards and Technology (NIST), >>> 100 Bureau Drive, Stop 8920, Gaithersburg, MD 20899. tel:301 975 >>> 3664 , fax:301 590 0932 http://w3.antd.nist.gov/ Advanced Networking >>> Technologies For the People! >>> >>> >>> _______________________________________________ >>> nist-sip mailing list >>> [email protected] >>> http://www-x.antd.nist.gov/mailman/listinfo/nist-sip >> >> >> >> >> _______________________________________________ >> nist-sip mailing list >> [email protected] >> http://www-x.antd.nist.gov/mailman/listinfo/nist-sip > > > > > -- M. Ranganathan Advanced Networking Technologies Division, National Institute of Standards and Technology (NIST), 100 Bureau Drive, Stop 8920, Gaithersburg, MD 20899. tel:301 975 3664 , fax:301 590 0932 http://w3.antd.nist.gov/ Advanced Networking Technologies For the People!