On 02/14/2013 10:21 AM, Konstantin Kolinko wrote:
2013/2/14 Henri Gomez <henri.go...@gmail.com>:
Note, CentOS 5 came with an old APR (1.2) :

* apr-util-1.2.7-11.el5_5.2
* apr-1.2.7-11.el5_6.5
* apr-devel-1.2.7-11.el5_6.5



Any ideas ?


https://issues.apache.org/bugzilla/show_bug.cgi?id=54559
1.1.27 needs APR >= 1.3.0


Yes.
Version 1.1.27 has performance upgrade by using APR_POLLSET_NOCOPY
ensuring that we do not copy sockets twice.
Eg. with older wersion for 1000 sockets there was

for (0 ... 1000) {
  if (socket == found) {
     And then internally inside APR
     for (0 ... 1000) {
        if (socket == found) {
           Do something....
        }
     }
  }
}

This was not something optimal because we already maintain the list
of sockets which have been added to the pollset so we can remove
keepalive'd one.

If you still need that for 1.2.x APR you can use the following patch
but the performance will be the same.
However Centos/RHEL 5 has much bigger problem an that is openssl 0.9.8
so you loose TLS 1.1 and stuff.

--- include/tcn.org     2013-02-07 08:17:47.000000000 +0100
+++ include/tcn.h       2013-02-13 19:49:30.840165877 +0100
@@ -51,6 +51,20 @@
 #include <unistd.h>
 #endif

+#if !defined(APR_POLLSET_NOCOPY)
+/* Add missing API */
+#define APR_RING_FOREACH(ep, head, elem, link)                          \
+    for (ep = APR_RING_FIRST(head);                                     \
+         ep != APR_RING_SENTINEL(head, elem, link);                     \
+         ep = APR_RING_NEXT(ep, link))
+
+#define APR_RING_FOREACH_SAFE(ep1, ep2, head, elem, link)               \
+    for (ep1 = APR_RING_FIRST(head), ep2 = APR_RING_NEXT(ep1, link);    \
+         ep1 != APR_RING_SENTINEL(head, elem, link);                    \
+         ep1 = ep2, ep2 = APR_RING_NEXT(ep1, link))
+
+#define APR_POLLSET_NOCOPY  0
+#endif
 #include "tcn_api.h"



Regards
--
^TM

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to