Re: highscalability.com report

2012-04-05 Thread Dave Hodgkinson

Talking of youporn:

http://gizmodo.com/5899327/how-much-porn-does-the-internet-hold

10 Dual layer DVDs per second.




Re: highscalability.com report

2012-04-04 Thread Dave Hodgkinson

On 4 Apr 2012, at 19:41, Fred Moyer wrote:

 On Wed, Apr 4, 2012 at 6:37 AM, demerphq demer...@gmail.com wrote:
 On 4 April 2012 09:31, William A. Rowe Jr. wr...@rowe-clan.net wrote:
 
 When was the last time you built perl with no threading support?  It's
 certainly a 5%-15% win.
 
 Not certainly. We did that and saw almost no difference.
 
 I've done two perlbench sets of comparisons with threaded/non-threaded
 across a couple different versions of perl. I don't have the results
 posted on the web anymore, but non-threaded was up to 20% faster for
 some operations.
 
 As far as real world differences go, I don't think you are likely to
 see differences with mod_perl in production environments with threaded
 vs non-threaded.  That 20% increase probably only affects 1% of your
 application.


I would say the app layer performance is the least of your worries. Front-end
caching, CDNs and caching in the intermediate layers will win you much, much
more than fretting about +/- 20% in the speed of the code. And if you have
a scalable architecture, and I'm assuming youporn is, you can always go
sideways very easily.



Re: Question about caching

2012-03-13 Thread Dave Hodgkinson

On 13 Mar 2012, at 21:32, Perrin Harkins wrote:

 
 Turn on the template caching.  It's basically free and will speed
 things up.  Caching at the page level is the ultimate in terms of
 speed, but it will only be possible for pages that are not dynamic on
 a per-user basis.  Template caching helps everywhere.

A neat trick is to do the Welcome back Perrin! stuff in JS. Then the
HTML is the same. If you can get away with it. This was new to me
quite recently :)




Re: Terminating Child process Dynamically

2012-03-02 Thread Dave Hodgkinson

On 2 Mar 2012, at 19:04, Shibi Ns wrote:

 
 Bouncing means restart the application to bring the current changes and new 
 data to the cache. We can't use the following logic as there are huge number 
 of existing data cache and perl modules involved.  So the changes will be 
 massive.
 
 Shibi
   

this makes me think your architecture is wrong.

Re: Funding [WAS :Re: trying to compile mod_perl against httpd-2.4.1]

2012-02-29 Thread Dave Hodgkinson

On 29 Feb 2012, at 19:33, Dan Axtell wrote:

 
 Basically I want to have various virtual hosts be reverse proxied to various 
 back end servers (e.g. mod_perl for some legacy apps, a Catalyst app under 
 fast CGI).  I tried this with Nginx and it all seemed to work but what I 
 discovered is that over time the backend Apache processes were using more and 
 more memory, whereas when I go back to a monolithic Apache the memory usage 
 stays pretty stable.

Your fat apache is an application server. Only have sufficient MaxClients to 
saturate
CPU if you hammer it. Recycle memory with a sensible MaxRequestsPerChild. Make
forking new children cheap by loading the world in startup.pl.

Read Stas's guide.




Re: mod_perl causing Apache Segmentation fault

2012-02-20 Thread Dave Hodgkinson
So duplicating a path in -I and use lib casues a dump?

Smells like a bug to me.


On 20 Feb 2012, at 14:25, Mauritz Hansen wrote:

 Hi Dave,
 
 Thanks for this pointer. Got it fixed in the end by changing a part of my
 Apache configuration from
 
 PerlSwitches -I/srv/www/example.com/application/lib/
 Perl
   use lib qw( /srv/www/example.com/application/lib/ );
 /Perl
 PerlModule application
 
 to
 
 Perl
   use lib qw( /srv/www/example.com/application/lib/ );
 /Perl
 
 
 
 
 On 17 Feb 2012, at 14:03, Mauritz Hansen wrote:
 
   #17 0x0046432b in invoke_cmd (cmd=0x5b9880,
 parms=0x7fffe770, mconfig=0x844728, args=0x89b7d8 use lib qw(
 /usr/local/apache2/virtualhosts/api.nwwi.nl /httpdocs/lib/ );\n) at
 config.c:757
 
 This appears to be what it's trying to do. Take that directive
 out and see what happens?
 
 
 
 
 
 



Re: mod_perl causing Apache Segmentation fault

2012-02-17 Thread Dave Hodgkinson

On 17 Feb 2012, at 14:03, Mauritz Hansen wrote:

#17 0x0046432b in invoke_cmd (cmd=0x5b9880,
 parms=0x7fffe770, mconfig=0x844728, args=0x89b7d8 use lib qw(
 /usr/local/apache2/virtualhosts/api.nwwi.nl /httpdocs/lib/ );\n) at
 config.c:757

This appears to be what it's trying to do. Take that directive
out and see what happens?





Re: disabling directives in .htaccess files

2012-02-10 Thread Dave Hodgkinson

On 10 Feb 2012, at 11:46, Aaron Knister wrote:

 Hi,
 
 I'm using mod_perl in a shared hosting environment for some server-side 
 configuration bits. All dynamic content for the users runs through SuEXEC, 
 however this obviously doesn't help in the case of mod_perl so I would like 
 to prevent users from specifying any handlers or other potentially 
 undesirable mod_perl options/directives in their .htaccess files.

Are the Apaches fronted by proxies?

In which case, I'd seriously consider everyone having their own Apaches with a 
limited
number of processes and an appropriately (automatically generated?) startup.pl 
for maximum
shared memory in those processes.

Obviously, that number can be tuned depending on the site, but you'd be 
surprised at how
few most sites need if the responses are quick.

See Stas Bekman's immortal tuning work.




Re: disabling directives in .htaccess files

2012-02-10 Thread Dave Hodgkinson

On 10 Feb 2012, at 13:50, Aaron Knister wrote:

 Hi Dave,
 
 Thanks for the feedback. Unfortunately the setup isn't fronted by apache 
 proxies. Having an apache instance per site would, I think, be painful-- this 
 is a personal web hosting setup for 80,000+ individual sites (think 
 mod_userdir). 

And al these sites could load their own perl? Painful.

And PLEASE front the sites with a reverse proxy: squid, varnish whatever. If
not, you're opening yourself up to all kinds of badness. Mod_perl is an *app*
server, not a web server.

Please read Stas' chapter on performance tuning!

Chapters 9 and 10:

http://modperlbook.org/html/part2.html

And the others.




Re: mod perl installed but not running

2012-02-07 Thread Dave Hodgkinson

On 7 Feb 2012, at 16:08, mike cardeiro wrote:

 
 
 From: André Warnier a...@ice-sa.com
 
 
 You should probably analyse your requirements carefully (as to exactly /why/ 
 you 
 want the script to run as that user).  
 
 
 I am creating a file transfer site.  When a user logs in they can upload a 
 file, so I need the script to write the file to a directory that is not 
 accessible by the webserver;

Welcome to setuid hell.



Re: mod_perl.so: undefined symbol: PL_tainting

2012-01-25 Thread Dave Hodgkinson
Have you compiled perl with libperl.so?


On 25 Jan 2012, at 18:41, Jacobs, David (NIH/NCI) [C] wrote:

  
 Please help.   After banging my head for a while, and trying in vain to find 
 an answer from google, I am in need of some assistance.
  
 This is on rhel5, and has the redhat perl 5.8.8 rpm installed (I am not the 
 one who did that, and I cant remove it)
 I have compiled perl-5.14.2 and mod_perl-2.0.5
 Perl seems to be working fine (for both versions)
  
 I run make test for mod_perl  as a non-privileged user I get the following:






Re: mod_perl.so: undefined symbol: PL_tainting

2012-01-25 Thread Dave Hodgkinson
The copiousness of the ld fail suggested something fundamental missing to me.

Was there a .so in your perl tree?


On 25 Jan 2012, at 20:03, Jacobs, David (NIH/NCI) [C] wrote:

 Trying that now.   DOH!  I understand now.   Maybe that will fix it.  (I 
 hope).
 
 David Jacobs
 Senior Network Engineer,
 NCI Computer Services
 Contractor, TerpSys
 http://www.terpsys.com/ 
  
 Technology Driven. People Oriented.
 
 
 -Original Message-
 From: Jacobs, David (NIH/NCI) [C] 
 Sent: Wednesday, January 25, 2012 2:45 PM
 To: Dave Hodgkinson
 Cc: modperl@perl.apache.org
 Subject: RE: mod_perl.so: undefined symbol: PL_tainting
 
 I thought it did by default... Do you have a link to how to do that?
 
 
 -Original Message-
 From: Dave Hodgkinson [mailto:daveh...@gmail.com]
 Sent: Wednesday, January 25, 2012 2:24 PM
 To: Jacobs, David (NIH/NCI) [C]
 Cc: modperl@perl.apache.org
 Subject: Re: mod_perl.so: undefined symbol: PL_tainting
 
 Have you compiled perl with libperl.so?
 
 
 On 25 Jan 2012, at 18:41, Jacobs, David (NIH/NCI) [C] wrote:
 
 
 Please help.   After banging my head for a while, and trying in vain to find 
 an answer from google, I am in need of some assistance.
 
 This is on rhel5, and has the redhat perl 5.8.8 rpm installed (I am 
 not the one who did that, and I cant remove it) I have compiled
 perl-5.14.2 and mod_perl-2.0.5 Perl seems to be working fine (for both
 versions)
 
 I run make test for mod_perl  as a non-privileged user I get the following:
 
 
 
 



Re: Registry and mod_include - multiple invocations of a script in an SSI-parsed file

2012-01-11 Thread Dave Hodgkinson

