Performance question – update.

Stephen Hoffman reacted on my post on performance and agreed the site is slow. He included data on what is actually requested (if that tool exists on non-Apple systems, it’s worth a look) and that shows that loading the images  on the main page takes considerable time – especially where data is to be retrieved over the Internet and the contacted site does not respond. So I checked whether the sites are still worth to be presented and if not, I disabled the load of the image.

The main bulk still is PHP code, and it cannot easily be accellarated. I know of software that actually stores compiled code and uses it when accessed, but it isn’t available on OpenVMS – yet. Second, it may need to be incorprated into the PHP engine, making it even harder to use.

Allowing greated working sets for the PHP engine may help. It means the webserver’s quota need to be re-examined.

One other thing – not really performance related but as annoying as a slow-loading site: It may happen you get the message:

ERROR 502 –  External agent did not respond (or not acceptably).

This is a known issue, caused by a bug in the C Runtime library, that I have signalled to HP, and awaits the right solution: PATH cannot be extended beyond the size when initally set by the C ‘getenv’ function.

WASD uses getenv to get the current value of the PATH variable, and sets it to a new value with setenv. But if that new value exceeds the length of PATH, setenv fails because of this bug.

Just reload the page in these cases. This time, PATH is not set on getenv and setenv will succeed with the new value.

I know of a workaround I can build into WASD (Just redo the setenv if it fails), but I still have to make that update….

Performance question

I got a comment from a visitor from the Far East, that the site is very slow, and he wondered if is was on his side, or mine.

There is no indication of “slow”, so I would like ‘slow’ to be quantisized, and in comparison to what?  It could well be a matter of perception and expectation.

No, this site isn’t lightning fast. PHP is memory hungy, being an interpreted language, and creating a process and setting up the environment takes time. And this box holds just 512 Mb ofmemory where I should have 1Gb – at least, as it the recommendation. A linux box with Apache, with this amount of memory and the same load, wouldn’t be either.

Besides that: it’s not the only PHP job that runs. And to prevent starvation (causing the whole system to hang) access is limited to a small number of concurrent accesses from one site, and when many accesses occur, the excess may be slowed down or queued – or, if things get really nasty, it may happen that connections are dropped with a 503 Server Busy error.

I do have to take precautions to prevent the site being overwhenelmed with too many abusive accesses. If you may be slowed down, it might be others causing the delay.

Apart the load of PHP, there’s more that runs on this machine: the spam filter, and, of course, the database. Add the occasional abusive access (FTP, SMTP), it doesn’t help performance either…

So it is not “fast”. And it won’t be either. If you really want to read the content, you’ll have to exercise a little patience. I hope it’s worthwhile.

(If anyone can help me out with 2Gb memory for a DS10 (EV67, 667 Mhz) for a fair price (don’t forget I’m just a hoobyist :)) I would be quite happy)

By the way: There IS a solution bit it will take quite some time to have it installed: Mark Daniel has created a VMS-native CMS program that keeps all in one big file. But I want to store my daat in a database. Less fast, less efficient, but I don’t have to extract all data and store it in  that single textfile…And spare time is rare…

Rest assured: it could be worse. Several months ago I helped Michelle Popejoy on her WordPress site – her hosting provider runs an emulated DS10 with 1 Gb of memory, and has SWS (Apache) installed and the site was slow – even slower than mine. So I installed both SWS and WASD on a spare PWS500 with 256 Mb memory – similar to the one I ran this site on before, but with just one single, internal disk. SWS works – but it took ages for the WordPress homepage to appear, and the system pages massively during the processing

I also installed WASD on that machine and after some problems with configuration (and chnages in the code of the PHP engine and WASD) I could run her site, which reacted much faster (and with far less paging than SWS).

Shameless plug for WASD? Yes – but not without reason 🙂

22-Jul-2010

New target
Checking the WASD log files, I found mainly one attempt do do harm:
"POST /contact.php HTTP/1.1" and paging back, I found the event started about 20-Jun-2010, and seems to be a follow-up of "GET /pingserver.php HTTP/1.1" that has been around now for a while.
Since that day, the number of attempts have increased – and I estimate that last week, there have been over 10.000 such requests. Apart from quite a lot of attempts to abuse phpmyadmin – any version 2.x – and none would succeed since though I have it on the system, it’s not available on port 80 – for obvious reasons (nor is it installed in a directory “phpmyadmin.major.minor.whatever”).
Typical: all requests try to access /scripts/setup.php… Who didn’t remove it from the site deserves to be hacked. It’s in the manual you should REMOVE that script…..
Well, it’s all rejected 🙂
Performance
To be expected – with twice as much memory and a faster processor (though the clock is the same: proof that MHz in itself doesn’t mean anything) you may expect better performance. Where the old hardware (with 256 MB of memory) consumed about 25% of page-file space, the new environment hardly tips 5. PHP seems to run better (and faster) as well, and the same applies to Python – it’s MUCH faster – almost instantaneous.
More good news on performance: we’ll get fiber some time – earliest about November, but some time next year is more feasible. It means that my upload connection – the one you experience accessing the site – will grow 10-fold: 10Mb in stead of 1 (and often less), potentially 50. And, when cost wouldn’t be a problem, it could be extended to 100, or 200 bps – but the price tag is significant.