Comments (4)
This would be nice and cool to have, but I doubt it'll give you much more speed when you have multiple workers.
In my personal tests, the limiting factor with 8 workers was the mutex and not the disk IO.
But this might have improved with #40
Looking at the preload:
if options[:preload] || !IO.respond_to?(:pread)
@mutex = Mutex.new
end
and on read of the database:
def atomic_read(length, pos)
if @mutex
@mutex.synchronize { atomic_read_unguarded(length, pos) }
else
atomic_read_unguarded(length, pos)
end
end
def atomic_read_unguarded(length, pos)
if @use_pread
IO.pread(@file.fileno, length, pos)
else
io = @contents || @file
io.seek(pos)
io.read(length)
end
end
(preload is pumped into @contents as StringIO).
So preloading isn't going to help much if you want to counter the mutex.
Secondly, I dont think that the database will be re-readed into memory every now end then, so if you preload, you'll need to restart logstash if the geo database is updated.
from logstash-filter-geoip.
I have to test a bit more on this, but first runs with preloading didn't show any major improvements.
That I didnt see any major improvement might be explainable by the fact that GeoIP databases are rather small and fit into OS cache easily, so most of the time they will be cached by the OS anyway.
from logstash-filter-geoip.
I wouldn't expect preloading to really improve much since the file generally lives happily within filesystem cache.
from logstash-filter-geoip.
We've added a LRU cache for recent lookups, so closing this.
from logstash-filter-geoip.
Related Issues (20)
- tag_unsuccessful_lookup called when source field does not exist
- Implement ECS-Compatibility Mode HOT 3
- Support locale language ?
- [bug] replace mmdb database sometimes results in crash HOT 2
- Change require line to fix plugin load error
- Add Support for additional GeoIP Databases HOT 1
- Support for GeoIP2-Connection-Type.mmdb
- GeoIP stopped working as before :confused: HOT 17
- Add `interval` option to config auto-update schedule HOT 2
- Clarify the doc about database auto-update HOT 4
- config database update scheduler job time
- missing ECS fields HOT 4
- [Doc] support http proxy for database download
- Enable the use of MaxMind GeoIP2-Anonymous-IP database in the plugin HOT 1
- Is project version in gradle outdated?
- Where is the GeoLite2-ASN.mmdb file and vendor.json file in the project?
- GeoLite database auto update error
- Use Ruby parent environment bundle instead of system's one
- Failure in testing config without database path in LS >= 7.14 HOT 1
- Cannot start clean install with geoip DB download disabled
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logstash-filter-geoip.