Initial Velocity talk

This commit is contained in:
Rasmus Lerdorf
2015-05-27 07:39:46 -07:00
parent bb1a2c9f12
commit 8e08610952
15 changed files with 1657 additions and 11 deletions

View File

@@ -1,5 +1,4 @@
<slide title="">
<break lines="12"/>
<blurb fontsize="20em" align="center">20 Years of PHP!??</blurb>
<notes>
Argh!

View File

@@ -1,4 +1,3 @@
<slide title="">
<break lines="12"/>
<blurb fontsize="20em" align="center">Lies, damn lies and benchmarks</blurb>
</slide>

View File

@@ -1,5 +1,4 @@
<slide title="">
<break lines="4"/>
<blurb fontsize="8em">C API for the Web</blurb>

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

View File

@@ -0,0 +1,171 @@
window["render_wpbench"] = function() {
$('#wpbench_container').highcharts({
chart: {
type: 'column'
},
title: {
text: 'Wordpress-4.1.1',
style: { fontSize: '40px' }
},
subtitle: {
text: 'http://wordpress/?p=1',
style: { fontSize: '20px' }
},
xAxis: [{
categories: [ 'PHP 5.3', 'PHP 5.4', 'PHP 5.5', 'PHP 5.6', 'PHP 7', 'HHVM 3.7' ],
labels: {
style: { color: '#000', fontSize: '20px' }
}
}],
yAxis: [{
min: 0,
showEmpty: false,
title: {
text: 'Req/sec',
style: { fontSize: '25px' }
},
labels: {
style: { color: '#111', fontSize: '15px' }
}
}, {
min: 0,
showEmpty: false,
title: {
text: 'Latency (ms)',
style: { fontSize: '25px' }
},
labels: {
format: '{value}ms',
style: { color: '#111', fontSize: '15px' }
},
opposite: true
}],
tooltip: {
enabled: false
},
legend: {
title: { text: 'Concurrent clients' }
},
plotOptions: {
column: {
pointPadding: 0.01,
groupPadding: 0.05,
borderWidth: 0
}
},
series: [{
name: 'r/s @ 10',
yAxis: 0,
data: [208.11,251.20,252.84,269.08,611.54,644.36],
dataLabels: {
enabled: true,
rotation: -90,
color: '#000',
align: 'right',
x: 4,
y: 5,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif',
},
format: '{point.y:.0f}'
},
visible: false
}, {
name: 'r/s @ 20',
yAxis: 0,
data: [210.57,254.37,255.80,272.55,627.32,666.2],
dataLabels: {
enabled: true,
rotation: -90,
color: '#fff',
align: 'right',
x: 4,
y: 5,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif',
},
format: '{point.y:.0f}'
},
visible: true
}, {
name: 'r/s @ 40',
yAxis: 0,
data: [210.21,254.50,256.64,271.55,623.82,666.11],
dataLabels: {
enabled: true,
rotation: -90,
color: '#000',
align: 'right',
x: 4,
y: 5,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif',
},
format: '{point.y:.0f}'
},
visible: false
}, {
name: 'latency @ 10',
yAxis: 1,
data: [48,39.9,39.8,37.2,16.3,18],
tooltip: { valueSuffix: 'ms' },
dataLabels: {
enabled: true,
rotation: -90,
color: '#000',
align: 'right',
x: 4,
y: 5,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif',
},
format: '{point.y:.0f}'
},
visible: false
}, {
name: 'latency @ 20',
yAxis: 1,
data: [95,78.6,78.2,73.5,32.1,30],
tooltip: { valueSuffix: 'ms' },
dataLabels: {
enabled: true,
rotation: -90,
color: '#000',
align: 'right',
x: 4,
y: 5,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif',
},
format: '{point.y:.0f}'
},
visible: false
}, {
name: 'latency @ 40',
yAxis: 1,
data: [192,156.7,155.7,148.7,64.3,60],
tooltip: { valueSuffix: 'ms' },
dataLabels: {
enabled: true,
rotation: -90,
color: '#000',
align: 'right',
x: 4,
y: 5,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif',
},
format: '{point.y:.0f}'
},
visible: false
}],
credits: false
});
}

View File

