Apache OpenOffice (AOO) Bugzilla – Issue 57679
Startup: reduce rdb file iowait time
Last modified: 2010-02-22 14:59:30 UTC
So - since we know services.rdb & types.rdb are bad cold-start seek offendors, I added this patch as a quick fix: It also preloads the *ui* libraries - which, of course may not be used but ... --- desktop/source/pagein/makefile.mk 8 Sep 2005 17:44:11 -0000 1.8 +++ desktop/source/pagein/makefile.mk 10 Nov 2005 12:51:35 -0000 @@ -81,23 +81,27 @@ UPDDLLPOST=$(UPD)$(DLLPOSTFIX)$(DLLPOST) $(MISC)$/$(TARGET)-calc : makefile.mk @+echo Making: $@ - @-+echo $(DLLPRE)sc$(UPDDLLPOST) > $@ - @-+echo $(DLLPRE)svx$(UPDDLLPOST) >> $@ + @-+echo $(DLLPRE)sc$(UPDDLLPOST) > $@ + @-+echo $(DLLPRE)scui$(UPDDLLPOST) >> $@ + @-+echo $(DLLPRE)svx$(UPDDLLPOST) >> $@ $(MISC)$/$(TARGET)-draw : makefile.mk @+echo Making: $@ - @-+echo $(DLLPRE)sd$(UPDDLLPOST) > $@ - @-+echo $(DLLPRE)svx$(UPDDLLPOST) >> $@ + @-+echo $(DLLPRE)sd$(UPDDLLPOST) > $@ + @-+echo $(DLLPRE)sdui$(UPDDLLPOST) >> $@ + @-+echo $(DLLPRE)svx$(UPDDLLPOST) >> $@ $(MISC)$/$(TARGET)-impress : makefile.mk @+echo Making: $@ - @-+echo $(DLLPRE)sd$(UPDDLLPOST) > $@ - @-+echo $(DLLPRE)svx$(UPDDLLPOST) >> $@ + @-+echo $(DLLPRE)sd$(UPDDLLPOST) > $@ + @-+echo $(DLLPRE)sdui$(UPDDLLPOST) >> $@ + @-+echo $(DLLPRE)svx$(UPDDLLPOST) >> $@ $(MISC)$/$(TARGET)-writer : makefile.mk @+echo Making: $@ - @-+echo $(DLLPRE)sw$(UPDDLLPOST) > $@ - @-+echo $(DLLPRE)svx$(UPDDLLPOST) >> $@ + @-+echo $(DLLPRE)sw$(UPDDLLPOST) > $@ + @-+echo $(DLLPRE)swui$(UPDDLLPOST) >> $@ + @-+echo $(DLLPRE)svx$(UPDDLLPOST) >> $@ # sorted in reverse load order (ld.so.1) $(MISC)$/$(TARGET)-common : makefile.mk @@ -139,4 +143,6 @@ $(MISC)$/$(TARGET)-common : makefile.mk @-+echo $(DLLPRE)vcl$(UPDDLLPOST) >> $@ @-+echo $(DLLPRE)tk$(UPDDLLPOST) >> $@ @-+echo $(DLLPRE)svt$(UPDDLLPOST) >> $@ + @-+echo types.rdb >> $@ + @-+echo services.rdb >> $@ @-+echo soffice.bin >> $@
TM->MH: Please have a look.
reassign
Oops, this somehow got lost. Matthias, what do you think about it?
of course, this works best with the 2nd start speedups in i#60696# ;-)
Matthias, are you going to comment on the PATCH?
mhu->mmeeks: IIRC, we talked about this privately already, but leaving this officially uncommented is bad, of course. First of all, you're right in that the 2 rdb files take a considerable amount of (iowait) time during cold startup. Also, the only cure that I know of, is to get them sequentially "paged in". But, as we discussed, we can do better than this patch. In an upcoming revision of the "store" code, this sequential page-in will be a built-in feature of the store code (this is still work in progress, though, and not yet scheduled for a particular release). The rest of your patch, i.e. page-in of the UI libraries conflicts with the work that has been done (for 2.0.0) to factor them out of their respective application libraries. Moreover, they are simply not needed during startup, and thus should not be page'd-in. I'm keeping this issue to justify the "store" changes mentioned above.
un-marking patch then to save you getting grief :-) Interesting - I thought the UI libraries were in fact in use on startup, but now I see they're not, of course that makes perfect sense. FWIW - recent studies show that using 'madvise' is almost pointless on Linux, but 'fadvise' works rather well [ just for when you get to chose a system call in that code ;-], certainly a kernel bug to workaround there. Thanks.
Adapting issue summary ("pagein hack..." => "Startup: reduce rdb file iowait time") and issue type ("PATCH" => Performance "DEFECT") to better reflect what problem this issue really addresses.
mhu->mmeeks: So, our updates to this issue just had a "mid-air collision" :-) Of course you're right in marking it as ENHANCEMENT, but I'm willing to accept it as a Performance defect (like all those other startup improvements). Anyway, thanks for always providing a patch for the issues that you raise, Matthias
Created attachment 51294 [details] pagein-common improvements
The attached patch fixes a few sillies that have crept into pagein-common over the years eg. we upgraded ICU: +.INCLUDE .IGNORE : icuversion.mk -ICUDLLPOST=$(DLLPOST).26 +ICUDLLPOST=$(DLLPOST).$(ICU_MAJOR)$(ICU_MINOR) etc. I also substantially expand the scope of things we pagein on startup - this according to iogrind has a pleasant effect on cold start time. I attach a couple of photographs of the iogrind output before/after - the timings are in my blog; it's interesting that the configmgr doesn't show up nearly as heavily as I would have expected - on the other hand, it's quite possible that this is some failure of simulation etc. :-)
Created attachment 51295 [details] before changes
Created attachment 51296 [details] after changes
many people complains about OOo which is Slow. This patch can reduce the complains. I hope we can integrate it soon. as this patch already exist. Thanks
Caolan - you might want this ? :-)
set target 3.0
is this issue still valid, who's responsible for making any progress ?
mhu->mh: Well, this is mine, and it's going to be added to cws mhu17 sometime soon. Changing an issue's type back to PATCH (with new attachements) after agreeing on another fix does really help, but I will factor out the proposed pagein-common changes to another issue, as soon as I get to it. And, yes, 3.x is the better target.
Both, the 'store' changes, as well as the 'pagein' changes are now implemented in cws_src680_mhu17... Changed target milestone to 3.1 (estimated).
cd: Made a code review with MHU. Verified.
This issue is closed automatically. It should be fixed in a version with is available for longer than half a year (OOo 3.1). If you think this issue isn't fixed in the current version (OOo 3.2) please reopen it. But then please pay attention about the field 'target milestone'. The closure was approved by the Release Status Meeting at 22nd of February 2010 and it is based on the issue handling guideline for fixed/verified issues : http://wiki.services.openoffice.org/wiki/Handle_fixed_verified_issues