This message was deleted.
# general
s
This message was deleted.
s
Not sure why the historicals are failing. Looking at their logs should shed some light. The speed with which historicals will load segments depends on a few factors. Here's a recent thread on this. Also, it makes sense to use a stateful set for the historicals such that their local storage of cached segments files is persistent across restarts.
r
Hello Sergio, Thanks for the reply. But I am unable to open the link you shared.
d
Do the logs indicate the historicals are loading from s3 on each start?
I ask that because 6 hours for that much data with even just one historical seems like a long time if the data already exists in a k8s volume on disk after a prior restart.
g
6 hours does seem like a super-excessive amount of time to load data from an already-existing PV
I wonder what it's logging during this time? You probably see a bunch of lines like
Loading segment cache file [%d/%d]
Normally a historical would have up to tens of thousands of those (possibly low-hundreds-of-thousands for very dense historicals; rarely more)
and typically they go by pretty quickly
while this is happening do you see I/O maxing out on your PVs?
r
Hello @Gian Merlino, As you mentioned above we can see the Loading segment cache file [%d/%d] and Loading segment for data source in the historical logs during this time. At some point historical pods restart and it will start loading the segment cache files from the beginning. This cycle will repeat and will never ends. Finally we ended up in clearing all data sources and started loading them from Kafka again.
Hello @David Smith, We are using the Azure storage account as the deep storage. We didn't get anything from the logs to confirm it is loading the segments from the deep storage on each start. But we can see two series of logs in the historical pods. The first is 'Loading segment Cache file' and the second is loading segment
d
Ignore literally everything I just said. It just looks like you have a ton of segments, so it takes a long time.
s
A few of thoughts: • it would be good to understand why the historicals are failing. Is this kubernetes? Is kubernetes killing the pods because they are using too many resources? If so changing the resources available to each historical pod should help, or changing their config to use less resources. • Perhaps you've already done this, but if not segment size optimization is always good to pay attention to. • Historicals should not need to reload all of their segments after a quick restart. If you are using kubernetes, deploy them as a stateful set. Relevant info toward the last paragraph in this section of the docs. Essentially the historical pod that restarts looks at its local segment cache to announce the segments it already has. If you use statefulset for historicals, their local storage should still have the segments they need after the restart.
d
I don't think it is loading from s3, based on the screenshot. But it is loading about five segments per second. That is 4.5 hours to pull its segments from its cache. My best guess is whatever volumes you have mounted are very, very slow.
Or the segments are very, very large.