@@ -0,0 +1,25 @@
<slide title="" section="wpbench">
<literal><![CDATA[
<div id="wpbench_container" class="stretch" style="margin: 0 auto"></div>
<script src="presentations/slides/intro/may26/wpbench.js"></script>
]]></literal>
<break lines="1" section="fdo"/>
<blurb fontsize="1.1em" align="center">GCC Feedback-Directed Optimization (FDO)</blurb>
<example fontsize="1em" result='0' title="" type="shell nohighlight"><![CDATA[
$ make clean
$ make -j8 prof-gen
...
$ sapi/cgi/php-cgi -T 1000 /var/www/wordpress/index.php > /dev/null
$ make prof-clean
$ make -j8 prof-use
]]></example>
<break lines="1" section="wpbench_fdo"/>
<literal><![CDATA[
<div id="wpbench_fdo_container" class="stretch" style="margin: 0 auto"></div>
<script src="presentations/slides/intro/may26/wpbench_fdo.js"></script>
]]></literal>
</slide>

View File

@@ -0,0 +1,171 @@
window["render_wpbench_fdo"] = function() {
$('#wpbench_fdo_container').highcharts({
chart: {
type: 'column'
},
title: {
text: 'Wordpress-4.1.1',
style: { fontSize: '40px' }
},
subtitle: {
text: 'http://wordpress/?p=1',
style: { fontSize: '20px' }
},
xAxis: [{
categories: [ 'PHP 7', 'PHP 7 FDO', 'HHVM 3.7' ],
labels: {
style: { color: '#000', fontSize: '20px' }
}
}],
yAxis: [{
min: 0,
showEmpty: false,
title: {
text: 'Req/sec',
style: { fontSize: '25px' }
},
labels: {
style: { color: '#111', fontSize: '15px' }
}
}, {
min: 0,
showEmpty: false,
title: {
text: 'Latency (ms)',
style: { fontSize: '25px' }
},
labels: {
format: '{value}ms',
style: { color: '#111', fontSize: '15px' }
},
opposite: true
}],
tooltip: {
enabled: false
},
legend: {
title: { text: 'Concurrent clients' }
},
plotOptions: {
column: {
pointPadding: 0.01,
groupPadding: 0.05,
borderWidth: 0
}
},
series: [{
name: 'r/s @ 10',
yAxis: 0,
data: [611.54, 644.61, 644.36],
dataLabels: {
enabled: true,
rotation: -90,
color: '#000',
align: 'right',
x: 4,
y: 5,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif',
},
format: '{point.y:.0f}'
},
visible: true
}, {
name: 'r/s @ 20',
yAxis: 0,
data: [627.32, 664.18, 666.28],
dataLabels: {
enabled: true,
rotation: -90,
color: '#fff',
align: 'right',
x: 4,
y: 5,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif',
},
format: '{point.y:.0f}'
},
visible: true
}, {
name: 'r/s @ 40',
yAxis: 0,
data: [623.82, 664.08, 666.11],
dataLabels: {
enabled: true,
rotation: -90,
color: '#000',
align: 'right',
x: 4,
y: 5,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif',
},
format: '{point.y:.0f}'
},
visible: true
}, {
name: 'latency @ 10',
yAxis: 1,
data: [16.3,15.5,18],
tooltip: { valueSuffix: 'ms' },
dataLabels: {
enabled: true,
rotation: -90,
color: '#000',
align: 'right',
x: 4,
y: 5,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif',
},
format: '{point.y:.0f}'
},
visible: false
}, {
name: 'latency @ 20',
yAxis: 1,
data: [32.1,30.4,30],
tooltip: { valueSuffix: 'ms' },
dataLabels: {
enabled: true,
rotation: -90,
color: '#000',
align: 'right',
x: 4,
y: 5,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif',
},
format: '{point.y:.0f}'
},
visible: false
}, {
name: 'latency @ 40',
yAxis: 1,
data: [64.3,60.2,60],
tooltip: { valueSuffix: 'ms' },
dataLabels: {
enabled: true,
rotation: -90,
color: '#000',
align: 'right',
x: 4,
y: 5,
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif',
},
format: '{point.y:.0f}'
},
visible: false
}],
credits: false
});
}

