[php-maint] Bug#618462: php5: Use of systems' embedded timezone data causes performance regression

Maciej Wiercinski maciej at wiercinski.net
Tue Mar 15 11:52:24 UTC 2011


Package: php5
Version: 5.3.5-1
Severity: normal
Patch use_embedded_timezonedb.patch, calls stat() on every single file in
/usr/share/zoneinfo upon first use of tje timezone data - in total over 600
syscalls. Example:
$ strace -s 100 -r php -n -r"date_default_timezone_set('GMT');" 2>&1 | grep
zoneinfo | head -10
     0.000110 open("/usr/share/zoneinfo/",
O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
     0.000031 stat64("/usr/share/zoneinfo//localtime", {st_mode=S_IFREG|0644,
st_size=3661, ...}) = 0
     0.000061 stat64("/usr/share/zoneinfo//Zulu", {st_mode=S_IFREG|0644,
st_size=118, ...}) = 0
     0.000055 stat64("/usr/share/zoneinfo//WET", {st_mode=S_IFREG|0644,
st_size=1873, ...}) = 0
     0.000055 stat64("/usr/share/zoneinfo//W-SU", {st_mode=S_IFREG|0644,
st_size=2194, ...}) = 0
     0.000056 stat64("/usr/share/zoneinfo//Universal", {st_mode=S_IFREG|0644,
st_size=118, ...}) = 0
     0.000056 stat64("/usr/share/zoneinfo//UTC", {st_mode=S_IFREG|0644,
st_size=118, ...}) = 0
     0.000054 stat64("/usr/share/zoneinfo//US", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
     0.000055 stat64("/usr/share/zoneinfo//UCT", {st_mode=S_IFREG|0644,
st_size=118, ...}) = 0
     0.000054 stat64("/usr/share/zoneinfo//Turkey", {st_mode=S_IFREG|0644,
st_size=2721, ...}) = 0
Original discussion:
http://bugs.php.net/bug.php?id=54250


-- System Information:
Debian Release: wheezy/sid
Architecture: i386 (i686)
Kernel: Linux 2.6.31 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages php5 depends on:
ii  libapache2-mod-php5           5.3.5-1    server-side, HTML-embedded scripti
ii  php5-common                   5.3.5-1    Common files for packages built fr
php5 recommends no packages.
php5 suggests no packages.
-- no debconf information





More information about the pkg-php-maint mailing list