Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP Application stress test

Featured Replies

Ive never done one of these but recently on a project im working on ive built a simple one that looks somewhat like this

 

<?php
while(true){
//Code to insert into mysql
//code to echo out last insert id
}
?>

which basically creates a loop that never stops and inserts 1,000s of status post into my post table within secs so anyways what i was wondering is this a good way to test how much a php application can handle say once u have a ton of members? the site currently has 828,808 post made using my stress test and the site itself is responding with a page load time of 0.308885 Secs is this a fairly good load time for the amount of post that ajax etc... is having to pull in? obviously i limit the query to show 50 post at a time. Anyways just would like ur thoughts on it :) since the project is not finished i cant give u the url so plz don't ask

I think Rallport has made some good points with, caching, unit testing and being responsible with quires and just general good practices as these are always a good start, though running a looped insert script is somewhat self-fulfilling as it unfortunately proves very little.


The insert itself performed by a single client repetitively is quite unlikely to cause any damage, it is concurrency in terms of the multiples of TCP/IP, MySQL, PHP and IO requests that can take their toll on performance and stability but this very much depends on the scale you are considering.


The easiest of test is perhaps the unobvious, which is a DDOS attack against your own service which essentially mimicks a very specific user request concurrently and repeatedly. If I were to quantify that just a tad, consider a recent attack peaking at 300gb/s being recorded and sustained by a company.. (http://www.bbc.co.uk/news/technology-21954636) that is certainly impressive. - Though please talk to your provider or preferably test on equivalent hardware on a local network.


There are numerous strategies but it really is project specific, the general rule however is to provide and cache client side as larger a chunk of data (necessary) as possible (where appropriate) to avoid repetitive calls (costly both in time and resource) and choose the appropriate saleable service provider.


A lot of this centres around Service Oriented Architecture (SOA) and particularly Web Orientated Architecture (WOA) and depending on the application and or data even ultra-large-scale systems, all of which are worth looking into and a read if you intend to work on larger scale projects.


There are some very interesting projects however going on in and around this area as the problem of scale and distribution on the web is still very much cutting edge considering research by Blair and Grace (2012) proposing that we are now "facing a second software crisis, brought about by increasing complexity in distributed systems”.


Things that are worth looking into though are Google’s App Engine and BigQuery (https://developers.google.com/cloud/)… and perhaps read about their caching … I was fortunate to take part of a talk recently regarding it, really quite impressive.


Even Hiphop by Facebook and some of their open source tools are extremely powerful at providing optimisation and scalability. http://developers.facebook.com/opensource/


Hopefully useful + some background info :)

Edited by CSN-UK

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.