Thread:Project:Support desk/Media wiki slow when saving pages/reply (2)

Below, the result of profiling the slow action of submit pages:

Start request POST /index.php?title=Foobar&action=submit HTTP HEADERS: HOST: wiki.nhs.local USER-AGENT: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0 ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 ACCEPT-LANGUAGE: en-US,en;q=0.5 ACCEPT-ENCODING: gzip, deflate REFERER: http://wiki.nhs.local/index.php?title=Foobar&action=edit COOKIE: nhswiki_nw__session=; nhswiki_nw_UserName=; nhswiki_nw_UserID=1 CONNECTION: keep-alive CONTENT-TYPE: multipart/form-data; boundary=---11114012719236614911958152357 CONTENT-LENGTH: 1921 [caches] main: EmptyBagOStuff, message: SqlBagOStuff, parser: SqlBagOStuff [caches] LocalisationCache: using store LCStoreDB Connected to database 0 at 127.0.0.1:3306 Fully initialised [ContentHandler] Created handler for wikitext: WikitextContentHandler User: cache miss for user 1 Connected to database 0 at 127.0.0.1:3306 MessageCache::load: Loading pt-br... got from global cache User: loading options for user 1 from database. User: logged in from session EditPage::edit: enter EditPage::importFormData: Passed token check. User: loading options for user 1 from override cache. User::getBlockedStatus: checking... [SpamBlacklist] Spam blacklist validator: Foobar not a local blacklist IP: 10.0.17.100 ConfirmEdit: user group allows skipping captcha ConfirmEdit: no need to show captcha. Unstubbing $wgParser on call of $wgParser::parse from WikitextContent::fillParserOutput Parser: using preprocessor: Preprocessor_DOM Unstubbing $wgLang on call of $wgLang::getCode from Message::inLanguage [SpamBlacklist] Loading spam regex... [SpamBlacklist] Constructing spam blacklist [SpamBlacklist] got from file https://meta.wikimedia.org/w/index.php?title=Spam_blacklist&action=raw&sb_ver=1 MessageCache::load: Loading pt... got from global cache MessageCache::load: Loading en... got from global cache DatabaseBase::query: Writes done: INSERT IGNORE INTO `nw_page` (page_id,page_namespace,page_title,page_counter,page_restrictions,page_is_redirect,page_is_new,page_random,page_touched,page_latest,page_len) VALUES (NULL,'X') DatabaseBase::query: Writes done: INSERT INTO `nw_text` (old_id,old_text,old_flags) VALUES (NULL,'X') DatabaseBase::query: Writes done: INSERT INTO `nw_revision` (rev_id,rev_page,rev_text_id,rev_comment,rev_minor_edit,rev_user,rev_user_text,rev_timestamp,rev_deleted,rev_len,rev_parent_id,rev_sha1,rev_content_model,rev_content_format) VALUES (NULL,'X',NULL,NULL) DatabaseBase::query: Writes done: UPDATE `nw_page` SET page_latest = 'X' DatabaseBase::query: Writes done: DELETE FROM `nw_redirect` WHERE rd_from = 'X' Title::getRestrictionTypes: applicable restrictions to Foobar are {edit,move} DatabaseBase::query: Writes done: INSERT INTO `nw_recentchanges` (rc_timestamp,rc_namespace,rc_title,rc_type,rc_source,rc_minor,rc_cur_id,rc_user,rc_user_text,rc_comment,rc_this_oldid,rc_last_oldid,rc_bot,rc_ip,rc_patrolled,rc_new,rc_old_len,rc_new_len,rc_deleted,rc_logid,rc_log_type,rc_log_action,rc_params,rc_id) VALUES ('X',NULL) DatabaseBase::query: Writes done: INSERT INTO `nw_logging` (log_id,log_type,log_action,log_timestamp,log_user,log_user_text,log_namespace,log_title,log_page,log_comment,log_params) VALUES (NULL,'X') No bloom filter store 'main'; using EmptyBloomCache.DatabaseBase::query: Writes done: UPDATE `nw_user` SET user_editcount=user_editcount+N WHERE user_id = 'X' DatabaseBase::query: Writes done: UPDATE `nw_user` SET user_touched = 'X') WikiPage::doEditUpdates: No vary-revision, using prepared edit... Saved in parser cache with key nhswiki-nw_:pcache:idhash:35-0!*!*!*!*!*!* and timestamp 20150220103545 and revision id 109 DatabaseBase::query: Writes done: REPLACE INTO `nw_objectcache` (keyname,value,exptime) VALUES ('X') DatabaseBase::query: Writes done: REPLACE INTO `nw_objectcache` (keyname,value,exptime) VALUES ('X') DatabaseBase::query: Writes done: UPDATE `nw_page` SET page_links_updated = 'X' BacklinkCache::queryLinks: got results from DB BacklinkCache::queryLinks: got results from DB DatabaseBase::query: Writes done: DELETE FROM `nw_protected_titles` WHERE pt_namespace = 'X' [cookie] setcookie: "nhswiki_nw_PostEditRevision109", "created", "1424429745", "/", "", "", "" DatabaseBase::query: Writes done: UPDATE `nw_page` SET page_touched = 'X' BacklinkCache::partition: got from full result cache DatabaseBase::query: Writes done: INSERT IGNORE INTO `nw_watchlist` (wl_user,wl_namespace,wl_title,wl_notificationtimestamp) VALUES ('X',NULL) OutputPage::sendCacheControl: private caching; ** DatabaseBase::query: Writes done: UPDATE `nw_site_stats` SET ss_total_edits=ss_total_edits+N,ss_total_pages=ss_total_pages+N Title::getRestrictionTypes: applicable restrictions to Foobar are {edit,move} DatabaseBase::query: Writes done: REPLACE INTO `nw_searchindex` (si_page,si_title,si_text) VALUES ('X') Request ended normally