php-postal icon indicating copy to clipboard operation
php-postal copied to clipboard

Reducing Memory Usage

Open kiler129 opened this issue 5 years ago • 2 comments

This is more a question than an issue. We are running some workloads requiring bath processing of records. To speed up the process multiple workers are used.

The problem is each new worker requires 2GB of memory to load libpostal data. This seems wasteful, since the data AFAIK doesn't change. Effectively this cause memory to have multiple copies of libpostal model, while also significantly delaying startup of each of the workers.

Is there any way to share the memory containing data model between workers, or is making a simple REST api our only option?

kiler129 avatar Oct 17 '18 15:10 kiler129

same here!

vlasvlasvlas avatar Jul 19 '19 01:07 vlasvlasvlas

We finally went with https://github.com/johnlonganecker/libpostal-rest-docker and after seeeeveral millions of records it proven solid and fast :)

kiler129 avatar Jul 19 '19 01:07 kiler129