Apache Mod-Python - max locks

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > August 2005 > max locks





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author max locks
Gregory (Grisha) Trubetskoy

2005-08-09, 8:47 pm


Another thing that should probably go in before 3.2. The RedHat people
patch mod_python with this patch in the source RPM (smart-XXX comment
included):

-------------

Stealing 1/4 of the available SysV semaphores is not polite behaviour.

--- mod_python-3.1.3/src/include/mod_python.h.maxlocks
+++ mod_python-3.1.3/src/include/mod_python.h
@@ -103,7 +103,7 @@
#define NOTSILENT 1

/* hopefully this will go away */
-#define MAX_LOCKS 32
+#define MAX_LOCKS 4

/* Python 2.3 no longer defines LONG_LONG, it defines PY_LONG_LONG */
#ifndef LONG_LONG

--------------

I think we should take the 32 number to something like 8 and add a comment
that for a high-performance configuration you'd need to increase this
number.

Grisha

Jim Gallacher

2005-08-09, 8:47 pm

Gregory (Grisha) Trubetskoy wrote:
>
> Another thing that should probably go in before 3.2. The RedHat people
> patch mod_python with this patch in the source RPM (smart-XXX comment
> included):
>
> -------------
>
> Stealing 1/4 of the available SysV semaphores is not polite behaviour.
>
> --- mod_python-3.1.3/src/include/mod_python.h.maxlocks
> +++ mod_python-3.1.3/src/include/mod_python.h
> @@ -103,7 +103,7 @@
> #define NOTSILENT 1
>
> /* hopefully this will go away */
> -#define MAX_LOCKS 32
> +#define MAX_LOCKS 4
>
> /* Python 2.3 no longer defines LONG_LONG, it defines PY_LONG_LONG */
> #ifndef LONG_LONG
>
> --------------
>
> I think we should take the 32 number to something like 8 and add a
> comment that for a high-performance configuration you'd need to increase
> this number.
>
> Grisha
>


I was googling for something mod_python related yesterday and came
across the same Redhat Bugzilla report. Weird.

What if we make MAX_LOCKS a ./configure option, with a default of 8? If
this is agreeable I'll make the changes to configure.in.

Jim


Jim Gallacher

2005-08-09, 8:47 pm

Gregory (Grisha) Trubetskoy wrote:
>
> Another thing that should probably go in before 3.2. The RedHat people
> patch mod_python with this patch in the source RPM (smart-XXX comment
> included):
>
> -------------
>
> Stealing 1/4 of the available SysV semaphores is not polite behaviour.
>
> --- mod_python-3.1.3/src/include/mod_python.h.maxlocks
> +++ mod_python-3.1.3/src/include/mod_python.h
> @@ -103,7 +103,7 @@
> #define NOTSILENT 1
>
> /* hopefully this will go away */
> -#define MAX_LOCKS 32
> +#define MAX_LOCKS 4
>
> /* Python 2.3 no longer defines LONG_LONG, it defines PY_LONG_LONG */
> #ifndef LONG_LONG
>
> --------------
>
> I think we should take the 32 number to something like 8 and add a
> comment that for a high-performance configuration you'd need to increase
> this number.
>
> Grisha
>


I've added --with-max-locks option to configure and set the default to
8. Shall I commit the changes?

Jim

Gregory (Grisha) Trubetskoy

2005-08-09, 8:47 pm


On Tue, 9 Aug 2005, Jim Gallacher wrote:

> I've added --with-max-locks option to configure and set the default to 8.
> Shall I commit the changes?


Cool, sure!

Grisha

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com