Skip to content
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

Minimum requirements #108

Open
Lrakotoson opened this issue Aug 10, 2020 · 6 comments
Open

Minimum requirements #108

Lrakotoson opened this issue Aug 10, 2020 · 6 comments

Comments

@Lrakotoson
Copy link

Lrakotoson commented Aug 10, 2020

I would like to know the minimum required to run grobid quantities.
I have seen that it loads a number of models when I run it on my personal machine.
But when I try to run on a virtual machine with 2.75GB of RAM the simple example
curl -X POST -F "text=I've lost two minutes." localhost:8060/service/processQuantityText
it doesn't even finish loading the model and comes across this error (in the command window):

Loading feature templates.
Loading model:
.............................................
Loading feature templates.
Loading model:
WARN [2020-08-10 12:33:48,759] org.eclipse.jetty.server.HttpChannel: /service/processQuantityText
! java.lang.OutOfMemoryError: Java heap space

Until

! at java.lang.Thread.run(Thread.java:748)
127.0.0.1 - - [10/Aug/2020:12:33:48 +0000] "POST /service/processQuantityText HTTP/1.1" 500 271 "-" "curl/7.68.0" 9212

So I would like to know the minimum required grobid-quantities, before testing one by one the memory levels. Thanks a lot!

@lfoppiano
Copy link
Owner

Dear @Lrakotoson thank you for your question, indeed it's not specified anywhere.

In fact, this depends mostly on which entry point you're going to use.
For example, are you going to need only the processQuantityText or you need also PDFs?

@Lrakotoson
Copy link
Author

Hi @lfoppiano
I mainly use processQuantityText in my case, on sentences of about 15 to 20 words on average.

@Lrakotoson
Copy link
Author

Lrakotoson commented Aug 13, 2020

Well,
I looked it up on Windows 10 with 8GB RAM,
I tested processQuantityText and this is what came up

Status     Memory Available  Used  (compressed)  Grobid-quantities   Platform
                                                                             
None            8       4.5   3.5           3.2                0.0      Win10
Load app        8       4.2   3.8           3.6                0.3      Win10
Load model      8       3.0   5.0           4.8                1.5      Win10

During use, i.e. after loading the models, it takes up 1.5GB of RAM.
It remains to be confirmed if it's globally like that for the other operating systems.

@lfoppiano
Copy link
Owner

@Lrakotoson Could you please describe how did you test? How many paragraphs/sentences did you send? Did you run them sequentially? Did you use any performance tool, like jmeter or you performed from the interface?

@lfoppiano
Copy link
Owner

I've made a short test with locust and 12-13 sentences took from the test cases in the interface. It's not an exhaustive test, to be honest, but it's a start. Indeed 1.5 Gb of ram seems reasonable for the text processing.

I've tested on a Linux server with Centos. The server is running other applications, but I didn't see any problem.

You can see the memory consuption is constant:
image

I've ran locust with 10 users using a hatch of 10 seconds to spawn each user.

You can use my script which I've just added with commit d5942d0

@Lrakotoson
Copy link
Author

I recorded the performances on the task manager for each "step" during the initialization of the program (starting server, loading models, running).
I tested on short sentences, one by one, and after loading the models, it still seems to be around 1.5GB, like on your graph.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants