Kde…

Informatica Performance Tuning

Informatica Performance Tuning

I have gathered this list over time while working at different client sites. It is not necessarily my list. But it definitely is a good list. If you don’t agree with anything below, don’t follow it. Anyways, here it goes….

INFORMATICA BASIC TUNING GUIDELINES

The following points are high-level issues on where to go to perform “tuning” in Informatica’s products. These are, in no way, permanent problem solvers, nor are they the end-all solution. Just some items (which if tuned first) might make a difference. The level of skill available for certain items will cause the results to vary.

To ‘test’ performance throughput it is generally recommended that the source set of data produce about 200,000 rows to process. Beyond this – the performance problems / issues may lie in the database – partitioning tables, dropping / re-creating indexes, striping raid arrays, etc…  Without such a large set of results to deal with, your average timings will be skewed by other users on the database, processes on the server, or network traffic.  This seems to be an ideal test size set for producing mostly accurate averages.

Try tuning your maps with these steps first.  Then move to tuning the session, iterate this sequence until you are happy, or cannot achieve better performance by continued efforts.  If the performance is still not acceptable, then the architecture must be tuned which can mean changes to what maps are created).  In this case, you can contact us – we tune the architecture and the whole system from top to bottom.

KEEP THIS IN MIND: In order to achieve optimal performance, it’s always a good idea to strike a balance between the tools, the database, and the hardware resources.  Allow each to do what they do best.  Varying the architecture can make a huge difference in speed and optimization possibilities.

Utilize a database for significant data handling operations (such as sorts, groups, aggregates).  In other words, staging tables can be a huge benefit to parallelism of operations.  In parallel design – simply defined by mathematics, nearly always cuts your execution time.
 
Localize. Localize all target tables on to the SAME instance of Oracle (same SID), or same instance of Sybase. Try not to use Synonyms (remote database links) for anything (including: lookups, stored procedures, target tables, sources, functions, privileges, etc…). Utilizing remote links will most certainly slow things down.  For Sybase users, remote mounting of databases can definitely be a hindrance to performance.

If you can – localize all target tables, stored procedures, functions, views, and sequences in the SOURCE database. Again, try not to connect across synonyms. Synonyms (or remote database tables) could potentially affect performance by as much as a factor of 3 times or more.

Remember that Informatica suggests that each session takes roughly 1 to 1 1/2 CPU’s. In keeping with this – Informatica play’s well with RDBMS engines on the same machine, but does NOT get along (performance wise) with ANY other engine (reporting engine, java engine, OLAP engine, java virtual machine, etc…)

Remove any database based sequence generators. This requires a wrapper function / stored procedure call. Utilizing these stored procedures can cause performance to drop by a factor of 3 times. This slowness is not easily debugged – it can only be spotted in the Write Throughput column. Copy the map, replace the stored proc call with an internal sequence generator for a test run – this is how fast you COULD run your map. If you must use a database generated sequence number, use them as part of the source qualifier query. If you’re dealing with GIG’s or Terabytes of information – this should save you lot’s of hours tuning.

TURN OFF VERBOSE LOGGING. The session log has a tremendous impact on the overall performance of the map. Force over-ride in the session, setting it to NORMAL logging mode.  Unfortunately the logging mechanism is not “parallel” in the internal core, it is embedded directly in to the operations.

Turn off ‘collect performance statistics’. This also has an impact – although minimal at times – it writes a series of performance data to the performance log. Removing this operation reduces reliance on the flat file operations.  However, it may be necessary to have this turned on DURING your tuning exercise.  It can reveal a lot about the speed of the reader, and writer threads.

Try to eliminate the use of non-cached lookups. By issuing a non-cached lookup, your performance will be impacted significantly. Particularly if the lookup table is also a “growing” or “updated” target table – this generally means the indexes are changing during operation, and the optimizer looses track of the index statistics. Again – utilize staging tables if possible.  In utilizing staging tables, views in the database can be built which join the data together; or Informatica’s joiner object can be used to join data together – either one will help dramatically increase speed. The thing with Informatica’s Joiner Transformation is that it needs caching of the data to scan through it to find matches. In such cases, make sure you tweak the cache sizes. Unless your source tables are from different RDBMS, let the RDBMS join them.

