# Geoip cache\_size # relates to + flush frequency?

**URL:** <https://discuss.elastic.co/t/geoip-cache-size-relates-to-flush-frequency/269007>\
**Category:** Logstash\
**Created:** [April 1, 2021, 9:27am UTC](https://discuss.elastic.co/t/geoip-cache-size-relates-to-flush-frequency/269007 "2021-04-01T09:27:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![probson](https://avatars.discourse-cdn.com/v4/letter/p/e47c2d/32.png) [@probson](https://discuss.elastic.co/u/probson)\
**Post date:** [April 1, 2021, 9:27am UTC](https://discuss.elastic.co/t/geoip-cache-size-relates-to-flush-frequency/269007/1 "2021-04-01T09:27:51Z")

</div>

Hi,

The default is cache\_size for geoip is documented at 1000. Is that 1000 IPs, bytes/kb?

Also with pereodic\_flush:false (default), when does this flush?

Tracing down a mismatch IP where going back a month up until this morning it states the IP is Ukraine, other databases state its the UK, i signed upto geolite2 and downloaded the country CSV, that stated updated 30 March and the IP is linked to the UK.

Might just be that i need to set periodic\_flush:true

Thanks

---

<div class="post-metadata">

**Author:** ![probson](https://avatars.discourse-cdn.com/v4/letter/p/e47c2d/32.png) [@probson](https://discuss.elastic.co/u/probson)\
**Post date:** [April 1, 2021, 2:04pm UTC](https://discuss.elastic.co/t/geoip-cache-size-relates-to-flush-frequency/269007/2 "2021-04-01T14:04:15Z")

</div>

I have found this logstash update in github for a geoip download manager, updated 7 days ago, cannot find those files in 7.12.0 - [logstash/x-pack/lib/filters/geoip at ca76c0c484ff6a2c73ae173eb05c28b8e7e7cdcb · elastic/logstash · GitHub](https://github.com/elastic/logstash/tree/ca76c0c484ff6a2c73ae173eb05c28b8e7e7cdcb/x-pack/lib/filters/geoip)

linked to 7.13.0 [Geoip database service by kaisecheng · Pull Request #12675 · elastic/logstash · GitHub](https://github.com/elastic/logstash/pull/12675)

Hopefully waiting for 7.13.0 will resolve my issue

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [April 1, 2021, 2:52pm UTC](https://discuss.elastic.co/t/geoip-cache-size-relates-to-flush-frequency/269007/3 "2021-04-01T14:52:05Z")

</div>

> [@probson](#):
>
> Is that 1000 IPs, bytes/kb?

IPs. The code [creates](https://github.com/logstash-plugins/logstash-filter-geoip/blob/f9de15ba07602b5f92775f35ec3e39a3c649ecfb/src/main/java/org/logstash/filters/geoip/GeoIPFilter.java#L87) a com.maxmind.db.CHMCache, which is just a wrapper for a ConcurrentHashMap. The size parameter of that is the number of entries.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 29, 2021, 2:52pm UTC](https://discuss.elastic.co/t/geoip-cache-size-relates-to-flush-frequency/269007/4 "2021-04-29T14:52:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