On 11 Jan 2012, at 15:29, Mårten Svantesson wrote:

 Hi Brett,
 
 My guess is that you run into a problem of the CGI module not resetting 
 itself between executions of your code.
 
 As a test you could try entering the line.
 
 CGI::initialize_globals();
 
 explicitly in your script before calling param().


Ooooh.

I have a situation where in a perfectly ordinary Apache::Registry script, 
sometimes
Template::Toolkit doesn't add the auto-headers and footers to the pages.

I wonder if abw doing something jiggy that might be upsetting the globals.

/me tries...

Wow. That did the trick!

Mårten, if we ever meet, I owe you lots of Aquavit or equivalent.




Re: Problem when compiling libapreq2-2.13 on Centos

2011-11-05 Thread Dave Hodgkinson

On 4 Nov 2011, at 08:50, Pierre QUETELART wrote:

 
 /usr/bin/ld: cannot find -lexpat


Install it.

yum install libexpat





Re: Building mod_perl for authentication

2011-10-12 Thread Dave Hodgkinson

On 12 Oct 2011, at 04:06, Fred Moyer wrote:

 You should be able to run 5.14.1 with 2.06-dev available on
 http://perl.apache.org.
 
 If that doesn't work, I'd suggest posting your handlers to this list.
 
 Looking at that symbol error though, it suggests that you may have
 built mod_perl with a different binary build than it is being run
 with.  Undefined symbols are generally an indication of incompatible
 Perl internal apis.


What Fred said. Take a look at perlbrew for building different
versions, for development at least.


Re: High CPU utilization on RHEL5.6/CentOS5.6

2011-08-01 Thread Dave Hodgkinson

Wait. Is this the one with the horrible bug that knackers OO?

On 25 Jul 2011, at 23:43, Christopher Stanton wrote:

 Requires: perl = 5.8.8-32



Re: High CPU utilization on RHEL5.6/CentOS5.6

2011-07-27 Thread Dave Hodgkinson

On 26 Jul 2011, at 18:58, Christopher Stanton wrote:

 I will see if I can get Perl 5.12 and an associated mod_perl up and
 running on the problem machine and see if the CPU utilization goes
 down.

Is benchmarking out of the question?



Re: Single PerlResponseHander for Web Application

2011-07-19 Thread Dave Hodgkinson

On 18 Jul 2011, at 23:02, Jerry Pereira wrote:

 Please let me know of your views. I am not planning to use Catalyst or 
 existing frameworks as of now. 

Any reason? There are lightweight ones that play well with modern approaches
to plugins and multi-server environments.

Re: mod_perl EC2 AMI's or other platform providers?

2011-07-10 Thread Dave Hodgkinson
Also, I believe DotCloud has Miyagawa on board which is a big win IMHO.
Legend has it he had perl support shipped two days after joining. Or
something.

I'm about to put a Catalyst app on it so we'll see how that flies.


On 10 Jul 2011, at 11:28, Tosh Cooey wrote:

 Mr. Hodgkinson was awesome enough to point out the existence of DotCloud: 
 https://docs.dotcloud.com/#perl.html
 
 Looks there like they have a Perl stack available, which is super for the 
 world but not so for me since the stack requires you use PSGI which is a 
 great approach but since I don't require portability I never went that route, 
 oh woe is me...
 
 Anyway, it's good to see there's some good Perl options out there for getting 
 rid of my admin(s).
 
 Thanks Dave!
 
 Tosh
 
 
 
 On 7/22/64 8:59 PM, Tosh Cooey wrote:
 The point was, and is, that it's unfortunate that mod_perl developers
 need to:
 
 1) Build and optimize Apache.
 2) Build and optimize MySql.
 3) Build and optimize Perl+mod_perl.
 4) Build and optimize a Linux server environment.
 or
 5) Have enough money to pay for all of the above.
 
 Those are all roadblocks to development, much like your responses are to
 this discussion.
 
 My life would be a different experience if I could pay for six months of
 your time whenever I wanted to create a new web application.
 
 It would be nice to fire up a mod_perl stack somewhere (say EC2) and
 then just modify startup.pl and install your required modules and go.
 
 The dev world is moving away from requiring system administrators and
 towards more PaaS'.
 
 Tosh
 
 
 
 On 7/5/11 10:48 AM, Dave Hodgkinson wrote:
 
 On 5 Jul 2011, at 08:53, Tosh Cooey wrote:
 
 On 7/4/11 11:26 PM, Dave Hodgkinson wrote:
 
 
 I'm not happy, hence the complaining about the AMI from 2009. But
 I'm glad you changed the subject from your first one, which is that
 I should build my own stack.
 
 So basically you are saying (and only you, not a community voice)
 that in order to be a mod_perl developer one also needs to:
 
 1) Build and optimize Apache.
 2) Build and optimize MySql.
 3) Build and optimize Perl+mod_perl.
 4) Build and optimize a Linux server environment.
 or
 5) Have enough money to pay for all of the above.
 
 You have no stack.
 
 Make one.
 
 Better still, get a bunch of people together with the same problem.
 Dunno where
 you'd find 'em.
 
 I just spent six months helping a company do exactly[0] this and
 move off a dated
 RH platform onto a modern, current, Debian, perl 5.14, all new CPAN
 modules.
 
 
 You seem to have missed the point of my kvetching, which is perhaps a
 suitable answer anyway.
 
 
 What was the point?
 
 
 -- 
 McIntosh Cooey - Twelve Hundred Group LLC - http://www.1200group.com/