Separate complex maps – try to break the maps out in to logical threaded sections of processing. Re-arrange the architecture if necessary to allow for parallel processing. There may be more smaller components doing individual tasks, however the throughput will be proportionate to the degree of parallelism that is applied.

Balance between Informatica and the power of SQL and the database. Try to utilize the DBMS for what it was built for reading / writing / sorting / grouping / filtering data en-masse. Use Informatica for the more complex logic, outside joins, data integration, multiple source feeds, etc…  The balancing act is difficult without DBA knowledge. In order to achieve a balance, you must be able to recognize what operations are best in the database, and which ones are best in Informatica.  This does not degrade from the use of the ETL tool, rather it enhances it – it’s a MUST if you are performance tuning for high-volume throughput.

TUNE the DATABASE. Don’t be afraid to estimate: small, medium, large, and extra large source data set sizes (in terms of: numbers of rows, average number of bytes per row), expected throughput for each, turnaround time for load, is it a trickle feed? Give this information to your DBAs and ask them to tune the database for “worst case”. Help them assess which tables are expected to be high read/high write, which operations will sort (order by) etc. Moving disks, assigning the right table to the right disk space could make all the difference.  Utilize a PERL script to generate “fake” data for small, medium, large, and extra large data sets.  Run each of these through your mappings – in this manner, the DBA can watch or monitor throughput as a real load size occurs.

Be sure there is enough SWAP, and TEMP space on your PMSERVER machine. Not having enough disk space could potentially slow down your entire server during processing (in an exponential fashion).  Sometimes this means watching the disk space while your session runs.  Otherwise you may not get a good picture of the space available during operation. Particularly if your maps contain aggregates, or lookups that flow to disk Cache directory or if you have a JOINER object with heterogeneous sources.

Place some good server load monitoring tools on your PMServer in development – watch it closely to understand how the resources are being utilized, and where the hot spots are. Try to follow the recommendations – it may mean upgrading the hardware to achieve throughput.
 
TWEAK SESSION SETTINGS. In the session, there is only so much tuning you can do.  Balancing the throughput is important – by turning on “Collect Performance Statistics” you can get a good feel for what needs to be set in the session – or what needs to be changed in the database. Read the performance section carefully in the Informatica manuals. Basically what you should try to achieve is: OPTIMAL READ, OPTIMIAL THROUGHPUT, and OPTIMAL WRITE.  Over-tuning one of these three pieces can result in ultimately slowing down your session.

Try to merge expression objects, set your lookups to unconnected (for re-use if possible), check your Index and Data cache settings if you have aggregation, or lookups being performed.  Etc…  If you have a slow writer, change the map to a single target table at a time – see which target is causing the “slowness” and tune it.  Make copies of the original map, and break down the copies.  Once the “slower” of the N targets is discovered, talk to your DBA about partitioning the table, updating statistics, removing indexes during load, etc…  There are many database things you can do here.

Remove all other “applications” on the PMServer.  Except for the database / staging database or Data Warehouse itself.  PMServer plays well with RDBMS (relational database management system) – but doesn’t play well with application servers, particularly JAVA Virtual Machines, Web Servers, Security Servers, application, and Report servers.  All of these items should be broken out to other machines. This is critical to improving performance on the PMServer machine.

Hope this helps.

Kirtan Desai

Updates

Dan Linstedt from Myers-Holum Inc made a few comments a few days ago on this post. I have added his comments below.

  1. If you use a joiner, always use a sorted joiner – the cost of sorting data coming from the RDBMS staging area is frequently less than the cost of building the caches in place. Furthermore, if you are NOT on 64 bit Informatica, or you don’t have unlimited (seemingly unlimited) RAM, you have an upper limit to the caching mechanisms in all the cached objects – including Joiner.
  2. If the RDBMS is NOT tuned properly, putting more work into the RDBMS will actually slow things down.
  3. Too many Instances of an RDBMS on the SAME MACHINE will actually kill performance rather than help it, and it really is not necessary in order to handle fail-over as many set it up to do.
  4. Replacing a Lookup with a SORTED JOINER can improve performance dramatically.
  5. The manuals have the formula wrong for the Data / Index Cache settings, even though it’s counter-intuitive, you want 100% of the INDEX cached if you can get it, giving up Data Cache for disk. Why? Because if you can’t access RAM to check for the existence of data you are actually increasing I/O – when you increase I/O you slow performance dramatically. Set your Index caches to twice the size of your data caches to be safe.

