Description

The edit-log file is opened many times when accessing pages.

Steps to reproduce

  1. Have a single thread, single process wiki running.
  2. Trace the activity of the process and filter for open calls.

The edit-log can be completely empty for this.

Example

Component selection

Details

Output of truss -t open,close -p #pid when accessing a missing page:

/4:     open64("/dev/urandom", O_RDONLY)                = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/cache/test/surgeprotect/surge-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/cache/test/surgeprotect/surge-logy4pQ_l.tmp", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/event-log", O_WRONLY|O_APPEND|O_CREAT, 0666) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/pages/MeineStartSeite/revisions/99999999", O_RDONLY) Err#2 ENOENT
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/pages/MeineStartSeite/revisions/99999999", O_RDONLY) Err#2 ENOENT
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/pages/MissingPage/cache/text_htmlNwPA6B.tmp", O_RDWR|O_CREAT|O_EXCL|O_NOFOLLOW, 0600) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     open64("/srv/www/test/data/edit-log", O_RDONLY) = 11
/4:     close(11)                                       = 0
/4:     close(10)                                       = 0
/4:     close(9)                                        = 0

MoinMoin Version

1.9.1

OS and Version

SunOS sun 5.10 Generic_142901-03 i86pc i386 i86pc

Python Version

2.6.1

Server Setup

Apache 2.2.11

Server Details

mod_wsgi 3.1, mpm_prefork

Language you are using the wiki in (set in the browser/UserPreferences)

de

Workaround

Discussion

Is this a real problem (describe why) or is it just something you noticed?

Well, all the accesses you see to edit-log are likely the "uptodate" checks from moin's page caching system. It uses the global edit-log to see if someone edited something in moin. I guess usually that should be covered quite good by the operating system filesystem cache. -- ThomasWaldmann 2010-02-01 16:41:24


Just a note; in some "shared" hosting environment you're also limited for e.g. 4096 simultaneous open files. I do not think that this can lead to a problem, 'coz if every connection needs 100 open files, you'll still would need more then 40 page requests every second... (and then definitely you would need first a own server, I guess). Btw. I clean up big edit log files automatically with lograte... not nice but it helps a bit to keep up with performance. Not related to saving, but if you create a new page I found that 2 impacts can delay it:

  1. If you have a lot (hundred) of simliary pages (like MoinMoinBugs/....), the underlay "MissingPage" with the macro  <<LikePages((none))>>  will display all those hundres "like pages"

  2. If you open the editor and have hundred of category pages, then it needs also some time to load them into the select field

-- MarcelHäfner 2011-10-18 14:38:00


Plan


CategoryMoinMoinNoBug CategoryBounty

MoinMoin: MoinMoinBugs/191EditLogPerformance (last edited 2011-10-20 10:19:11 by gw1)