[development] Re: InnoDB and accesslog/ watchdog

Gerhard Killesreiter gerhard at killesreiter.de
Wed Aug 16 06:34:21 UTC 2006

Dries Buytaert wrote:
> On 15 Aug 2006, at 15:00, Gerhard Killesreiter wrote:
>> I can only guess why these tables were chosen: they have a lot of 
>> writes. Locking would only be an issue for the cache table.
> And the variables table.
> Modules that frequently use variable_get()/variable_set() to store 
> temporary results can bring your site to halt.  variable_set() requires 
> 4 SQL queries, and does a table lock that is likely to stall other 
> Apache clients.  :-)

Who writes such modules? The only place that variable_set should be used 
is on admin pages.

>> For the latter I advocate my merge table patch at 
>> http://drupal.org/node/78503
> Did you actually benchmark that patch?

My results were inconclusive. The only server where I could do a test 
with a large table is currently in need of a new setup.

My main reason for writing this patch was the annoying behaviour of the 
statistics.module to switch off logging when the site is throttled. That 
totally invalidates the use of the module as a logging tool. IIRC the 
reason to throttle it was that we were afraid that the inserts on the 
(rather big) accesslog table would bring too much stress on the server 
if there are a lot of visitors. I think that if you want the logging to 
stop you should throttle the whole module.

With my patch there won't be a reason to not change the throttling 

>> It would also be helpful if anybody could compare the use of InnoDB vs 
>> my patch.
> I compared a InnoDB with a MyISAM cache table and noticed little or no 
> performance gain.

I think that to notice any real difference (also wrt to my patch) you 
would need to set up a different test. The usual ab approach won't work 

In my opinion you should use siege or a similar tool to simulate a 
largish number of users traversing the site and set fire on the server.

Under these circumstances any differences will be more apparent.

The same is also true for my cache table split patch: Without running it 
on drupal.org I would never have been sure it is an improvement.


More information about the development mailing list