15 ways to point out TYPO3 is your drug

  1. You mostly guess whether a page you surf on was made using TYPO3, and you always check, what year is stated in the header comment
  2. You leave the “admin” account active on your systems, but remove all privileges and set the password to something like “hackme&bugoff!”
  3. You have at least one system on which the sys_template´s uid went over 250
  4. You have subscribed to more than 50% of the newsgroups on lists.typo3.org
  5. Your conditional sentences have virtual squared brackets around it
  6. You try to convince your customer to make use of even the table content element
  7. You usually sleep tight on your TYPO3 pillow
  8. Your vision is #69A550 and #FF8700
  9. You categorically do not apply with a company that misspells TYPO3
  10. You try to solve real world problems with TypoScript
  11. You have or at least have had once an account password set to “joh316″
  12. You wave aside the giggly idea of writing an own TYPO3-like cms from scratch
  13. You clear all the cache, if you come to the conclusion your servers idle too much (not at peak times, of course)
  14. You smile when it comes to stdWrap
  15. You always have the extension kickstarter installed, just for the case

i´d like to you read your drug test cases – no blood, no hair, no police :-)

new database with user in mysql console

this will create a new database on the server with the new user having all rights granted on that db.


CREATE USER 'uname'@'localhost' IDENTIFIED  BY 'pass';

GRANT  USAGE ON *.* TO 'uname'@'localhost' IDENTIFIED  BY 'pass' WITH  MAX_QUERIES_PER_HOUR 0  MAX_CONNECTIONS_PER_HOUR  0  MAX_UPDATES_PER_HOUR  0  MAX_USER_CONNECTIONS  0 ;

CREATE  DATABASE  IF  NOT  EXISTS 'uname' ;

GRANT  ALL  PRIVILEGES  ON 'uname'.*  TO 'uname'@'localhost';

if there´s a problem when creating the database,  do not use the ‘ ‘ signs around the db name.

just to avoid phpmyadmin for this little task ;) i didn´t like to look that up everytime.

t-shirts do matter

for long i wanted to scribble down some sentences to show my support to the cool crew of 3dsupply but i didn´t find the mood or the time. sounds lame, yeah. but those guys know guys like me and have developed an evil masterplan to gain more links to their page than adobe´s got to the download page of their pdf viewer.

i ordered at 3dsupply´s twice and always received the goods fast and got a colored bunch of flyers packed with it, quite interesting stuff. and the current link4shirt campaign is even cooler.

so if you read this and fortuna is online, i might be wearing this cool new shirt to the streets. or maybe i´m just hanging on the couch, whatever fits first.

size does matternow, why this shirt? simple: i got the star and the flower already, and i think that shows what sprites i am made of since the game boy era. and i totally say nintendo is the real console designer! if the shirt would make those 8bit growing sounds everytime one pushes the shroom it would be even cooler!

after i get that shirt, next to be ordered will be the mega shroom shirt. so long.

how got my ethernet disk interface access back

fancy stuff to do with an lacie ethernet neil poulton disk 500gb item

network space

And i just wanted to reset the admin password of the lacie web interface due to froob-style loss. for those seeking a quick answer for that:

  • turn OFF your ethernet disk (if it’s running now). after the light stopped flashing…
  • turn it ON again for around 2-3 secs and…
  • turn if OFF again and prepare to…
  • turn it ON immediately. Now the blue light is flashing frenzy and you’re about to be able to log into the interface with admin/admin

You see, no need to be a geek to gain access to an ethernet disk standing around ^^

successful arrival in 2010

happy new year to everyone!

i’m wondering what kind of evil spirits we try to excorcize with the thousands of bangs but they sum up to the unique sound of the new year. and that’s okay, even i do not take part in skyrocketing my money. hopefully you all had a nice midnight experience and were sound and sane.

the numeric visible style of 2010 is just nice, don’t you think? i liked 2001, too and… who knows… 2100 as well.

web server stress testing

