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

Pastash running only on one CPU and it's not enough #223

Closed
yaniv999 opened this issue Jul 23, 2024 · 1 comment
Closed

Pastash running only on one CPU and it's not enough #223

yaniv999 opened this issue Jul 23, 2024 · 1 comment

Comments

@yaniv999
Copy link

we are using Pastash with sqlite filter
we are running a quarry :

filter {
sqlite {
db => '/home/usersip.db'
query => 'SELECT CustomerName FROM UserData WHERE IP=(?) LIMIT 1;'
source_field => 'ipv4_src_addr'
target_field => 'CustomerNane'
}
}

The problem is that the UserData table is quite big and the CPU doesn't manage to handle it
ElasticSearch is getting 1% of the data

and the CPU is on 100%
image

Is it possible for Pastash to use more than one CPU?

@lmangani
Copy link
Member

lmangani commented Jul 23, 2024

NodeJS is single threaded. You can use pm2 with cluster mode to distribute load between multiple pastash instances.

On the other end, this shows the current sqlite approach is probably not the ideal without a good caching mechanism.

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

No branches or pull requests

2 participants