Tuesday, January 11. 2011
Quick way to see request time ... Posted by Antony Dovgal
in PHP at
12:36
Comments (2) Trackbacks (0) Quick way to see request time distribution
Ever wondered what's hiding behind those average numbers in Pinba reports?
Well, so have we. I spent some time and came up with this result:
So what do we see here? Even though the average request time is 0.308 sec, the majority of the users actually get served faster than that - in about 0.10-0.25 sec. There's also an interesting peak at 0.45 sec, I'll have to use conditional reports to explain it. And here is the script I used. Monday, May 4. 2009
locating bottlenecks in PHP code ... Posted by Antony Dovgal
in PHP at
17:05
Comments (3) Trackbacks (0) locating bottlenecks in PHP code with Pinba
Good news everyone! ©
I'm proud to announce Pinba - a statistics server for PHP. What is it? It's a daemon gathering information sent by PHP processes by UDP. In the same time Pinba acts as a read-only storage engine for MySQL, so you can use good ol' SQL to access the data. What is it useful for? We at Badoo.com have a lot of web-servers running PHP and want to know where are the most problematic places in our PHP code and which services are loaded the most. There is no need to store that information for further analysis, therefore Pinba doesn't actually store the data - it keeps it only for 15 minutes (you can change that, of course), which is more than enough to update graphs (we use RRDTool for that part) and to check things like "what's the slowest operation in script.php at server #5" or "which memcache server is the slowest" and alike. Complex queries can be also handled using raw data tables, which provide direct access to each request data, but in most cases reports do the job. More details you can find on the website: pinba.org I'd love to get some feedback, so don't hesitate to join Pinba development mailing list. Thursday, March 12. 2009HDDs die when you expect it the least
Sorry for such a long downtime - the hard drive with root partition has crashed and I had to replace it =/
Good thing is that no data seems to be lost, I've managed to save it all from the failing drive. Well, rest in peace, my good ol' Barracuda, you've served me well. Friday, January 23. 2009
locating memory hungry code with ... Posted by Antony Dovgal
in PHP at
17:10
Comments (18) Trackbacks (0) locating memory hungry code with memtrack
We needed to locate where most of the memory is allocated in our scripts (as some of them became too memory hungry), so I've created memtrack extension.
This extension helps us to see unusually big memory allocations in production code. Of course we use error logging, so memtrack just produces warnings like this one: Warning: [memtrack] [pid 26177] user function foo() executed in /tmp/1.php on line 7 allocated 4194304 bytes [memtrack] is a prefix for all warnings produced by the extension, so that one could find them in the logs. [pid 26177] is, well, a PID, so that one could follow a certain process (if needed). user function means it's a user defined function; the ones provided by PHP or one of its extension are reported as internal functions. Memtrack supports the following INI options at the moment:
The extension checks memory usage changes per op_array, which in most cases means a function call or an included file with flat code, so you should not notice any performance loss. memtrack is still BETA, so let me know if you find any problems there, or if you have any suggestions on how to improve it. Pierre is working on Win32 build just as I write this, so Win32 dlls should be available soon, stay tuned. Saturday, January 3. 2009Happy new everything!
Sorry for such a long downtime, folks. I've had problems with my server and had to do clean re-install of the system.
Bringing everything up has taken quite some time, especially because it all has happened in a very unusual moment - I have become a daddy! Little Lisa was born December 25 at 11:45 pm and she's taking most of my time at the moment =) Thursday, July 31. 2008
PECL/sphinx - fast fulltext search ... Posted by Antony Dovgal
in PHP at
16:36
Comments (34) Trackbacks (0) PECL/sphinx - fast fulltext search made easy
As some of you might have noticed, I've been a bit busy lately creating new PECL extension - sphinx.
The extension provides an interface to a feature-rich fulltext search engine Sphinx written by Andrew Aksyonoff. We (Andrew and me) made our best to keep the extension as compatible to the pure-PHP API (shipped with Sphinx) as possible in order to make the transition easier, so if you're already using PHP API, you only need to remove (or comment out) the include "sphinxapi.php"; line and enable the extension in your php.ini. Yes, it's that easy. I also added a documentation for it to the PHP manual - http://php.net/sphinx, it covers all the functions, but lacks code examples at the moment (contact me if you want to contribute some, it's very much appreciated). To install the extension you need libsphinxclient (it's shipped with Sphinx since v0.9.8), here is a short installation guide: # tar -xzvf sphinx-0.9.8.tar.gz # cd sphinx-0.9.8/api/libsphinxclient/ # ./buildconf.sh # ./configure && make installAfter that PECL will do all the work for you: # pecl install sphinx-beta I've got no complaints so far, so I suppose I can call it stable in a month or so. Until then I'll continue to gather feedback (please use PECL bug-tracker if you encounter any problems, thanks!). Wednesday, May 21. 2008PHP test coverage exceeded 55%
According to GCOV reports, PHP test coverage has recently exceeded 55%, which is really good number, but still not enough. It took us about 2 years to get the last 5% and I believe most of the kudos should go to IBM people, who continue to contribute lots of new tests.
I hope that the Testfest will help us to speed up this process. Thursday, February 28. 2008
libHaru.org - the new home of free ... Posted by Antony Dovgal
in OSS, PHP at
12:26
Comments (16) Trackbacks (0) libHaru.org - the new home of free & open source PDF generation lib
It took quite some time for me to think it over and prepare new libHaru site - libHaru.org.
Nevertheless, it's finally online and I'm going to continue maintaining the library, new bugfix release is on its way. Though I don't think I can do all the maintenance job on my own - some help is required with Windows builds and other things like the documentation, which needs some cleanup (even though it's in a good shape at the moment), so volunteers are very welcome. Anyway, if you need to produce PDF files, libHaru is the answer. If it doesn't satisfy your needs or even lacks something crucial - let me know, I'll see what I can do. Wednesday, February 27. 2008Gpasman for Maemo
I've been using Gpasman to store my numerous passwords for about 5 years now, so no wonder my first thought when I bought my Nokia N800 was to port it to Maemo. And that's what I did =)
Gpasman is now available in Maemo Garage and Maemo Downloads. You can see a couple of screenshots here. If you have more than two passwords and are afraid to forget them one day - give it a try, it's really handy. I also have Gpasman RPMs for SuSE. Saturday, February 2. 2008 |
QuicksearchCategoriesSyndicate This Blog |