Re: mod_perl EC2 AMI's or other platform providers?

2011-07-05 Thread Dave Hodgkinson

On 5 Jul 2011, at 08:53, Tosh Cooey wrote:

 On 7/4/11 11:26 PM, Dave Hodgkinson wrote:
 
 
 I'm not happy, hence the complaining about the AMI from 2009.  But I'm glad 
 you changed the subject from your first one, which is that I should build 
 my own stack.
 
 So basically you are saying (and only you, not a community voice) that in 
 order to be a mod_perl developer one also needs to:
 
 1) Build and optimize Apache.
 2) Build and optimize MySql.
 3) Build and optimize Perl+mod_perl.
 4) Build and optimize a Linux server environment.
 or
 5) Have enough money to pay for all of the above.
 
 You have no stack.
 
 Make one.
 
 Better still, get a bunch of people together with the same problem. Dunno 
 where
 you'd find 'em.
 
 I just spent six months helping a company do exactly[0] this and move off a 
 dated
 RH platform onto a modern, current, Debian, perl 5.14, all new CPAN modules.
 
 
 You seem to have missed the point of my kvetching, which is perhaps a 
 suitable answer anyway.


What was the point?

Re: mod_perl EC2 AMI's or other platform providers?

2011-07-05 Thread Dave Hodgkinson

On 5 Jul 2011, at 10:53, André Warnier wrote:

 Personally, I must say that statements like I just spent six months helping 
 a company do exactly[0] this make me dream.  I must be in the wrong 
 triangle...
 

It was an interesting dynamic. Ownership of the Apache stack moved to the 
developers,
based on their skillset. It was regarded as part of the application they were 
developing.

I also got to introduce sanity to their Selenium usage but that's another story 
:)



Re: mod_perl EC2 AMI's or other platform providers?

2011-07-04 Thread Dave Hodgkinson

On 4 Jul 2011, at 11:03, Tosh Cooey wrote:

 The only public AMI for EC2 setup with mod_perl I can easily find is an 
 OpenSuse one from 2009.
 
 Services like Bitnami are a really nice platform for launching LAMP stacks, 
 unfortunately the P is anything but Perl :(
 
 Is there a reason for the lack of plug'n'play mod_perl LAMP cloud service 
 providers?  Or are there a ton that I just don't know about?
 

Because you really should build your own perl, mod_perl and Apache stack.




Re: mod_perl EC2 AMI's or other platform providers?

2011-07-04 Thread Dave Hodgkinson

On 4 Jul 2011, at 11:03, Tosh Cooey wrote:

 The only public AMI for EC2 setup with mod_perl I can easily find is an 
 OpenSuse one from 2009.
 
 Services like Bitnami are a really nice platform for launching LAMP stacks, 
 unfortunately the P is anything but Perl :(
 
 Is there a reason for the lack of plug'n'play mod_perl LAMP cloud service 
 providers?  Or are there a ton that I just don't know about?


Glad you're happy with perl 5.8.8 and old, possibly buggy CPAN modules.




Re: mod_perl EC2 AMI's or other platform providers?

2011-07-04 Thread Dave Hodgkinson

On 4 Jul 2011, at 21:56, Tosh Cooey wrote:

 On 7/4/11 7:54 PM, Dave Hodgkinson wrote:
 
 On 4 Jul 2011, at 11:03, Tosh Cooey wrote:
 
 The only public AMI for EC2 setup with mod_perl I can easily find is an 
 OpenSuse one from 2009.
 
 Services like Bitnami are a really nice platform for launching LAMP stacks, 
 unfortunately the P is anything but Perl :(
 
 Is there a reason for the lack of plug'n'play mod_perl LAMP cloud service 
 providers?  Or are there a ton that I just don't know about?
 
 
 Glad you're happy with perl 5.8.8 and old, possibly buggy CPAN modules.
 
 
 
 I'm not happy, hence the complaining about the AMI from 2009.  But I'm glad 
 you changed the subject from your first one, which is that I should build my 
 own stack.
 
 So basically you are saying (and only you, not a community voice) that in 
 order to be a mod_perl developer one also needs to:
 
 1) Build and optimize Apache.
 2) Build and optimize MySql.
 3) Build and optimize Perl+mod_perl.
 4) Build and optimize a Linux server environment.
 or
 5) Have enough money to pay for all of the above.

You have no stack.

Make one.

Better still, get a bunch of people together with the same problem. Dunno where
you'd find 'em.

I just spent six months helping a company do exactly[0] this and move off a 
dated
RH platform onto a modern, current, Debian, perl 5.14, all new CPAN modules.

The developers were unleashed with modern perl and moduels and the admins didn't
have to worry about holding together decrepit operating systems with known 
issues.

There's a benefit.

It doesn't take that long to build a perl, load it with modules (especially 
with 
cpanm), compile an Apache and a mod_perl. 

As for optimize, I've always found gentoo-safe flags for the arch you're 
targetting 
to work pretty well.

And the developers got exactly the perl they wanted: fully 64-bit internals. 
(Having
a core committer on the team helped and a few other perl world stalwarts 
besides).

Sorry to have been so blunt about it but you have a problem and have an issue 
with 
adressing it.

[0] A small part of the six months, there was a lot of other stuff going on too 
:)




Re: How do you use mod_perl for your web application?

2011-07-02 Thread Dave Hodgkinson

On 2 Jul 2011, at 08:38, Max Kanat-Alexander wrote:

  (which is why I frequently talk/ask
 about SizeLimit on this list) 

And I will frequently say that this is the Wrong Answer. MaxClients
and a proxy on the front is more often the right answer. A fat 
Apache is an application server, treat it as such.





Re: Debugging a long process

2011-06-15 Thread Dave Hodgkinson

On 15 Jun 2011, at 22:53, Tosh Cooey wrote:
 
 I am waiting to hear back from my server admin before I kill him, but it 
 seems that maybe there's some issues with my Ubuntu and the worker MPM on a 
 small EC2 instance.

I've been doing this stuff since web 1.0 and have always found prefork to 
be sensible and deterministic.

I'd go with the defenestration option.



Re: Debugging a long process

2011-06-09 Thread Dave Hodgkinson

On 9 Jun 2011, at 17:13, Tosh Cooey wrote:

 I haven't tried Devel::NYTProf, but the blocking seems to have been the 
 keyword here...
 
 root  2661  0.0  1.5  37900 27492 ?Ss   Jun08   0:00 
 /usr/sbin/apache2 -k start
 www-data  3875  0.0  1.3  37264 23300 ?S06:25   0:00 
 /usr/sbin/apache2 -k start
 www-data  3882  3.9  8.7 395156 153644 ?   Sl   06:25   6:15 
 /usr/sbin/apache2 -k start

Very much looks like you don't have a startup.pl that loads the world in the 
parent 
process. That will cause a masive inhale on the first hit.

 
 Anyone have sweet spots for Apache settings running on an EC2 small instance?
   

Whatever works for you after measurement.

Read the mod_perl tuning guide and settle on a strategy of MaxRequestsPerClient
or a fixed Apache2::SizeLimit.

Also, are you running stock apache/perl/mod_perl? Seriously consider spending
time making your own build. Even recompiling the .srpms with gentoo-safe flags
for that $arch could give a healthy boost.

Or pay someone *cough* *cough* to do it for you :)




Re: Apache2::SizeLimit and x64_86

2011-04-11 Thread Dave Hodgkinson

On 11 Apr 2011, at 02:24, E R wrote:

 Hi all,
 
 On x86_64 I noticed that perl .so files (XS modules) appear to use a
 lot more memory than they do on 32-bit architectures.

It's not just .so files. The footprint of our whole mod_perl processes
pretty much doubled when we went to 64 bit (including a self-compiled
perl with full 64 bit internals).

It's the price to pay for 64 bit!

Are you using the A::S that's in the repo? It has fixes for calculating
sizes...




Re: http-authentication on postgresql

2011-03-22 Thread Dave Hodgkinson
Can you give us a hint as to what the errors are?

On 22 Mar 2011, at 15:10, Michel Jansen wrote:

 Hi There,
 
 I have some troubles with the http-authentication using apache2 in 
 combination with postgresql. I used to do it with Apache::AuthenDBI 
 configuring access.conf in the following way:
 
 ---
 AuthName MyDB
 AuthType Basic
 PerlAuthenHandler Apache::AuthDBI::authen
 PerlSetVar Auth_DBI:data_source dbi:Pg:dbname=mydb
 PerlSetVar Auth_DBI_username me
 PerlSetVar Auth_DBI_password pw
 PerlSetVar Auth_DBI_pwd_table MEMBER
 PerlSetVar Auth_DBI_puid_field EMAILADRES
 PerlSetVar Auth_DBI_pwd_field PASSWORD
 PerlSetVar Auth_DBI_encrypted off
 require valid-user
 -
 
 But with apache2 this results in errors...
 
 Can anyone give me a hint?
 
 Kind Regards,
 
 Michel Jansen



Re: On memory consumption - request for comments

2011-02-24 Thread Dave Hodgkinson
What's the rough ETA before this makes it to CPAN?