BIN
slides/intro/pcache.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -1,13 +1,174 @@
<slide title="PHP 7" section="php7">
<slide title="" section="php7">
<image filename="php7trans-200.png" />
<break lines="1" />
<blurb fontsize="1.1em" align="left">✔ engine improvements</blurb>
<list>
<bullet fontsize="1em" type="none">100%+ performance gain on most real-world applications</bullet>
<bullet fontsize="1em" type="none">Lower memory usage</bullet>
<bullet fontsize="1em" type="none">Native thread local storage</bullet>
</list>
<break lines="1" section="php7pcache1"/>
<blurb fontsize="1.1em" align="left">✔ Persistent secondary file-based cache for OPCache</blurb>
<image filename="pcache.png" />
<break lines="1" section="php7pcache2"/>
<image filename="deploycache.png" />
<break lines="1" section="php7pcache3"/>
<example fontsize="1.1em" result='0' title="" type="ini"><![CDATA[
; --enable-opcache-file
; php.ini
opcache.file_cache=/var/tmp
; php-cli.ini
opcache.enable_cli=1
opcache.file_cache=/var/tmp
opcache.file_cache_only=1
]]></example>
<example fontsize="1em" result='0' title="" type="shell nohighlight"><![CDATA[
$ time composer >/dev/null
real 0m0.040s
user 0m0.032s
sys 0m0.004s
$ time composer >/dev/null
real 0m0.019s
user 0m0.016s
sys 0m0.000s
$ time php -d opcache.enable=0 /usr/local/bin/composer >/dev/null
real 0m0.033s
user 0m0.032s
sys 0m0.000s
]]></example>
<break lines="1" section="php7pcache4"/>
<example fontsize="0.78em" result='0' title="" type="shell nohighlight"><![CDATA[
/var/tmp
├── 7eeb6fe88104116c27c5650ddd83abf0
│   └── usr
│   └── local
│   └── bin
│   └── composer.bin
└── 7eeb6fe88104116c27c5650ddd83abf0phar:
└── usr
└── local
└── bin
└── composer
├── bin
│   └── composer.bin
├── src
│   ├── bootstrap.php.bin
│   └── Composer
│   ├── Command
│   │   ├── AboutCommand.php.bin
│   │   ├── ArchiveCommand.php.bin
│   │   ├── ClearCacheCommand.php.bin
│   │   ├── Command.php.bin
│   │   ├── ConfigCommand.php.bin
│   │   ├── CreateProjectCommand.php.bin
│   │   ├── DependsCommand.php.bin
│   │   ├── DiagnoseCommand.php.bin
│   │   ├── DumpAutoloadCommand.php.bin
│   │   ├── GlobalCommand.php.bin
│   │   ├── Helper
│   │   │   └── DialogHelper.php.bin
│   │   ├── HomeCommand.php.bin
│   │   ├── InitCommand.php.bin
│   │   ├── InstallCommand.php.bin
│   │   ├── LicensesCommand.php.bin
│   │   ├── RemoveCommand.php.bin
│   │   ├── RequireCommand.php.bin
│   │   ├── RunScriptCommand.php.bin
│   │   ├── SearchCommand.php.bin
│   │   ├── SelfUpdateCommand.php.bin
│   │   ├── ShowCommand.php.bin
│   │   ├── StatusCommand.php.bin
│   │   ├── UpdateCommand.php.bin
│   │   └── ValidateCommand.php.bin
│   ├── Composer.php.bin
│   ├── Console
│   │   └── Application.php.bin
│   ├── Factory.php.bin
│   ├── IO
│   │   ├── BaseIO.php.bin
│   │   ├── ConsoleIO.php.bin
│   │   └── IOInterface.php.bin
│   ├── Package
│   │   ├── BasePackage.php.bin
│   │   └── PackageInterface.php.bin
│   ├── Script
│   │   └── ScriptEvents.php.bin
│   └── Util
│   └── ErrorHandler.php.bin
└── vendor
├── autoload.php.bin
├── composer
│   ├── autoload_classmap.php.bin
│   ├── autoload_namespaces.php.bin
│   ├── autoload_psr4.php.bin
│   ├── autoload_real.php.bin
│   └── ClassLoader.php.bin
└── symfony
└── console
└── Symfony
└── Component
└── Console
├── Application.php.bin
├── Command
│   ├── Command.php.bin
│   ├── HelpCommand.php.bin
│   └── ListCommand.php.bin
├── Descriptor
│   ├── ApplicationDescription.php.bin
│   ├── DescriptorInterface.php.bin
│   ├── Descriptor.php.bin
│   ├── JsonDescriptor.php.bin
│   ├── MarkdownDescriptor.php.bin
│   ├── TextDescriptor.php.bin
│   └── XmlDescriptor.php.bin
├── Formatter
│   ├── OutputFormatterInterface.php.bin
│   ├── OutputFormatter.php.bin
│   ├── OutputFormatterStyleInterface.php.bin
│   ├── OutputFormatterStyle.php.bin
│   └── OutputFormatterStyleStack.php.bin
├── Helper
│   ├── DebugFormatterHelper.php.bin
│   ├── DescriptorHelper.php.bin
│   ├── DialogHelper.php.bin
│   ├── FormatterHelper.php.bin
│   ├── HelperInterface.php.bin
│   ├── Helper.php.bin
│   ├── HelperSet.php.bin
│   ├── InputAwareHelper.php.bin
│   ├── ProcessHelper.php.bin
│   ├── ProgressHelper.php.bin
│   ├── QuestionHelper.php.bin
│   ├── TableHelper.php.bin
│   ├── Table.php.bin
│   └── TableStyle.php.bin
├── Input
│   ├── ArgvInput.php.bin
│   ├── ArrayInput.php.bin
│   ├── InputArgument.php.bin
│   ├── InputAwareInterface.php.bin
│   ├── InputDefinition.php.bin
│   ├── InputInterface.php.bin
│   ├── InputOption.php.bin
│   └── Input.php.bin
└── Output
├── ConsoleOutputInterface.php.bin
├── ConsoleOutput.php.bin
├── NullOutput.php.bin
├── OutputInterface.php.bin
├── Output.php.bin
└── StreamOutput.php.bin
32 directories, 87 files
]]></example>
<break lines="1" section="php7ast"/>
<blurb fontsize="1.1em" align="left">✔ Abstract Syntax Tree</blurb>
@@ -84,6 +245,12 @@ echo $a ?? $x ?? $c; // 2
<break lines="1" section="Spaceship"/>
<blurb fontsize="1.1em" align="left">✔ Spaceship Operator</blurb>
<example fontsize="1.5em" result='0' title=""><![CDATA[
|=| Tie Fighter
k=k Tie Interceptor
<==> Tie Bomber
<=> Tie Advanced X1 ✔
]]></example>
<example fontsize="1.1em" result='0' title=""><![CDATA[
<?php

View File

@@ -0,0 +1,35 @@
<slide title="" section="php7perfdetail">
<list>
<bullet fontsize="1em" type="none">zval size reduced from 24 to 16 bytes</bullet>
<bullet fontsize="1em" type="none">Hashtable size reduced from 72 to 56 bytes</bullet>
<bullet fontsize="1em" type="none">Hashtable bucket size reduced from 72 to 32 bytes</bullet>
<bullet fontsize="1em" type="none">Immutable array optimization</bullet>
</list>
<example fontsize="1.1em" result='0' title=""><![CDATA[
<?php
$a = [];
for($i=0; $i < 100000;$i++) $a[] = ['abc'];
echo memory_get_usage(true);
// PHP 5.x 43M
// PHP 7.0 6M
]]></example>
<break lines="1" section="php7perfdetail2"/>
<list>
<bullet fontsize="1em" type="none">Much more cpu cache friendly</bullet>
<bullet fontsize="1em" type="none">New memory allocator similar to jemalloc</bullet>
<bullet fontsize="1em" type="none">Faster hashtable iteration API</bullet>
<bullet fontsize="1em" type="none">Array duplication optimization</bullet>
<bullet fontsize="1em" type="none">PCRE JIT enabled by default</bullet>
<bullet fontsize="1em" type="none">Fast ZPP (ZendParseParameters) implementation</bullet>
<bullet fontsize="1em" type="none">Faster stack-allocated zvals (instead of heap)</bullet>
<bullet fontsize="1em" type="none">Optimized VM calling</bullet>
<bullet fontsize="1em" type="none">Global register variables with gcc 4.8+</bullet>
<bullet fontsize="1em" type="none">plus hundreds of micro-optimizations</bullet>
</list>
<break lines="1" section="php7detail3"/>
<blurb fontsize="20em" align="center">JIT?</blurb>
</slide>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@@ -11,7 +11,7 @@
<blurb fontsize="1.5em" align="left">Install Vagrant and Virtualbox</blurb>
<blurb fontsize="1.2em" align="left">Then:</blurb>
<example fontsize="1.2em" result='0' type="shell" title=""><![CDATA[
<example fontsize="1.2em" result='0' type="shell nohighlight" title=""><![CDATA[
$ git clone https://github.com/rlerdorf/php7dev.git
$ cd php7dev
@@ -32,7 +32,7 @@ $ vagrant ssh
<break lines="1" section="php_contribute4"/>
<blurb fontsize="1.1em" align="left">Switching PHP versions is trivial</blurb>
<example fontsize="1.2em" result='0' title="" type="shell"><![CDATA[
<example fontsize="1.2em" result='0' title="" type="shell nohighlight"><![CDATA[
vagrant@php7dev:~$ newphp 56
Activating PHP 5.6.6-dev and restarting php-fpm
@@ -41,7 +41,7 @@ Activating PHP 7.0.0-dev and restarting php-fpm
]]></example>
<blurb fontsize="1.1em" align="left">20 pre-compiled versions</blurb>
<example fontsize="0.8em" result='0' title="" type="shell"><![CDATA[
<example fontsize="0.8em" result='0' title="" type="shell nohighlight"><![CDATA[
/usr/local/php53 /usr/local/php54-zts /usr/local/php56-debug-zts
/usr/local/php53-debug /usr/local/php55 /usr/local/php56-zts
/usr/local/php53-debug-zts /usr/local/php55-debug /usr/local/php70
@@ -54,7 +54,7 @@ Activating PHP 7.0.0-dev and restarting php-fpm
<break lines="1" section="php_contribute5"/>
<blurb fontsize="1.1em" align="left">Build any version</blurb>
<example fontsize="1.2em" result='0' title="" type="shell"><![CDATA[
<example fontsize="1.2em" result='0' title="" type="shell nohighlight"><![CDATA[
$ makephp 7
Build log in /tmp/build.log
Building PHP 7.0
@@ -73,7 +73,7 @@ done
<blurb fontsize="1.1em" align="left">or manually</blurb>
<example fontsize="1.2em" result='0' title="" type="shell"><![CDATA[
<example fontsize="1.2em" result='0' title="" type="shell nohighlight"><![CDATA[
$ cd php-src
$ git checkout PHP-5.6
$ git pull -r

View File

@@ -1,5 +1,4 @@
<slide title="">
<break lines="4"/>
<blurb fontsize="6em">PHP Announcement June 8, 1995</blurb>
<blurb fontsize="4em">Posted to comp.infosystems.www.authoring.cgi</blurb>

1026
velocity15.html Normal file

File diff suppressed because it is too large Load Diff

55
velocity15.xml Normal file
View File

@@ -0,0 +1,55 @@
<presentation
template="simple"
navmode="html"
titlecolor="#000000"
navbarbackground="#bbbbbb"
navbartopiclinks="0"
logo1="images/php-med-trans.png"
titlesize="6em"
navbarheight="3.5em"
examplebackground="#ffffff"
outputbackground="#ffffff"
exampleclass="noshadow"
exampleoutputclass="noshadow"
>
<notes>
PHP in 2015 with a focus on performance
</notes>
<topic>PHP</topic>
<title>Speeding up the Web with PHP 7</title>
<event>Velocity</event>
<location>Santa Clara</location>
<date>May 29, 2015</date>
<speaker>Rasmus Lerdorf</speaker>
<url>http://talks.php.net/velocity15</url>
<twitter>@rasmus</twitter>
<slide>slides/intro/titlepage.xml</slide>
<slide>slides/intro/20years.xml</slide>
<slide>slides/intro/phpannounce.xml</slide>
<slide>slides/intro/capi.xml</slide>
<slide>slides/intro/php7_2015.xml</slide>
<slide>slides/intro/perf2014.xml</slide>
<slide>slides/intro/php7_perf.xml</slide>
<slide>slides/intro/benchlies.xml</slide>
<slide>slides/intro/may1/benchbox.xml</slide>
<slide>slides/intro/may1/drupalbench.xml</slide>
<slide>slides/intro/may26/wpbench.xml</slide>
<slide>slides/intro/may1/bbbench.xml</slide>
<slide>slides/intro/may1/mwbench.xml</slide>
<slide>slides/intro/may1/opencartbench.xml</slide>
<slide>slides/intro/may1/wardrobebench.xml</slide>
<slide>slides/intro/may1/geeklogbench.xml</slide>
<slide>slides/intro/may1/magentobench.xml</slide>
<slide>slides/intro/may1/traqbench.xml</slide>
<slide>slides/intro/may1/cachetbench.xml</slide>
<slide>slides/intro/may1/moodlebench.xml</slide>
<slide>slides/intro/may1/zencartbench.xml</slide>
<slide>slides/intro/php_contribute.xml</slide>
</presentation>