Catherine wrote:Hi,
I'm thinking about implementing that "PersistentFeeders" functionnality in a 9.5.2 application.
Before beginning more tests, I just would like to clarify two points:
-When an instance is started, if you load some data via TI, are the .feeders files automatically/instantaneously updated?
-I've read in that post that it doesn't work if there are some conditional feeders. Do you confirm that point?
Thanks in advance
Catherine
From what I have seen, .Feeder files are only generated when you do a SaveData, or when you shut the TM1 Service down.
From the point of view of conditional feeders, unfortunately TM1 always has a few problems with conditional feeders, There is a TM1S.CFG file option ReevaluateConditionalFeeders, which doesn't always work. However, without PersistentFeeders, at least when you re-start the service any conditional feeders will get evaludated correctly. If you have Persistent Feeders, then even at server start up the conditional feeders won't get re-evaluated because it doesn't evalualte the feeders, it just loads the feeders from the .feeder file, and it won't have the feeder in there if it didn't exist in memory at the time that the .feeder file was created.
It is worth expanding on what is a conditional feeder. The usual example is where you have an IF condition on the Right Hand Side of the feeder. However, we had a case where (from a third party design) we had data being loaded against a Date element in the Date dimension and the Day element in a Periodicity dimension. This was then copied across to a YTD element in the Periodicity dimension against the same Data element, by a rule which calculated the YTD position by summing the relevant elements of the Date dimension crossed with the Day element in the Periodicity dimension. Since data in any element of the Date dimension could give rise to a YTD later in the year, they fed from Day,Date to YTD for All Dates in the Year. To avoid over-feeding they only added a weeks work of Dates at a time. The problem we found when using Persistent Feeders was that if we had say Date elements to 1st Feb 2011, and we then added a weeks worth of Dates so we now had Dates to 8th Feb 2011, then the Dates from 2nd Feb to 8th Feb 2011 never got fed, for YTD, because feeders did not get re-evaluated when the service was re-started. Effectively we had a subtle type of conditional feeder.
The service started quickly with the .feeder files - it only took around 15 minutes. However, there was little point in it starting quickly if the YTD numbers were wrong
The only way to get the feeders to be re-evaluated was to delete the .feeder files and re-start the service. However, then the service took 6 hours to start.
Another issue we had was with .feeder files getting deleted, when the TM1 service was re-started at the weekend because the system said that a .feeder file was earlier than the date of a cube. (This is why I believe that .feeder files are only updated when there is a SaveDataAll or Server Shutdown. This is how TM1 checks that the .feeder file is in step with the .cub file)
Even if the feeder file on only one cube is out of date, it deletes the .feeder files from all cubes.
I eventually traced this to the fact that we had some cubes that had no internal feeders, ie no feeders to the cube itself. They only had feeders to other cubes. When the Save Data happened, it still seemed to create a blank .feeder file for the cube, even though it didn't need any feeders since it had no rules in itself that needed feeding. However, the next time the SaveDataAll happened (which we did nightly) then, because there were no feeders, it did not update the .feeders file. Therefore, by the time the weekend came the .feeders file was last modified earlier than the ,cub file, and the system said that as one .feeder file was out of date on an minor cube, it deleted the .feeders files for all cubes, including the largest cube. We then had issues of the Service taking 6 hours to start, which then caused other problems with scheduled tasks failing etc.
I cured that problem by adding a dummy rule in the cube and a dummy feeder to it. Once the cube had a real rule that was being fed its .feeders file always got updated when the cube was saved.
Once I had finally cured the .feeders files getting deleted issue, I was able to prove that any sort of conditional feeders don't get re-evaluated with Persistent Feeders.
So Persistent Feeders could not reduce load times without compromising data quality in our semi-cdnditional feeders.
Without Persistent Feeders the service start up time of 6 hours was unnacceptable.
At that point I changed the design that the third party had implemented.
I removed the rule based calculation of YTD, and instead calculated YTD by consolidation. This meant that there was no need for any feeding. This meant that there was no need for Persistent Feeders.
The Service now starts in 20 minutes for a 90GB Cube, which is only a little slower than the situation for the original design with Persistent Feeders. Reports also run up to 4 times faster.
Therefore if you are considering using Persistent Feeders to speed up start up time, I would advise you to first look at your current feeders to ensure that there is no over-feeding, and look at your design to see if there is another way to avoid feeding altogether, eg can things be calculated by consolidation instead of by rules.
Other points mentioned above are that, with Persistent Feeders once a cell is marked as fed, it will always be fed, even if the cell feeding it is now a zero. That is why you would need to do a scheduled deletion of .feeders files anyway, otherwise over time you could end up with a lot of over-feeding, depending on your data model. You will then need to take account of the fact that at some times you will need to allow a lot longer for your service to start up.
Another downside of Persistent Feeders is that while they can improve start up time,there is a time penalty at shut down time, as writing the .feeders file does take time. If you are looking at a weekly shutdown and re-start to clear down memory, the time may be extended due to the extra time to shutdown. Having said that, if you don't have conditional feeders and you are OK to use Persistent Feeders, then the shutdown and start up time will still probably be faster than without Persistent Feeders.
You also need to be careful about disk space. On a 2GB cube, we had a 28GB .feeders file.
You also need to be careful when developing. If you are changing rules and feeders to reduce over-feeding, you can never be sure if you have gone too far and are now under-feeding, because the feeders from the over-feeding will remain in the .feeders file. Therefore when developing I would advise you to have Persistent Feeders turned off. Since your are generally developing on cubes with smaller volumes of data than production, this shouldn't be too much of a problem.
Overally, I don't think I have worked on many systems that don't have some form of conditional feeding, so in practice I think the number of cases where Persistent Feeders can be used will be pretty limited.
Regards
Paul Simon