a nice tool to go frenzy on a webserver is siege. it simulates an editable amount of concurrent users that pick on the web server for a variable time. having found this tool, stress testing some TYPO3 instances on apache(s) i rule was the inevidable next step.

now first of all this is not my daily business, but it’s tending to become to, so if you have corrections, suggestions and comments, your lines are appreciated below. the post you read is more like a small tutorial for those who want to know how performant the own webserver (i.e. apache) does. i like siege because of the easy settings, but i also run the better known apache benchmark when it comes down to a single page.

preparing the battle

get all urls from the system, it’s willing to accept and put them in a text file line by line. my TYPO3 (4.3.0a3) runs realurl, so the trick is easy.

  • make sure, all the pages have been visited (# wget -r does the job)
  • ask mysql or phpmyadmin to provide following data
    SELECT spurl FROM `tx_realurl_urldecodecache` WHERE 1=1 LIMIT 0 , 4500

    sure, one could narrow the links down by using WHERE rootpage_id = [domain1_id] but as the whole server is to be tested, give me what i can get.

  • grab the result into a file and prefix every line with the base url defined in config.baseUrl.
    the lines should like like clickable http requests. exactly that is siege going to do.
    “http://baseurl.com/spurls/from/decodecache/” <- the way i did it
  • if you’re into MySQL profiling, a tool like jet profiler can make your day. innoDB ftw! ;)
  • clear all caches in TYPO3 (and read stuff written in nc_staticfile manual:)

Clear cache for all domains in tree

Here you can decide what to do when clearing the frontend cache. By default all static html files will be deleted. Usually this is fine. Most installations of TYPO3 serve a single domain. If multiple domains are served from the same TYPO3 tree you might want to leave the cache for the other domains intact. If you uncheck the ‘clearCacheForAllDomains’ checkbox, only the html files are removed that are in the same domain as which you are logged into the backend.

  • after the siege battle you will start thinking about using a static file cache… if you haven’t already
  • machine A is going to battle machine B, so B would serve http://baseurl.com/ and A has siege installed and a file with the lines built above, named realurls.txt.
  • now you run a command like
    me@machine1 [/home/me] siege -c 60 -t 5M -i -b -f realurls.txt > /dev/null

    -c 60 # makes siege simulate 60 concurrent web users, i think that’s a number
    -t 5M # the battle will last around 600 seconds
    -b # benchmarking mode, leave no delay between requests -> make the box steam!
    -i -f realurls.txt # internet activity mode, the links in realurls.txt are randomly clicked, rather than sequentially
    > /dev/null # the output is going to the built-in black hole, better than flaming my console. you may prefer logging to a file.csv which contains info on the single requests (useful for finding the slow pages)

  • hit and see
    ** SIEGE 2.69
    ** Preparing 60 concurrent users for battle.
    The server is now under siege…

i was prepared for stuff but that hit me down (hopefully your first values are better)… after a while results are shown.

benchmark results

Response time: 4.15 secs
Transaction rate: 12.06 trans/sec
Throughput: 0.28 MB/sec

wtf! the machine got spikes in the load like 25! this is not what i expected. i was aiming for about a mean response time of shorter than a second and, #whatdoiknow, about a hundred successfull transactions per second?

now it’s definitely time to optimize some settings. right now (two days later), the same box drives like

Response time: 0.13 secs
Transaction rate: 507.40 trans/sec
Throughput: 2.78 MB/sec

load below 4. not bad, hu? most tweaks (apache, mysql, TYPO3)  i did to achieve this will be written in one of the next posts, as i’m not finished yet ^ #botmustwork

(you see result of iteration 1 and i think 8. the siege settings haven’t changed, of course cache revalidation was disabled)

conclusion

if you’ve got a web site up and running, you’d better be looking on performance in the real world. is the page digg-proof and does it stand a large amount of requests over time, even when cache was cleared? siege can help in doing a forecast.

after the site gone public, you will try to avoid becoming host of dead ends.

0.27 MB/sec