Working out if I want to add the patch to our build process or not...

On 24 Feb 2011, at 08:41, Torsten Förtsch wrote:

 On Thursday, February 24, 2011 09:29:23 Max Kanat-Alexander wrote:
 On 02/23/2011 11:40 PM, Torsten Förtsch wrote:
 On Thursday, February 24, 2011 07:45:29 Max Kanat-Alexander wrote:
 Hey Fred. So given the discussion that we've had on this, do you
 think that the next version of SizeLimit could change its Linux
 behavior to return the more appropriate rss size?
 
 
 
 yes
 
Awesome, thank you. :-)
 
 Max, could you please check if the following patch does what you want and try 
 it out in your environment?
 
 Index: lib/Apache/SizeLimit/Core.pm
 ===
 --- lib/Apache/SizeLimit/Core.pm(revision 1069512)
 +++ lib/Apache/SizeLimit/Core.pm(revision 1069513)
 @@ -117,9 +117,9 @@
 sub _check_size {
 my $class = shift;
 
 -my ($size, $share) = $class-_platform_check_size();
 +my ($size, $share, $unshared) = $class-_platform_check_size();
 
 -return ($size, $share, $size - $share);
 +return ($size, $share, defined $unshared ? $unshared : $size - $share);
 }
 
 sub _load {
 @@ -176,7 +176,9 @@
 return $class-_linux_size_check() unless $USE_SMAPS;
 
 my $s = Linux::Smaps-new($$)-all;
 -return ($s-size, $s-shared_clean + $s-shared_dirty);
 +return ($s-size,
 +   $s-shared_clean + $s-shared_dirty,
 +   $s-private_clean + $s-private_dirty);
 }
 
 sub _linux_size_check {
 
 
 Torsten Förtsch
 
 -- 
 Need professional modperl support? Hire me! (http://foertsch.name)
 
 Like fantasy? http://kabatinte.net



Re: [Mason] ANNOUNCE: Mason 2

2011-02-24 Thread Dave Hodgkinson

Lovefilm big enough for you?

On 24 Feb 2011, at 10:49, xiaolan wrote:

 oops is there any big player using Mason these days?
 
 On Tue, Feb 22, 2011 at 2:24 AM, Perrin Harkins per...@elem.com wrote:
 In case any of you Mason users on the mod_perl list aren't on the Mason 
 list...
 
 - Perrin
 
 -- Forwarded message --
 From: Jonathan Swartz swa...@pobox.com
 Date: Mon, Feb 21, 2011 at 11:16 AM
 Subject: [Mason] ANNOUNCE: Mason 2
 To: Mason-Users List mason-us...@lists.sourceforge.net
 
 
 I'm pleased to announce Mason 2, the first major version of Mason in ten 
 years:
 
http://search.cpan.org/perldoc?Mason
 
 Mason 2 has been rearchitected and reimplemented from the ground up,
 to take advantage of modern Perl techniques (Moose, Plack/PSGI) and to
 correct long-standing feature and syntax inadequacies. Its new
 foundations should allow its performance and flexibility to far exceed
 Mason 1.
 
 Though little original code or documentation remains, Mason's core
 philosophy is intact; it should still feel like Mason to existing
 users.
 
 Major changes:
 
 * Name. The name is now Mason, instead of HTML::Mason.
 
 * Component classes. Each component is represented by its own (Moose)
 class, rather than just an instance of a common class. This means that
 components have their own namespaces, subroutines, methods, and
 attributes, and can truly inherit from one other. See
 http://search.cpan.org/perldoc?Mason::Manual::Components
 
 * Filters. A single powerful filter syntax and mechanism consolidates
 three separate filter mechanisms from Mason 1 (filter blocks,
 components with content, and escape flags). See
 http://search.cpan.org/perldoc?Mason::Manual::Filters
 
 * Plugins. Moose roles are utilized to create a flexible plugin system
 that can modify nearly every aspect of Mason's operation. Previously
 core features such as caching can now be implemented in plugins. See
 http://search.cpan.org/perldoc?Mason::Manual::Plugins
 
 * Web integration. Mason 1's bulky custom web handling code
 (ApacheHandler, CGIHandler) has been replaced with a simple PSGI
 handler and with plugins for web frameworks like Catalyst and Dancer.
 The core Mason distribution is now completely web-agnostic. See
 http://search.cpan.org/perldoc?Mason::Plugin::PSGIHandler
 
 * File naming. Mason now facilitates and enforces (in a customizable
 way) standard file extensions for components: .m (top-level
 components), .mi (internal components), and .pm (pure-perl
 components).
 
 See http://search.cpan.org/perldoc?Mason::Manual::UpgradingFromMason1
 for a more detailed list of changes.
 
 Mason 2 is obviously still in alpha status, but it has a fair sized
 test suite and I'm eager to start building web projects with it. I
 hope you'll give it a try and let us know what you think!
 
 Best
 Jon
 



Re: On memory consumption - request for comments

2011-02-24 Thread Dave Hodgkinson

On 24 Feb 2011, at 15:44, Fred Moyer wrote:

 2011/2/24 Torsten Förtsch torsten.foert...@gmx.net:
 On Thursday, February 24, 2011 11:27:42 Dave Hodgkinson wrote:
 What's the rough ETA before this makes it to CPAN?
 
 end of April, perhaps.
 
 We can release this earlier than 2.0.6 if there are enough testers to
 give feedback.

I'll ask here.

Re: On memory consumption - request for comments

2011-02-11 Thread Dave Hodgkinson

On 11 Feb 2011, at 14:32, André Warnier wrote:

 Torsten Förtsch wrote:
 Hi,
 there is an ongoing discussion...
 
 Great article, Torsten. Thanks.
 
 


Yes. Please post on the interwebs so I can point colleagues at it.

I think A::SL is the wrong hammer for their nail but I need stronger arguments 
:)




Re: experiencing Out of memory errors

2011-01-27 Thread Dave Hodgkinson

On 26 Jan 2011, at 15:17, John Deighan wrote:

 What we would like is to run this application in a 64 bit environment, thus
 allowing us to use more than the 2 GB memory that the Apache process ('httpd')
 is limited to (the Out of memory errors always occur as the memory usage
 of the httpd process approaches this 2 GB limit).

Can I just say: WTF? 2G in an Apache? Surely there's a better way of 
architecting
this?

smime.p7s
Description: S/MIME cryptographic signature


Re: about the message queue server

2010-12-09 Thread Dave Hodgkinson
You're prematurely optimising. Use something and see if it sucks for you.
Also, look at RabbitMQ :)


On 9 Dec 2010, at 14:39, practicalperl wrote:

 Hi,
 
 Would you please recommend me a high performance message queue server?
 Currently I'm looking up at:
 http://search.cpan.org/~dsnopek/POE-Component-MessageQueue-0.2.10/lib/POE/Component/MessageQueue.pm
 
 But I know nothing about its performance stuff.
 
 Thanks.



smime.p7s
Description: S/MIME cryptographic signature


Re: modperl for ubuntu

2010-12-01 Thread Dave Hodgkinson

On 1 Dec 2010, at 02:51, Jeff Pang wrote:

 Hello,
 
 Does modperl and Apache2::Request have a port for Ubuntu and which will be 
 installed by apt-get?
 Ubuntu's development environment is so worse, has been losing so many 
 libraries, compiling modperl under which is hard.

Jeff,

It's no so bad. I'm building perl 5.12.2 and latest mod_perl for Ubuntu with no 
wildly crazy
options except full 64-bit perl internals.

Dave

smime.p7s
Description: S/MIME cryptographic signature


Re: mod_perl instability on Ubuntu 10.04 server platform

2010-10-28 Thread Dave Hodgkinson

On 28 Oct 2010, at 12:49, Vanja Hrustic wrote:
 
 Unfortunately, it seems like I'd have to dig deep into Apache or
 mod_perl to hunt this down, and I do not have knowledge (nor
 'intuition' :) to do this without some guidance.

I have a basic mistrust of shipped packages. I'm in the process of building
perl, httpd and modperl from scratch for a client. I think for serious
use, it's the only way to go.


 
 Basically, if I end up with these unresponsive threads, is there
 anything I can do to figure out what caused them to hang? Would gdb be
 of any use, would I be able to attach to these threads and see any
 useful details (never debugged threaded apps, so no idea how that
 would work)?


Yes, you can do a gdb attach and a stack trace. You should be able to
see from that if it's in apache or perl that the problem is happening.



smime.p7s
Description: S/MIME cryptographic signature


Re: Share Memory Apache2 and ModPerl2

2010-10-02 Thread Dave Hodgkinson

On 2 Oct 2010, at 09:10, Idel Fuschini wrote:

 Hi,
 For my project Apache Mobile FIlter, I'm looking a method to share  memory 
 array data between Apache2 processes.
 It's possible ?


IPC::Shareable
IPC::ShareLite

And others.




smime.p7s
Description: S/MIME cryptographic signature


Re: Poll - do you use Apache::Test custom configuration?

2010-10-01 Thread Dave Hodgkinson

On 30 Sep 2010, at 19:58, Fred Moyer wrote:

 To simplify the Apache::Test codebase, the custom configuration
 feature is being considered for removal.  Is anyone here using that
 feature?  If you don't know what it is, you aren't using it.

I don't believe we do, but could you give us a quick overview
as to why and when we should consider it?

Ta,

smime.p7s
Description: S/MIME cryptographic signature


Build fail on Ubuntu

2010-09-29 Thread Dave Hodgkinson


1. Problem Description:

make test fails:

t/hooks/authen_basic.t .. 1/4 # Failed test 4 in 
t/hooks/authen_basic.t at line 26
t/hooks/authen_basic.t .. Failed 1/4 subtests 
t/hooks/authen_digest.t . ok   
t/hooks/authz.t . 1/4 # Failed test 4 in 
t/hooks/authz.t at line 19
t/hooks/authz.t . Failed 1/4 subtests 


t/modules/apache_status.t ... 1/15 # Failed test 14 in 
t/modules/apache_status.t at line 47
# Failed test 15 in t/modules/apache_status.t at line 47 fail #2



Test Summary Report
---
t/hooks/authen_basic.t(Wstat: 0 Tests: 4 Failed: 1)
  Failed test:  4
t/hooks/authz.t   (Wstat: 0 Tests: 4 Failed: 1)
  Failed test:  4
t/modules/apache_status.t (Wstat: 0 Tests: 15 Failed: 2)
  Failed tests:  14-15



2. Used Components and their Configuration:

*** mod_perl version 2.04

*** using /var/lib/hudson/perl/mod_perl-2.0.4/lib/Apache2/BuildConfig.pm

*** Makefile.PL options:
  MP_APR_LIB = aprext
  MP_APXS= /opt/babelhttpd-2.2.16/bin/apxs
  MP_COMPAT_1X   = 1
  MP_GENERATE_XS = 1
  MP_LIBNAME = mod_perl
  MP_USE_DSO = 1


*** /opt/babelhttpd-2.2.16/bin/httpd -V
Server version: Apache/2.2.16 (Unix)
Server built:   Sep 28 2010 19:45:52
Server's Module Magic Number: 20051115:24
Server loaded:  APR 1.3.8, APR-Util 1.3.9
Compiled using: APR 1.3.8, APR-Util 1.3.9
Architecture:   64-bit
Server MPM: Prefork
  threaded: no
forked: yes (variable process count)
Server compiled with
 -D APACHE_MPM_DIR=server/mpm/prefork
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT=/opt/babelhttpd-2.2.16
 -D SUEXEC_BIN=/opt/babelhttpd-2.2.16/bin/suexec
 -D DEFAULT_PIDLOG=logs/httpd.pid
 -D DEFAULT_SCOREBOARD=logs/apache_runtime_status
 -D DEFAULT_LOCKFILE=logs/accept.lock
 -D DEFAULT_ERRORLOG=logs/error_log
 -D AP_TYPES_CONFIG_FILE=conf/mime.types
 -D SERVER_CONFIG_FILE=conf/httpd.conf

*** /usr/bin/ldd /opt/babelhttpd-2.2.16/bin/httpd
linux-vdso.so.1 =  (0x7fff444d6000)
libm.so.6 = /lib/libm.so.6 (0x7f75d9056000)
libpcre.so.3 = /lib/libpcre.so.3 (0x7f75d8e28000)
libaprutil-1.so.0 = /usr/lib/libaprutil-1.so.0 (0x7f75d8c04000)
libdb-4.8.so = /usr/lib/libdb-4.8.so (0x7f75d8897000)
libapr-1.so.0 = /usr/lib/libapr-1.so.0 (0x7f75d8662000)
libpthread.so.0 = /lib/libpthread.so.0 (0x7f75d8444000)
libc.so.6 = /lib/libc.so.6 (0x7f75d80c1000)
libuuid.so.1 = /lib/libuuid.so.1 (0x7f75d7ebc000)
librt.so.1 = /lib/librt.so.1 (0x7f75d7cb3000)
libcrypt.so.1 = /lib/libcrypt.so.1 (0x7f75d7a7a000)
libdl.so.2 = /lib/libdl.so.2 (0x7f75d7876000)
libexpat.so.1 = /lib/libexpat.so.1 (0x7f75d764c000)
/lib64/ld-linux-x86-64.so.2 (0x7f75d9599000)


*** (apr|apu)-config linking info

 -L/usr/lib -laprutil-1  -ldb 
 -L/usr/lib -lapr-1  



*** /opt/babelperl/perl-5.12.2/bin/perl -V
Summary of my perl5 (revision 5 version 12 subversion 2) configuration:
   
  Platform:
osname=linux, osvers=2.6.32-21-server, archname=x86_64-linux-ld
uname='linux ubuntu 2.6.32-21-server #32-ubuntu smp fri apr 16 09:17:34 utc 
2010 x86
_64 gnulinux '
config_args='-des -Duseshrplib -Duse64bitint -Duselongdouble -Uusethreads 
-Uusemulti
plicity -Dprefix=/opt/babelperl/perl-5.12.2 
-Dsiteprefix=/opt/babelperl/perl-5.12.2 -Dve
ndorprefix=/opt/babelperl/vendor/perl-5.12.1 -Dcccdlflags=-fPIC -O2 -pipe'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=define
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector 
-I/usr/local/include
 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.4.3', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='long double', nvsize=16, Off_t='off_t', 
lseeksize=8
alignbytes=16, prototype=define
  Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /lib64 /usr/lib64
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.11.1.so, so=so, useshrplib=true,