There are many variables which can change the course of one’s actions. Feel free to ask questions on this blog.

9 Responses to “Informatica Performance Tuning”

  1. December 10th, 2006 at 12:31 pm

    Dan Linstedt says:

    Hey Kirtan,

    This is a good basic start for P&T – interesting statements, there are a few hints I’ll add for you. I’m currently writing a new P&T document, very extensive, that will be available (hopefully Q2 next year) – for sale, quite possible it may turn into a small hand-book.

    1. If you use a joiner, always use a sorted joiner – the cost of sorting data coming from the RDBMS staging area is frequently less than the cost of building the caches in place. Furthermore, if you are NOT on 64 bit Informatica, or you don’t have unlimited (seemingly unlimited) RAM, you have an upper limit to the caching mechanisms in all the cached objects – including Joiner.
    2. If the RDBMS is NOT tuned properly, putting more work into the RDBMS will actually slow things down.
    3. Too many Instances of an RDBMS on the SAME MACHINE will actually kill performance rather than help it, and it really is not necessary in order to handle fail-over as many set it up to do.
    4. Replacing a Lookup with a SORTED JOINER can improve performance dramatically.
    5. The manuals have the formula wrong for the Data / Index Cache settings, even though it’s counter-intuitive, you want 100% of the INDEX cached if you can get it, giving up Data Cache for disk. Why? Because if you can’t access RAM to check for the existence of data you are actually increasing I/O – when you increase I/O you slow performance dramatically. Set your Index caches to twice the size of your data caches to be safe.

    Hope these tips help, Watch my site next year for new announcements on performance and tuning.
    Dan L

  2. December 18th, 2006 at 1:01 pm

    subbu says:

    i have a small dobt whn we r working on oracle source which are from different data bases how many source qualifiers we can use and wher we have to give database connections at session level pls give me reply to my mail subramanyam.ambati@gmail.com

  3. December 18th, 2006 at 1:36 pm

    Administrator says:

    subbu,

    You can have as many sources as you want. If there are different data sources, I would make sure of the following
    [
    Before I start with that, let me say this.
    Pulling data from multiple sources always rings a bell in my head.
    Make sure that you pull tables from multiple data sources only if you want join them. It's ok to have multiple pipelines. Make sure you look at all the requirements and performance impacts before going forward with your approach.
    ]

    1. All the data sources that you are pulling data from are related, that is, they have a logical functional(business) relationship.

    2. There are keys on tables (which are from different data sources) that can be used to join these tables.

    3. To assign connection values in session properties, open the session -> goto properties -> on the left hand side, select the source/target you want to define connection for -> on the right hand side assign connection value.

    I am going to post a tutorial on Informatica Basics soon. Keep checking the web site for that.

  4. February 26th, 2007 at 12:38 pm

    KOUSHIK says:

    Can you please advice on this ?

    One of our informatica batch is taking a long time(35 min) to execute a sorting query during Look up in a table. The table contains arround 47662364 records. And it takes 19-20 min to execute the below query and thats why it is creating problem in performance. Can we tune this query/ Table so that it takes less time ? There are other similar cases too where the query takes a long time to execute. The query :-
    SELECT DETAIL_ID,NUMBER,YEAR FROM TABLE_DETAIL ORDER BY NUMBER,YEAR,DETAIL_ID
    Is there any way to tune the table/query. I mean as far as my knowledge goes we can tune this in 2 ways
    1. Creating and Using an unique Index on these 3 fields (DETAIL_ID,NUMBER,MVYEAR) on the table.
    there is already an index on DETAIL_ID,NUMBER.
    2. Creating some tuning method provided by Informatica :-
    a. change the default query like
    SELECT DETAIL_ID,NUMBER,YEAR FROM TABLE_DETAIL ORDER BY NUMBER,YEAR
    Here we can see that we have 2 fields instead of 3( in default query) to sort.
    Shall this improve performance ? I am not sure that any of above two can improve performance, because the table is too large and we are sorting all records.

    What do you think will be effective ? Database Tuning or Session tuning ?

  5. February 27th, 2007 at 4:34 am

    Kirtan Desai says:

    Kaushik,

    What do you expect from this query? Do you have a time limit that you want it to finish by? Or you just think that since it’s taking 35 minutes, it’s slow.

    ***********Anyways 

    Most of the time is taken by the sorting. The problem here is that you are doing a look up on a big table. Doing a lookup against such table would be a big No-No in my opinion. Is TABLE_DETAIL in a different database than the source tables? I have a suggestion for you. See if it works for you.

    Let’s say you have a source table called SRC_DATA fields like

    A
    B
    C
    DETAIL_ID
    NUMBER
    YEAR

    And than there is your lookup table with fields
    DETAIL_ID
    NUMBER
    YEAR

    NOW before running the main process,
    GET ALL THE DATA from the lookup table where combination of DETAIL_ID, NUMBER is in
    (
    get a distinct set of DETAIL_ID, NUMBER
    )
    And build a view with the results.

    And in your main process do a look up on the view and not on the big table.

    #####
    HOWEVER-
    If you HAVE TO do the look up than I would suggest creating an index on all the columns that are in the ORDER BY list. Since you do not have anything in the where clause this is a straight forward. You idea of either creating a better index or altering the ORDER BY clause would work just fine.

    ALSO,
    Look into tuning look up cache (data and index). That will help you a LOT with your performance issue.
    You should be able to find it in the transformation guide.

    These are a few thoughts that I gathered while reading your email. If you need a detailed explanation and/or suggestion, please give a test case (create table scripts with 100 rows and a good description of your process (make it technical and not so functional) .

    Hope this helps.

    -Kirtan

  6. February 27th, 2007 at 5:39 pm

    david says:

    Kaushik,

    We have very similar issue as you have, here is what we plan to do:

    If you can remove lookup in your mapping and including this in your source qualify sql override,
    in our case, (use lookup table outjoin with souce table). our mapping performance increase from 15 mins down to 35 secs, if you added have properly indexes.

    Hope this will be help you as well.

  7. February 27th, 2007 at 6:45 pm

    Kirtan Desai says:

    David,
    In cases where you have a lot of data in both source and look up tables, it is wiser to break the process into pieces and not try to do it all in one process.

    Overall I do agree with your comment though. If an outer join is possible to perform while keeping the cost low, there is nothing better than that.

    Kirtan

  8. March 26th, 2007 at 1:08 am

    Dan Linstedt says:

    I have revamped and reworked my performance and tuning class, and it is now a full 2 day fast-track, 100% lecture. It will comprise of tuning your top 3 “problematic” mappings in class, worked in to the lecture. It is a jam-packed class full of all the tips and techniques you need to make Informatica hum.

    The techniques I teach can take mappings from 24 hours down to 4 hours, and from 48 hours down to 8 hours, and from 2 hours down to 35 to 45 minutes.

    I’ve added v8 content, but all of the content applies backwards to v6, v7 as well.

    If you can get 10 people into a class, we can bring the class to you (within the USA). If you can get 20 people in to the class, we can bring the class to you outside the USA.

    If you are interested in holding such a class, please let me know. I’ve been teaching performance and tuning (systems-wide, including Informatica) for 15 years.

    The class itinerary is available at: http://www.GeneseeAcademy.com

    Thanks,
    Dan Linstedt
    DanL@RapidACE.com
    http://www.RapidACE.com

  9. March 27th, 2007 at 5:44 pm

    Kirtan Desai says:

    Dan,
    At this point, it’s impossible for me to gather these many people. I may look into travelling down to one of your classes.

    thanks for the information though.
    Kirtan

Leave a Reply