-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kiwix-serve ZIM fd needs to be smarter #142
Comments
@mgautierfr You have work on this - or somthing related - today. Any feedback about this ticket? |
We are hitting the problem of too many fd open:
|
With #353 we are not opening the zim file at startup. We only create the reader when we need it but :
|
@mgautierfr This is a good precision you made here indeed. We try as well to fix the problem at the system level, cf. kiwix/container-images#148. But this is only temporary and for us only. |
@mgautierfr @veloman-yunkan I think it is time here to move on this. Beside what has already been reported as problems, the goal is to limit the overall/optimize the overall memory usage. Somehow the concept of pool and pool size might be needed. Regarding the multizim search, it is quite clear to me that, to keep it usable, we will have to limit this function to a subset of the available zim files. Maybe this maximal subset side should be the same as the pool size (or a derivative of it)? Anyway, we need to clairfy the approach before implementing it. |
@mgautierfr told me there is a possibility that kiwix/libkiwix#620 just solves the problem by introducing a pool of active readers. @veloman-yunkan @maneeshpm @veloman-yunkan Would be great to confirm before starting anything else on this ticket. |
@mgautierfr @veloman-yunkan I wonder if such an improvement would really bring much now that multizim search works fine. What do you think? |
I believe the following discussion in the scope of kiwix/libkiwix#729 is relevant to this ticket: kiwix/libkiwix#729 (review) |
@veloman-yunkan I’m not sure what to think or what to propose. Do you think something should/could be done? If « yes », what and why? |
@kelson42 I stick to my previous comment:
|
After discussion:
So we have to do:
The point 2 seems a bit tricky about the threadsafe lock. Not sure we want to do that now. (Unless you have already a idea of how to fix that) |
@mgautierfr Thank you for the summary and the action plan. This is ready to implement. |
Current, kiwix-serve opens all the ZIM files specified at start and keeps a fd open for each of them (without counting the potential fd for Xapian). By doing this, we can be sure that at any time we can directly read a content of any ZIM file quickly - without initialising the ZIM reader.
The problems are:
That's why I propose to:
This ticket is linked to #143
The text was updated successfully, but these errors were encountered: