Entry processor performance and serialization

Our application invokes an entry processor from a .Net extend client. We are seeing very poor performance the first few times the processor is invoked (typically 60ms vs 2ms). I was expecting this to be due to the overhead of the initial TCP connection but this doesn't appear to be the case. Here is a typical set of timings from the beginning of invoking the EP on the client:
5ms: Object starts being deserialized on proxy
7ms: Deserialization is finished, and serialization begins
9ms: Serialization is complete.
55ms: Deserialization begins on the storage node
58ms: Deserialization complete on storage node
58.5: Entry processor invocation complete
60ms: Serialization of result is complete
My questions are:
- What is happening between the end of serialization of the object by the proxy and deserialization starting on the storage node?
- Given that the cache is POF enabled, why is the proxy deserializing and reserializing the entry processor?
Version is 3.7.1.6

Hi Rob,
Config is below. defer-key-association-check is not set. The timings were established by logging the POF serialization in each process so its definitely the proxy that is doing it.
Regards,
Dave
Client config:
<?xml version="1.0"?>
<cache-config xmlns="http://schemas.tangosol.com/cache">
<caching-scheme-mapping>
<cache-mapping>
<cache-name>Cache</cache-name>
<scheme-name>remote-scheme</scheme-name>
</cache-mapping>
</caching-scheme-mapping>
<caching-schemes>
<remote-cache-scheme>
<scheme-name>remote-scheme</scheme-name>
<service-name>ExtendProxyService</service-name>
<initiator-config>
<tcp-initiator>
<remote-addresses>
<socket-address>
<address>localhost</address>
<port>1234</port>
</socket-address>
</remote-addresses>
<connect-timeout>5s</connect-timeout>
</tcp-initiator>
<outgoing-message-handler>
<request-timeout>1s</request-timeout>
</outgoing-message-handler>
<serializer>
<class-name>Tangosol.IO.Pof.ConfigurablePofContext, Coherence</class-name>
<init-params>
<init-param>
<param-type>string</param-type>
<param-value>assembly://..../pof-config.xml</param-value>
</init-param>
</init-params>
</serializer>
</initiator-config>
</remote-cache-scheme>
</caching-schemes>
</cache-config>
Server cache config:
<?xml version="1.0"?>
<cache-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.oracle.com/coherence/coherence-cache-config"
xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-cache-config coherence-cache-config.xsd">
<defaults>
<serializer>pof</serializer>
</defaults>
<caching-scheme-mapping>
<cache-mapping>
<cache-name>Cache</cache-name>
<scheme-name>cache-distributed</scheme-name>
</cache-mapping>
</caching-scheme-mapping>
<caching-schemes>
<distributed-scheme>
<scheme-name>cache-distributed</scheme-name>
<service-name>PartitionedCache</service-name>
<thread-count>10</thread-count>
<partition-count>2039</partition-count>
<backing-map-scheme>
<local-scheme />
</backing-map-scheme>
<autostart>true</autostart>
</distributed-scheme>
<proxy-scheme>
<service-name>ExtendProxyService</service-name>
<thread-count>5</thread-count>
<acceptor-config>
<tcp-acceptor>
<local-address>
<address>localhost</address>
<port system-property="tangosol.coherence.proxy.port"></port>
</local-address>
</tcp-acceptor>
</acceptor-config>
<proxy-config>
<cache-service-proxy>
<class-name>....InteceptorCacheService</class-name>
<init-params>
<init-param>
<param-type>com.tangosol.net.CacheService</param-type>
<param-value>{service}</param-value>
</init-param>
</init-params>
</cache-service-proxy>
</caching-schemes>
</cache-config>

Similar Messages

  • Spawning new entry processors from within an existing entry processor

    Is it possible / legal to spawn a new entry processor (to operate within a different cache) from within an existing entry processor.
    E.g we have a parent and a child cache, We will receive an update of the parent and start an entry processor to do this. Off the back of the parent update we will also need to update some child entries in another cache and need to start a new entry processor for the child entries. Is it legal to do this?

    Hi Ghanshyam,
    yes, in case of (a), you would be mixing different types in the same cache. There is nothing wrong with that from Coherence's point of view, as long as all code which is supposed to access such objects in their deserialized form is able to handle this situation.
    This means that you need to use special extractors for creating indexes, and you need to write your filters, entry processors and aggregators appropriately to take this into account. But that's all it means.
    The EntryProcessor on the child could be invoked, so long as there are more service
    threads configured. This allows retaining partition affinity. I don't think this is technically
    illegal.It is problematic, as invoking an entry-processor from another entry-processor in the same cache service can lead to deadlock/livelock situations. You won't find it out in a simple test as you get an exception or not.
    But even if it is technically not guarded against, firing a second entry-processor consumes an additional thread from the thread-pool. Now if you get to a situation when all (or at least more than half of the thread-pool size) of your entry-processors try to fire an additional entry-processor, and there are no more threads in the thread-pool, then some or all would be waiting for a thread to be available, and of course none would be available, because there are not enough single-thread entry-processors to leave to get a thread to everyone.
    However, none of them can back off as all are waiting for the fired entry-processor to complete. Poof, no processing is possible on your cache service.
    Another problematic situation which can arise if entry processors are fired from entry processors is that your entry-processors may deadlock on entries (entry processors executing on some entries and trying to execute on another entry on which another entry processor executes and also tries to execute on the first entry). In this case the entry-processors would wait on each other to execute.
    No code running in the cache server invoked by Coherence is supposed to access a cache service from code running in the threads of the same cache service, except for a couple of specifically named operations which only release resources but not consume additional new ones.
    Best regards,
    Robert

  • Entry Processor and worker thread question

    We have a cache service configured with a thread count of 10 . When i run a Entry processor to do some processing on all entries of the cache, i see in the logs that each of the entry is processed sequentially on same worker thread even though multiple threads are configured for cache service . I was hoping Entry processor would run parallely on multiple threads for different entry's . Am i missing something here?? Appreciate all the help .
    Here is thelog:: Looks like entry processor runs sequentially on same thread.
    011/04/06 15:58:55:489 [*DistributedCacheWorker:6*] INFO ENTRY PROCESSOR ON ACCOUNT 1872
    2011/04/06 15:58:55:490 [*DistributedCacheWorker:6]* INFO ENTRY PROCESSOR ON ACCOUNT 38570
    2011/04/06 15:58:55:490 [*DistributedCacheWorker:6*] INFO ENTRY PROCESSOR ON ACCOUNT 38856
    2011/04/06 15:58:55:491 [*DistributedCacheWorker:6*] INFO ENTRY PROCESSOR ON ACCOUNT 1586279
    2011/04/06 15:58:55:492 [*DistributedCacheWorker:6*] INFO ENTRY PROCESSOR ON ACCOUNT 38570

    Hello,
    Entry Processors will use multiple threads. They will however only use one thread per partition.
    My guess is what you are seeing is that the EP is working on the same partition.
    hth,
    -Dave

  • Updating a hierarchical data structure from an entry processor

    I have a tree-like data structure that I am attempting to update from an AbstractProcessor.
    Imagine that one value is a collection of child value keys, and I want to add a new child node in the tree. This requires updating the parent node (which contains the list of child nodes), and adding the child value which is a separate entry.
    I would rather not combine all bits of data into one value (which could make for a large serialized object), as sometimes I prefer to access (read-only) the child values directly. The child and the parent values live in the same partition in the partitioned cache, though, so get access should be local.
    However, I am attempting to call put() on the same cache to add a child value which is apparently disallowed. It makes sense that a blocking call is involved in this operation, as it needs to push out this data to the cluster member that has the backup value for the same operation, but is there a general problem with performing any kind of re-entrant work on Coherence caches from an entry processor for any value that is not the value you are processing? I get the assertion below.
    I am fine with the context blocking (preventing reads or writes on the parent node value) until the child completes, presuming that I handle deadlock prevention myself due to the order in which values are accessed.
    Is there any way to do this, either with entry processors or not? My code previously used lock, get and put to operate on the tree (which worked), but I am trying to convert this code to use entry processors to be more efficient.
    2008-12-05 16:05:34.450 (ERROR)[Coherence/Logger@9219882 3.4/405]: Assertion failed: poll() is a blocking call and cannot be called on the Service thread
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:4)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.poll(Grid.CDB:11)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.put(DistributedCache.CDB:30)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.put(DistributedCache.CDB:1)
         at com.tangosol.util.ConverterCollections$ConverterCacheMap.put(ConverterCollections.java:2433)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap.put(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.util.SafeNamedCache.put(SafeNamedCache.CDB:1)
         at com.tangosol.net.cache.CachingMap.put(CachingMap.java:928)
         at com.tangosol.net.cache.CachingMap.put(CachingMap.java:887)
         at com.tangosol.net.cache.NearCache.put(NearCache.java:286)
         at com.conduit.server.properties.CLDistributedPropertiesManager$UpdatePropertiesProcessor.process(CLDistributedPropertiesManager.java:249)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.invoke(DistributedCache.CDB:20)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:50)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$InvokeRequest.run(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:130)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:37)
         at java.lang.Thread.run(Thread.java:637)

    Hi,
    reentrant calls to the same Coherence service is very much recommended against.
    For more about it, please look at the following Wiki page:
    http://wiki.tangosol.com/display/COH34UG/Constraints+on+Re-entrant+Calls
    Best regards,
    Robert

  • Simple get vs entry processor for processsing 'get' requests

    We're wondering about the best way to handle a simple get where we want to do some processing on the request:
    1. we might want to authenticate/authorize a proxy as well as an 'implied' user sitting behind the proxy
    2. we might need to look up the cache entry by modifying the key presented by the user: for example, changing capitalization
    3. we might even have multiple aliases for the cache entry but only store it once to avoid data duplication-- in this case, we'd need to resolve an alias to another name entierly.
    Would it be best to use an entry processor to do this (a 'GetProcessor') or is there a better way using simple 'get' in the basic api with some server-side logic to intercept the request and do the processing? If the latter, can you please explain how to do it?
    And please point out any performance considerations if you can.
    Thanks!
    Edited by: Murali on Apr 25, 2011 2:51 PM

    Hi Murali,
    You would probably be better off using an Invocable and InvocationService for what you want to do. The main reason for this would be points 2 and 3 where you say you might want to modify the key or have aliases (I presume you mean aliases for keys).
    If you use a get or an EntryProcessor these two requests would be routed to the storage member that owns the key of the get request or EntryProcessor invoke. If you then wanted to modify the key the get or EntryProcessor may now be on the wrong node as a different node may own the new key.
    If your data access requests are all coming from client applications over Extend and not from within cluster members then you could intercept calls to the cache on the Extend Proxy and do your extra processing and key modification there. There are a couple of different ways of doing this depending on what version of Coherence you are using and whether this is restricted to a few caches or all caches. Coherence 3.6 and above make this easier as they introduce methods and configuration as part of the security API that would allow you to intercept calls an easily wrapper caches. It is still possible in 3.5 but a bit more work.
    Probably the easiest way on an ExtendProxy is to create a wrapper class that can wrap the real cache and intecept the required methods. You can do this by extending WrapperNamedCache and overriding the methods you want to intercept, such as get(). Actually making Coherence use your wrapper instead of the real cache can be done a number of ways depending again on which version of Coherence you have.
    Are all your data access requirements just gets or do you intend to use Filter queries? Obviously any query made againsta a cache where the Filter was targeted at the Key rather than the value would fail if the filter was using unmodified key values. You would also need to cope with getAll requests.
    If you can expand a bit on where the requests for data will come from (i.e. are they all form Extend clients) and which version of Coherence you have then it would be possible to give a better answer as right now there are quite a few possibilities.
    JK

  • OPSM 1.2 [Oracle pedigree and Serialization manager] installation is failed

    Hi All,
    We are doing OPSM 1.2 installation on Oracle Enterprise Linux 5.6 [64-bit].
    Steps we have done:
    1. installed 11g db and created repositories for soa server.
    2. installed weblogic server 10.3.6
    3. Installed soa server & created two managed servers soa_server1 and pas_server1 in weblogic as per the doc " Oracle Pedigree and Serialization Manager Installation Guide"
    4. And created required schemas in db for OPSM.
    5. and ran $MW_ORA_HOME/common/bin/wlst.sh ./pasMasterInstall.py
    Below are The error we are getting at the time of deployment is:
    Deploying the PasSerializationManager application...
    Deploying application from /u01/ORASOA/Middleware/Oracle_SOA1/pas/applications/install/PasSerializationManager.ear to targets pas_server1 (upload=false) ...
    <Dec 19, 2013 7:56:03 AM EST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, PasSerializationManager [archive: /u01/ORASOA/Middleware/Oracle_SOA1/pas/applications/install/PasSerializationManager.ear], to pas_server1 .>
    ....................................................................................................No stack trace available.
    This Exception occurred at Thu Dec 19 08:01:04 EST 2013.
    weblogic.management.scripting.ScriptException: Error occured while performing deploy : The action you performed timed out after 300,000 milliseconds.
    Error: Unable to deploy the Ear Files.
    Shutting down the AdminServer...
    Stopping the AdminServer...
    Finished stopping the AdminServer.
    Moving the Installed Files to the Install Directories...
    Finished moving files to install directory.
    Restoring Backup...
    Finished restoring backup.
    ERROR: Installation Failed!
    Note: Please review the above output buffer to determine what error(s)
          have occurred. You must fix any errors before attempting to
          retry the installation.
    WARNING: System failed to register the MDS Repository with WebLogic. It is likely
    that the MDS Repository has already been registered. Please verify the registered
    metadata repositories using Oracle's Enterprise Manager application. Once logged
    into Enterprise Manager, expand the Metadata Repositories node and verify an entry
    exists for mds-mds-ApplicationMDSDBDS. In addition, click on the repository and
    verify it is targeted to the appropriate servers.
    Exiting WebLogic Scripting Tool.
    <Dec 19, 2013 8:01:09 AM EST> <Warning> <JNDI> <BEA-050001> <WLContext.close() was called in a different thread than the one in which it was created.>
    In pas_server1.log file:
    Caused By: oracle.mds.exception.MDSExceptionList: MDS-01329: unable to load element "persistence-config"
    MDS-01370: MetadataStore configuration for metadata-store-usage "MAR_TargetRepos" is invalid.
    MDS-00929: unable to look up name "jdbc/mds/opsm" in JNDI context
    Unable to resolve 'jdbc.mds.opsm'. Resolved 'jdbc.mds'
            at oracle.mds.config.PConfig.loadFromBean(PConfig.java:1008)
            at oracle.mds.config.PConfig.<init>(PConfig.java:767)
            at oracle.mds.config.MDSConfig.loadFromBean(MDSConfig.java:1151)
            at oracle.mds.config.MDSConfig.loadFromElement(MDSConfig.java:1218)
            at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:781)
            at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:728)
            at oracle.mds.internal.lcm.deploy.DeployManager.deploy(DeployManager.java:529)
            at oracle.mds.internal.lcm.deploy.DeployManager.startDeployment(DeployManager.java:211)
            at oracle.mds.internal.lcm.MDSLifecycleListenerImpl.start(MDSLifecycleListenerImpl.java:215)
            at oracle.mds.lcm.weblogic.WLLifecycleListener.preStart(WLLifecycleListener.java:77)
            at weblogic.application.internal.flow.BaseLifecycleFlow$PreStartAction.run(BaseLifecycleFlow.java:282)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
            at weblogic.application.internal.flow.BaseLifecycleFlow$LifecycleListenerAction.invoke(BaseLifecycleFlow.java:199)
            at weblogic.application.internal.flow.BaseLifecycleFlow.preStart(BaseLifecycleFlow.java:62)
            at weblogic.application.internal.flow.HeadLifecycleFlow.prepare(HeadLifecycleFlow.java:283)
            at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:648)
            at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
            at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
            at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:59)
            at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
            at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
            at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:208)
            at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
            at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
            at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
            at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
            at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
            at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
            at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
            at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
            at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
            at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    Any one please  provide resolution to fix the issue. 
    Thanks
    skjb     

    Have you searched MOS website for (MDS-01370 AND MDS-00929) and go through the docs?
    If none of MOS docs help, then please log a SR.
    Thanks,
    Hussein

  • Accessing Cache From an Entry Processor

    Is it possible to Access another cache to perform operations on when calling cache.invoke()? In this call I pass in the key and an processor that invokes another cache.

    Hi Dan,
         If that other cache is in a cache service different from the cache service of the cache on which the entry-processor is running, then you can.
         Otherwise you should not, because your code will be prone to deadlocks.
         Best regards,
         Robert

  • Nice to see 13" retina but it has only Intel HD Graphics 4000 and does not have NVIDIA GeForce GT 650M with 1GB of GDDR5 memory card. How it will affect the speed, performance and other things compared to 15" retina where NVIDIA GeForce card is available.

    Nice to see 13" retina but it has only Intel HD Graphics 4000 and does not have NVIDIA GeForce GT 650M with 1GB of GDDR5 memory card. How it will affect the speed, performance and other things compared to 15" retina where NVIDIA GeForce card is available.

    The 15" Retina's will have better performance than any 13" Retina. Not only do the 15" machines have dedicated GPU's, but they also have quad-core processors, whereas the 13" Retina's only have dual-core processors.

  • Infamous WHINE & lack of Processor Performance settings?

    I have owned all of the Al books from the 1ghz 17" to the 1.67 17". I noticed the whine first on the 15" 1.25 AlBook 2 yrs ago. During that time we were able to throttle the Processor settings ourselves via the Energy Saver setting in System Preferences. As of the release of the 1.67 AlBooks that option is no longer available. When the Processor Setting was set to Automatic, the AlBooks ALAWYS had the WHINE & HISS from under the keyboard in the same spot the MacBook Pro's demonstrate today.
    I called Apple Tech support this afternoon and spoke to a tier 2 "guy". I asked about Speedstep / Processor throttling and that option being taken away from us - his reply was that the new processors control that now and are able to go from reduced settings to highest in a fraction of a second never noticed by the user. WRONG ANSWER. What he's telling me is the Processor is ALWAYS set to AUTOMATIC and we can't do anything about that. While his answer may be true, these units have the same whine & hiss as the previous AlBooks when set to Automatic. THIS IS A PROBLEM.
    I do want that option BACK on my portable!!! It was nice knowing that if I was only wanting to watch a DVD on battery power that I could ensure low power consumption by going to the Energy Saver and setting the processor performance to "Reduced" or to always have it set to Highest if so desired. I have never been able to set the processor performance to Automatic and NOT hear the whine & hiss.
    I have the 2.0ghz MacBook Pro w/ 2g RAM. I do not hear the whine whie the unit is plugged in - but on batter power it's very very loud. I could be wrong, but past experiences have proven that the automatic setting which WE ALL HAVE BY DEFAULT on our MacBook Pro's will produce this unwanted noise. This is an amazing laptop. But I am feeling a bit gimped having those settings taken away.
    PJ
    MacBook Pro & Dual 2.7 G5   Mac OS X (10.4.5)  

    Since when does people saying something is so make it so? I'm curious; exactly how many people does it take to repeat some random statement before it automatically becomes fact?
    And no, what I said was not meant as a flame. I just wanted to explain why it is hard to take the post seriously. Apparently you took what I said in the opposite way I'd intended. That being said, I did not mean it that way, so sorry for any offense.
    Of course a support forum is going to be filled with posts about problems. What would you say is more likely to compel you to make a thread in a support forum, a problem (of any sort), or no real reason at all, just for kicks? Granted , when a product first comes out, there will be a few "I love my MBP!" type threads, but those go away after awhile. The complaints remain, because, let's face it, life is full of problems, and computers have more than their share as a whole.
    The reason it's important that this is your first post is that is isn't very hard to imagine people registering to stir up controversy, goof around, or incite even more inflammatory responses (read: troll), when ANY new product is released. My post wasn't accusing you of any of this, merely trying to explain (beforehand) some responses you may get later on.
    My only advice is that if you are unsatisfied with your machine, exchange it for a new one. If a noisy screen/processor/speaker is enough to make you reconsider your purchase entirely, then perhaps it would be wiser to wait until this particular issue has been ironed out on Apple's end (certainly not a terrible idea).
    I do understand where you are coming from with the processor settings, by the way, and I do miss those settings at times, mostly because I'm a control freak. However, I am assuming that the MBP uses Intel's speed-step technology, and I don't know of a way to manipulate that, so it looks like that little feature is gone. It very well could be at the root of the noise issues, but at this point, that is only speculation.
    MBP Mac OS X (10.4.5) 2GHz, 2GB RAM, 256MB ATi, 100GB/7200rpm HDD

  • FAQ's, intros and memorable discussions in the Performance and Tuning Forum

    Welcome to the SDN ABAP Performance and Tuning Forum!
    In addition to release dependent information avalaible by:
    - pressing the F1 key on an ABAP statement,
    - or searching for them in transaction ABAPDOCU,
    - using the [SDN ABAP Development Forum Search|https://www.sdn.sap.com/irj/sdn/directforumsearch?threadid=&q=&objid=c42&daterange=all&numresults=15&rankby=10001],
    - the information accessible via the [SDN ABAP Main Wiki|https://wiki.sdn.sap.com/wiki/display/ABAP],
    - the [SAP Service Marketplace|http://service.sap.com] and see [SAP Note 192194|https://service.sap.com/sap/support/notes/192194] for search tips,
    - the 3 part [How to write guru ABAP code series|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f2dac69e-0e01-0010-e2b6-81c1e8e5ce50] ... (use the search to easily find the other 2 documents...)
    ... this "sticky post" lists some threads from the ABAP forums as:
    - An introduction for new members / visitors on topics discussed in threads,
    - An introduction to how the forums are used and the quality expected,
    - A collection of some threads which provided usefull answers to questions which are frequently asked, and,
    - A collection of some memorable threads if you feel like reading some ABAP related material.
    The listed threads will be enhanced from time to time. Please feel welcome to post to [this thread|Suggestions thread for ABAP FAQ sticky; to suggest any additional inclusions.
    Note: When asking a question in the forum, please also provide sufficient information such that the question can be answered usefully, do not repeat interview-type questions, and once closed please indicate which solution was usefull - to help others who search for it.

    ABAP Performance and Tuning
    Read Performance   => Gurus take over the discussion from Guests caught cheating the points-system.
    SELECT INTO TABLE => Initial questions often result in interesting follow-up discussions.
    Inner Joins vs For all Entries. => Including infos about system parameters for performance optimization.
    Inner Join Vs Database view Vs for all entries => Usefull literature recommended by performance guru YukonKid.
    Inner Joins vs For All Entries - performance query => Performance legends unplugged... read the blogs as well.
    The ABAP Runtime Trace (SE30) - Quick and Easy => New tricks in old tools. See other blogs by the same author as well.
    Skip scan used instead of (better?) range scan => Insider information on how index access works.
    DELETE WHERE sample case that i would like to share with you => Experts discussing the deletion of data from internal tables.
    Impact of Order of fields in Secondary  index => Also discussing order of fields in WHERE-clause
    "SELECT SINGLE" vs. "SELECT UP TO 1 ROWS" => Better for performance or semantics?
    into corresponding fields of table VERSUS into table => detailed discussion incl. runtime measurements
    Indexes making program run slower... => Everything you ever wanted to know about Oracle indexes.
    New! Mass reading standard texts (STXH, STXL) => avoiding single calls to READ_TEXT for time-critical processes
    New! Next Generation ABAP Runtime Analysis (SAT) => detailed introduction to the successor of SE30
    New! Points to note when using FOR ALL ENTRIES => detailed blog on the pitfall(s) a developer might face when using FAE
    New! Performance: What is the best way to check if a record exist on a table ? => Hermann's tips on checking existence of a record in a table
    Message was edited by: Oxana Noa Zubarev

  • Jndi and serializable objects

    Hi,
    I am attempting to create a cache on the web server to store
    frequently accessed reference data. I do so by running a series of
    queries in a startup class. The data retrieved from the result set of
    each query is stored in a custom class and bound to the server context.
    My understanding is that when serializable objects are bound, they are
    written to disk (so as not.to waste valuable Heap space I assume). As a
    test I made the startup query return a large amount of data and I
    expected to see the amount of free disk space decrease as the objects
    were bound however I did not see this occurring. I examined the memory
    usage of the java process with the NT task manager, and the memory usage
    was increasing pretty dramatically as the query results were performed
    and new objects created to store this data.
    Based on these observations I assume that the objects I created and
    bound are stored in the Java Heap and not written to disk. Would
    Weblogic at some point write these to disk if memory became tight or is
    my understanding that binding an object serializes it incorrect?
    If it turns out that what I am attempting here consumes a lot of heap
    space, I assume that server performance will suffer which is
    unacceptable. Would using read-only entity beans be a better solution?
    The container could manage this memory more effectively but it would
    seem to add a lot of overhead for a simple read only data cache.
    Thanks,
    Steve Snodgrass

    We never write jndi data to the disk. So if you add more objects your are
    going to take up more heap space. You should be looking at other
    alternatives to implement this.
    -- Prasad
    Steve Snodgrass wrote:
    Hi,
    I am attempting to create a cache on the web server to store
    frequently accessed reference data. I do so by running a series of
    queries in a startup class. The data retrieved from the result set of
    each query is stored in a custom class and bound to the server context.
    My understanding is that when serializable objects are bound, they are
    written to disk (so as not.to waste valuable Heap space I assume). As a
    test I made the startup query return a large amount of data and I
    expected to see the amount of free disk space decrease as the objects
    were bound however I did not see this occurring. I examined the memory
    usage of the java process with the NT task manager, and the memory usage
    was increasing pretty dramatically as the query results were performed
    and new objects created to store this data.
    Based on these observations I assume that the objects I created and
    bound are stored in the Java Heap and not written to disk. Would
    Weblogic at some point write these to disk if memory became tight or is
    my understanding that binding an object serializes it incorrect?
    If it turns out that what I am attempting here consumes a lot of heap
    space, I assume that server performance will suffer which is
    unacceptable. Would using read-only entity beans be a better solution?
    The container could manage this memory more effectively but it would
    seem to add a lot of overhead for a simple read only data cache.
    Thanks,
    Steve Snodgrass

  • Transactional entry processors?

    Does the new "full XA support" also makes it possible to roll back changes performed using entry processors or is it still only "put/putAll" operations that are possible to perform transactionally ?
    /Magnus

    That is very good news - we have for a long time wanted to use entry processors for "path" updates but previously not been able to use them with XA!!!!!
    /Magnus

  • INNER JOIN with FOR ALL ENTRIES IN Performance ?

    I am using following the following <b>Select using Inner join with For All Entries in.</b>
          SELECT kebeln kebelp kvbeln kvbelp
            FROM ekkn AS k INNER JOIN ekbe AS b ON kebeln = bebeln
                                               AND kebelp = bebelp
            INTO TABLE gi_purchase
             FOR ALL ENTRIES
             IN gi_sales
          WHERE k~mandt EQ sy-mandt
            AND k~vbeln EQ gi_sales-vbeln
            AND k~vbelp EQ gi_sales-posnr
            AND b~budat EQ p_date.
    If i am not doing inner join then I will have to do 2 select with for all entries in on ekkn and ekbe tables and then compare them.
    <b>I want to know which one has better performance
    Inner join with for all entries in
                    or
    2 Selects with for all entries in</b>

    the join is almost aways faster:
    <a href="/people/rob.burbank/blog/2007/03/19/joins-vs-for-all-entries--which-performs-better">JOINS vs. FOR ALL ENTRIES - Which Performs Better?</a>
    <a href="http://blogs.ittoolbox.com/sap/db2/archives/for-all-entries-vs-db2-join-8912">FOR ALL ENTRIES vs DB2 JOIN</a>
    Rob

  • Strange read-through operation after entry processor work

    Hi.
    We use the combination cache listener - entry processor to do some actions when the data comes to coherence. We use Oracle Coherence Version 3.5.3/465.
    Just after the entry processor has set the new value for the entry, the new "get" operation is called for the cache and jdbc hit is done for this key.
    Here is the entry processor:
    public Object process(Entry entry) {       
            if (!entry.isPresent()) {
                // No entities exist for this CoreMatchingString - creating new Matching unit
                MatchingUnit newUnit = new MatchingUnit(newTrade);
                entry.setValue(newUnit, true);
                return null;
            ((MatchingUnit)entry.getValue()).processMatching(newTrade);
            return null;
        }Very interesting, that if I use entry.setValue(value) without second parameter - I recieve the db hit just on setValue method. According to docs, setValue() with one parameter returns the previous value and its logical, that the cache hit (and therefore the db hit) is done just on set. But I use the overloaded version void setValue(java.lang.Object oValue, boolean fSynthetic), which is said to be light and should not fetch previous version of the object. But this is done anyway! Not on setValue itself, but just after the process() method called.
    Actually it's strange, that coherence tries to fetch the previous value in the case it didn't exist! The cache.invoke(matchingStr, new CCPEntryProcessor(ccp)) is invoked on not existing record and it is created just on invokation. May be it's the bug or the place for optimization.
    Thanks

    bitec wrote:
    Thanks, Robert, for such detailed answer.
    Still not clear for me, why synthetic inserts are debatable. There are lots of cases, when the client simply updates/inserts the record (using setValue()) and does not need to recieve the previous value. If he needs, he will launch the method:Hi Anton,
    it is debatable because the purpose of the fSynthetic flag is NOT so that you can optimize a cache store operation away. Synthetic event means that this is not real change in the data set triggered by the user, it is something Coherence has done on the backing map / on the cache for its own reasons and decisions to be able to provide high-availability to the data, and it only changes that particular Coherence node's subset of data but does not have a meaning related to the actually existing full data set. Such reasons are partition movement and cache eviction (or possibly any other reasons why Coherence would want to change the content of the backing map without telling the user that anything has changed).
    If you set the synthetic flag, you are trying to masquerade a real data change as an event which Coherence decided to trigger. This is why it is debatable. Also, synthetic backing map events may not always lead to dispatching cache events (for partition rebalance they definitely not). This optimization may also be extended to synthetic cache events.
    java.lang.Object setValue(java.lang.Object oValue)and recieve the previous value. If he doesn't, he calls:
    void setValue(java.lang.Object oValue, boolean fSynthetic)and DOESN'T recieve the previous value as method is marked void. Thus he cannot get the previous value anyhow using this API, except of the direct manual db call. Yep, because Coherence is not interested in the old value in case of a synthetic event. The synthetic methods exist so that some entry can be changed in Coherence (usually by Coherence itself) in a way that it indicates a synthetic event so that listeners are not notified.
    Some valid uses for such functionality for setValue invoked by user code could be compacting some cached value and replacing the value the backing map stores with the compacted representation, which does not mean a change in the meaning of the actual cached value, only the representation changes. Of course if the setValue(2) method does not actually honor the synthetic flag, then such functionality will still incur all the costs of a normal setValue(1) call.
    But the previous value is anyway fetched by Coherence itself just after process() and client anyway doesn't get it! But any listeners on the cache may need to get it due to cache semantics reasons.
    In this case I regard this as the bug, cause the client, which uses this API doesn't expect the cache hit to take place (no return value for this overloaded setValue() method), but it takes and leads to some extra problems, resulting from read-through mechanizm.
    I would not regard it as a bug, it is probably the case of documenting a possible optimization too early, when it ultimately did not get implemented. I definitely would not try to abuse it to set a value without triggering a db fetch, as again, the intention of the synthetic flag is related not only to the cache loader functionality, but also to events and marking that a change indicates a real data change or a Coherence data management action.
    Now I understand why coherence does not know, whether this is inserted or updated value, thanks for details.
    Anton.
    *Edited: I thought about this problem from the point of the oracle user, but may be this additional hit is necessary for event producers, which need to make the events, containing old/new values. In this case this seems to be the correct behaviour.... Seems that I need some other workaround to avoid db hit. The best workaround is the empty load() method for cachestore...You can try to find a workaround, but it is an ugly can of worms, because of the scenario when more than one thread tries to load the same entry, and some of them try to load it with a reason.
    You may try to put some data into thread-local to indicate that you don't really want to load that particular key. The problem is that depending on configuration and race conditions your cache loader may not be called to clean up that thread-local as some other thread may just be invoked right now and in that case its return value is going to be returned to all other threads, too, so you may end up with a polluted thread.
    Best regards,
    Robert
    Edited by: robvarga on Oct 15, 2010 4:25 PM

  • What triggers a write-through/write-behind of entry processor changes?

    What triggers a write-through/write-behind when a cache entry is modified by a custom entry processor (subclass of AbstractProcessor)? Is it simply the call to Entry.setValue() that triggers this or are entry modifications detected in some other way?
    The reason I am asking is that in our Coherence cluster it looks like some entry modifications through entry processors have not triggered a write-behind, and I see no logical pattern as to which ones have and which ones haven't except that some specific entries are just never written to our database. We see from our logs that our implementation of the CacheStore.store() method is not called in these cases, and we also see that the cache entry has been modified successfully.
    We are using Coherence 3.3 on a three machine cluster with 8 nodes on each machine, accessed from clients through a TCP extend proxy.
    Regards,
    Mikael Carlstedt
    mBlox Inc
    Edited by: user3849225 on 16-Sep-2010 04:57

    Hi Mikael
    Calling setEntry() will result in a call to the CacheStore.store() method unless the value you are setting is the same as the existing entry value. If you are using writebehind then storeAll() will be called instead of store() if there are multiple entries waiting to be stored. Writebehind will also coelesce entries so that only the last entry for a given key will be stored.
    What patch level are you using?
    Paul
    Edited by: pmackin on Sep 17, 2010 12:08 AM

Maybe you are looking for

  • Crystal Report 9 with Oracle 9

    <p>Hi Guys,</p><p> Actually I am new to crystal reports and I just join job in crystal. We use crystal9 and oracle9i.</p><p>We have date field in a table and  some field values are Null(But in a report Null value shows some date value by default)</p>

  • Imprting cd tracks shuts my computer down after Itunes upgrade

    Updated to the latest Itunes 6.5. Anytime I try to rip songs and add them to my playlist, it shuts my computer down. Was not a problem on previous version of Itunes. I've tried 10 different cds and each one does the same thing. Any suggestions, or an

  • External drives will not reformat to Mac OS Extended

    I just moved several external drives from a PC to a Mac permanently and want to reformat them to Mac OS Extended. However, when I attempt to do it, I receive an error message saying that the formatting was unsuccessful after the disk is already erase

  • Kernel panic, now external drive won't mount

    I had a kernel panic on my trusty old Powerbook G4 867MHz today. It's running 10.5.8. Everything on the computer seems to be fine after restart, but the WD MyBook 500MB that is connected directly to one of the PowerBook's USB ports now won't mount. T

  • Monthly wise Sales report - Help me

    Dear SDN mates Is there any standard reports for Monthly wise sales report ...the SAP1 , SAP2 reports were not helpful....Does this can be solved by standard reports or it needs to be customized???? kindly help me?