[omniORB] Scalability and maxStrands

Sai-Lai Lo S.Lo@orl.co.uk
06 Aug 1998 17:03:40 +0100


--Multipart_Thu_Aug__6_17:03:40_1998-1
Content-Type: text/plain; charset=US-ASCII

Hi Randy,

I have not been able to reproduce the bug you are seeing on Solaris 2.5.

Attached is the test program I used, could you try it with your set up to
see if it fails?


Sai-Lai

rshoup@tumbleweed.com (Randy Shoup) writes:

>   We have run into a scalability problem using omniORB2.5.0, and wanted
> some input.  It seems that the maximum number of strands per rope is
> hard-coded to 5 in tcpSocketMTfactory.cc(529).  This means that a single
> client can only have 5 simultaneous connections to any particular
> server.  I have several questions:
> 
> 1. Is there any reason why this value is hard-coded to 5?
> 2. Would there be any problem increasing this value?
> 3. Are there any plans to make this more configurable -- e.g., through
> an ORB command-line argument or compile-time parameter?
> 
> In addition, comments in rope.h(759) imply that for maxStrands of n, the
> (n+1)'th request will block until a strand is released.  When we exceed
> the number of strands, instead of blocking, omniORB throws an
> exception.  This occurs both on NT4 and Solaris2.6.
> 
> 4. Any chance this is fixed?
> 
> Thanks for your help,


--Multipart_Thu_Aug__6_17:03:40_1998-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="conclt.cc"
Content-Transfer-Encoding: base64

Ly8gVGVzdGluZyBjb2RlOiBjbGllbnQgb2YgZWNobyBvYmplY3RzCi8vCi8vICAgaW50ZXJm
YWNlIEVjaG8gewovLyAgICAgICAgc3RyaW5nIGVjaG9TdHJpbmcoaW4gc3RyaW5nIG1lc2cp
OwovLyAgIH07Ci8vCgojaW5jbHVkZSA8aW9zdHJlYW0uaD4KI2luY2x1ZGUgPGVjaG8uaGg+
CgpvbW5pX211dGV4IGNlcnJfc3luYzsKCnN0YXRpYwp2b2lkCmNvbnRhY3QoY2hhciogaWQs
IEVjaG9fcHRyIGUpCnsKICBpbnQgbG9vcGNvdW50ID0gMTA7CiAgd2hpbGUgKGxvb3Bjb3Vu
dC0tKSB7CiAgICB0cnkgewogICAgICBjaGFyICogZWNob3N0cjsKICAg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DoiLEVjaG86Ol9kdXBsaWNhdGUo
ZSkpOwogIHdvcmtlciogd29ya2VyNSA9ICBuZXcgd29ya2VyKCJ3b3JrZXIgNToiLEVjaG86
Ol9kdXBsaWNhdGUoZSkpOwogIHdvcmtlciogd29ya2VyNiA9ICBuZXcgd29ya2VyKCJ3b3Jr
ZXIgNjoiLEVjaG86Ol9kdXBsaWNhdGUoZSkpOwogIHdvcmtlciogd29ya2VyNyA9ICBuZXcg
d29ya2VyKCJ3b3JrZXIgNzoiLEVjaG86Ol9kdXBsaWNhdGUoZSkpOwogIHdvcmtlciogd29y
a2VyOCA9ICBuZXcgd29ya2VyKCJ3b3JrZXIgODoiLEVjaG86Ol9kdXBsaWNhdGUoZSkpOwog
IHdvcmtlciogd29ya2VyOSA9ICBuZXcgd29ya2VyKCJ3b3JrZXIgOToiLEVjaG86Ol9kdXBs
aWNhdGUoZSkpOwogIHdvcmtlciogd29ya2VyMTAgPSAgbmV3IHdvcmtlcigid29ya2VyIDEw
OiIsRWNobzo6X2R1cGxpY2F0ZShlKSk7CiAgY29udGFjdCgibWFpbiIsZSk7CiAgd29ya2Vy
MS0+am9pbigwKTsKICB3b3JrZXIyLT5qb2luKDApOwogIHdvcmtlcjMtPmpvaW4oMCk7CiAg
d29ya2VyNC0+am9pbigwKTsKICB3b3JrZXI1LT5qb2luKDApOwogIHdvcmtlcjYtPmpvaW4o
MCk7CiAgd29ya2VyNy0+am9pbigwKTsKICB3b3JrZXI4LT5qb2luKDApOwogIHdvcmtlcjkt
PmpvaW4oMCk7CiAgd29ya2VyMTAtPmpvaW4oMCk7CgogIHJldHVybiAwOwp9Cg==

--Multipart_Thu_Aug__6_17:03:40_1998-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="consrv.cc"
Content-Transfer-Encoding: base64

Ly8gVGVzdGluZyBjb2RlOiBpbXBsZW1lbnRhdGlvbiBvZiBlY2hvIG9iamVjdHMKLy8KLy8g
ICBpbnRlcmZhY2UgRWNobyB7Ci8vICAg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cmluZ192YXIgcCA9IG9yYi0+b2JqZWN0X3RvX3N0cmlu
ZyhteW9ialJlZik7CiAgICAgIGNlcnIgPDwgKGNoYXIqKXAgPDwgZW5kbDsKICAgIH0KCiAg
ICBib2EtPmltcGxfaXNfcmVhZHkoKTsKICB9CiAgY2F0Y2ggKGNvbnN0IG9tbmlPUkI6OmZh
dGFsRXhjZXB0aW9uICZleCkgewogICAgICBjZXJyIDw8ICIjIyMjIFlvdSBoYXZlIGNhdWdo
dCBhbiBvbW5pT1JCMiBidWcsIGRldGFpbHMgYXJlIGFzIGZvbGxvd3M6IiA8PCBlbmRsOwog
ICAgICBjZXJyIDw8IGV4LmZpbGUoKSA8PCAiICIgPDwgZXgubGluZSgpIDw8ICI6IiA8PCBl
eC5lcnJtc2coKSA8PCBlbmRsOyAKICAgICAgY2VyciA8PCAibWFpbiB0aHJlYWQgZXhpdGVk
LiIgPDwgZW5kbDsKICAgICAgcmV0dXJuIDE7CiAgICB9CiAgcmV0dXJuIDA7Cn0K

--Multipart_Thu_Aug__6_17:03:40_1998-1
Content-Type: text/plain; charset=US-ASCII



-- 
Dr. Sai-Lai Lo                          |       Research Scientist
                                        |
E-mail:         S.Lo@orl.co.uk          |       Olivetti & Oracle Research Lab
                                        |       24a Trumpington Street
Tel:            +44 223 343000          |       Cambridge CB2 1QA
Fax:            +44 223 313542          |       ENGLAND

--Multipart_Thu_Aug__6_17:03:40_1998-1--