Closed Bug 1470918 Opened Last year Closed Last year
Storage threads in the parent process
I am looking at my processes in htop, and I can see multiple DataStorage threads in the parent process. AFAICT, all of them must have come from: https://searchfox.org/mozilla-central/source/security/manager/ssl/DataStorage.cpp#268-279 but this method can only be called once. So we're creating a DataStorage thread for each DataStorage object that can be created? That seems not good, even if we're only creating a limited number of DataStorage objects. Could we have them all use the same SharedThreadPool or something?
Assignee: nobody → dkeeler
Priority: -- → P1
Whiteboard: [MemShrink:P2] → [MemShrink:P2][psm-assigned]
This introduces a helper class that provides one thread all DataStorage instances can use to do background work. This thread should have a light workload which mainly consists of reading some files at startup, periodically writing to these files, and writing them again at shutdown. One thread should be able to handle this and in any case having multiple threads trying to perform i/o at the same time would probably be less efficient than merely performing the work sequentially.
Comment on attachment 8988865 [details] bug 1470918 - use only one thread for all DataStorage instances r?franziskus,froydnj Nathan Froyd [:froydnj] has approved the revision. https://phabricator.services.mozilla.com/D1890
Comment on attachment 8988865 [details] bug 1470918 - use only one thread for all DataStorage instances r?franziskus,froydnj Franziskus Kiefer [:fkiefer or :franziskus] has approved the revision. https://phabricator.services.mozilla.com/D1890
Ok, this took a while to (hopefully) get right, but here's try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=110c60eef4665101fcac85b0ba673d6ac7eed1a3
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/7afeaceba53d use only one thread for all DataStorage instances r=franziskus,froydnj
You need to log in before you can comment on or make changes to this bug.