Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
0.8.1
-
None
-
None
Description
This is somewhat related to KAFKA-1403.
One way to hack KAFKA-1403 is to roll a new file in a short period of time. However, this will result in many file descriptors open. Take our application for example, each server hosts about 5k topic-partition, if we roll a new file per hour, we will add ~100k file descriptors per day (I checked only .log is open but not .index which might be pinned in memory). We will run out of 1M file descriptor in about a week. However our disk can host much longer.
In reality very few of these file descriptors will be used. The most recent fd will be used to append data and the old file descriptor will be used for query. We should provide a parameter like max.num.fds and do LRU to decide which fds should be open.
Attachments
Issue Links
- duplicates
-
KAFKA-2580 Kafka Broker keeps file handles open for all log files (even if its not written to/read from)
- Open