[Bug 1527105] Re: Performance: drop HANDLE_BLOCK_INTERRUPTIONS support

2016-01-06 Thread Daniel Axtens
Hi Robie, sorry for taking so long to get back to you.

If Xenial is only going to ship PHP7, then I'm happy to drop the patch
entirely, as PHP7 already includes this change.

If Xenial is shipping PHP5 and PHP7, I would be happy if the patch could
be applied to PHP5 on Xenial.

Either way, while a backport would be nice, I agree that it's difficult
to justify it on the Stable guidelines, so I'm happy for this just to go
to Xenial.

Thanks!

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1527105

Title:
  Performance: drop HANDLE_BLOCK_INTERRUPTIONS support

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1527105/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1527105] Re: Performance: drop HANDLE_BLOCK_INTERRUPTIONS support

2015-12-17 Thread Daniel Axtens
Hi, thanks for the quick response.

I'm more than happy for this to wait for Xenial.

I wasn't aware there was going to be a 5.7. The page for 5.7 on the PHP
wiki suggests that it was a proposal that wasn't accepted:
https://wiki.php.net/rfc/php57 If I'm wrong about this then I'm happy to
work with upstream to get it into 5.7, but it looks like they want all
changes to go into php7 instead.

If you're referring to php7, then yes, this stuff does go away in PHP7.
However, I think there will still be a lot of people on php5 for some
time (think how long people stayed with php4!), so it'd be nice to have
that perform better.

I accept that there is risk associated with taking this patch. For two
reasons, I think the risk is minimal.

Firstly, I would be very surprised if people were compiling their custom
server backends against Ubuntu's source tree: I'd expect they'd compile
against mainline.

Secondly, even if they compiled against Ubuntu, they would need to
depend on HANDLE_BLOCK_INTERRUPTIONS to experience an issue.  Of all the
server APIs ever bundled with PHP, only Apache1 ever provided these
hooks. All of the (many!) other servers that PHP5 provided support for
didn't use these hooks.

If it were a 1 or 2% speed boost, I'd agree that it's not worth it.
However, given that it's closer to 5%, I think it's worth the work to
get it in.

Thanks again, and I'm happy to address any further concerns you have.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1527105

Title:
  Performance: drop HANDLE_BLOCK_INTERRUPTIONS support

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1527105/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1527105] [NEW] Performance: drop HANDLE_BLOCK_INTERRUPTIONS support

2015-12-17 Thread Daniel Axtens
Public bug reported:

Dropping HANDLE_BLOCK_INTERRUPTIONS, which is only used by Apache 1, and
is dropped in PHP7, leads to a 4-6% speedup on artificial benchmarks and
a measurable speedup on real world applications.

I have written a patch to do this and submitted it upstream:
https://github.com/php/php-src/pull/1532

The PHP folk are a little hesitant to merge it in case there's anyone
downstream who has a custom server API that still uses the hooks. Ubuntu
doesn't ship Apache 1, nor does it have any custom server APIs, so it's
safe to be merged, giving all your users a speed boost.

All the details and the patch are in the upstream submission, and I'm
happy to answer any other questions or get it into whatever format is
most useful for you.

** Affects: php5 (Ubuntu)
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to php5 in Ubuntu.
https://bugs.launchpad.net/bugs/1527105

Title:
  Performance: drop HANDLE_BLOCK_INTERRUPTIONS support

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1527105/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1527044] [NEW] Update mutex from file to pthread

2015-12-16 Thread Daniel Axtens
Public bug reported:

The default Mutex implementation used by Ubuntu's Apache package is file
locking. (See /etc/apache2/apache2.conf) This is slower than pthreads,
especially when using mpm_prefork.

The Apache project currently warns about pthreads being potentially
dangerous.[1] However, Linux has supported robust pthreads for many
years now,[2] so it's safe for Ubuntu to move to pthreads and reap the
performance benefits.

My tests on POWER8, VM and bare-metal, PHP and static files, show
something like a 1.5% to 3.5% performance gain for a one-line config
change.

[1] https://httpd.apache.org/docs/trunk/mod/core.html#mutex
[2] See this apache bug: https://bz.apache.org/bugzilla/show_bug.cgi?id=58744

** Affects: apache2 (Ubuntu)
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to apache2 in Ubuntu.
https://bugs.launchpad.net/bugs/1527044

Title:
  Update mutex from file to pthread

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1527044/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1458434] [NEW] Use __builtin_clzl on POWER

2015-05-24 Thread Daniel Axtens
Public bug reported:

Zend/zend_alloc.c uses __builtin_clzl in zend_mm_high_bit and
zend_mm_low_but, but only if (defined(__arm__) ||
defined(__aarch64__)). This is overly restrictive: it's also usable if
__defined__(__powerpc__).

This causes a bump to speed on POWER systems: previously
zend_mm_high_bit shows up on perf reports, with this patch the functions
drop out of the profile entirely.

This bug has also been reported upstream
(https://bugs.php.net/bug.php?id=69703), but I've sent you this report,
along with a `dpkg-source --commit` style patch, in the hopes that
you'll pick it up, so that Ubuntu users get the performance improvement
sooner.

This patch was built and tested on Vivid, but is applicable to a range
of PHP versions.

** Affects: php5 (Ubuntu)
 Importance: Undecided
 Status: New

** Attachment added: "__builtin_clzl.patch"
   
https://bugs.launchpad.net/bugs/1458434/+attachment/4403858/+files/__builtin_clzl.patch

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to php5 in Ubuntu.
https://bugs.launchpad.net/bugs/1458434

Title:
  Use __builtin_clzl on POWER

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1458434/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs