6 Replies Latest reply: Nov 27, 2012 9:25 AM by Chrisjenkins-Oracle RSS

    What's the best practices for active standby pair with AWT cache group?

    914264
      With the default active standby pair,the replication from the active database to the standby database is asynchronous in order to gain the best performance.
      But this increase the possibility of data loss if replication is in flight while the active database crashes.
      I want to enable return service to increase the reliability of the data so I create the active standby pair like this:
      -------------------------------------------------------------------------------------------------
      CREATE ACTIVE STANDBY PAIR eppdb ON "baal", eppdb ON "diablo" RETURN RECEIPT
      -------------------------------------------------------------------------------------------------
      Only enabling return receipt but the perfomance is downgraded heavily.
      If disabling return receipt I can get 700tps (my single-threaded test application)while enabling return receipt I only get 43 tps.
      Both servers locates on the same LAN and are connected via the same switch so bandwidth is not problem.

      Details for both servers:

      CentOS release 6.3 (Final) 64 bit

      CPU: 24 cores, Intel(R) Xeon(R) CPU X5670 @ 2.93GHz

      RAM: 32G

      Any shared experience or advice is much appreciated.

      Thanks

      SuoNayi
        • 1. Re: What's the best practices for active standby pair with AWT cache group?
          Chrisjenkins-Oracle
          Any form of synchronous replication will have a major impact on performance. This is a universal truth that is not specific to TimesTen. Due to implementation reasons, our fully synchronous replication (RETURN TWOSAFE) actually performs much better than the semi-synchronous replication (RETURN RECEIPT) when used in an active/standby pair configuration so you should use RETURN TWOSAFE. There is really no reason to ever use RETURN RECEIPT in active/standby pair setup.

          Even with RETURN TWOSAFE you will see lower throughput than for asynchronous but assuming everything is properly configured and hardware resources are adequate the throughput will scale quite well with additional application processes or threads, especially if you utilize the parallel replication capability in Timesten 11.2.2.

          Chris
          • 2. Re: What's the best practices for active standby pair with AWT cache group?
            914264
            Hi Chris, how to enable the parallel replication capability?
            I will try to switch return service to return TWOSAFE and fallback effect.
            • 3. Re: What's the best practices for active standby pair with AWT cache group?
              Chrisjenkins-Oracle
              To use Parallel Replication:

              1. Be sure you are using the very latest 11.2.2 release (11.2.2.4.1)

              2. Set the DSN attribute ReplicationParallelism to a value > 1 at database creation time (you cannot change this for an existing database as it is fixed at database creation time).

              Note that parallel replication will only improve throughput if you have multiple application processes/threads executing transactions concurrently. It will not improve the throughput when you have just a single application process/thread. Also, the degree of benefit is highly workload dependant (since it must still maintain correctness). And i is always vital to have everythign tuned and optimised properly as otherwise you will not see good performance regardless.

              Chris
              • 4. Re: What's the best practices for active standby pair with AWT cache group?
                914264
                Thanks Chris, here is my DSN configuration, I donot know if it's resonable.
                It would be very thankful if you can point some lights.

                ---------------------------------------------------------------------------------------------------
                [eppdb]
                *#MemoryLock=4 # for centos it doesnot work and TT will be unable to startup.*
                Driver=/home/timesten/TimesTen/tt1122/lib/libtten.so
                DataStore=/home/timesten/data/database/eppdb
                PermSize=20000
                TempSize=2560
                DatabaseCharacterSet=AL32UTF8
                Connections=200
                ConnectionCharacterSet=AL32UTF8
                LogBufMB=256
                LogFileSize=1024
                LogBufParallelism=24
                ReceiverThreads=2 # optional value is 1 or 2
                RecoveryThreads=10
                OracleNetServiceName=amq_915
                ---------------------------------------------------------------------------------------------------
                Will it enable Parallel Replication by adding a property ReplicationParallelism to the upper list and what's the reasonable value for that?


                Thanks
                • 5. Re: What's the best practices for active standby pair with AWT cache group?
                  914264
                  Return TWOSAFE indeed performs better than return service.
                  This is a good practice but no mention in the documents released with TimesTen package.
                  TPS for RETURN TWOSAFE is 688 for single-threaded test and 5341 for 50-threaded test.

                  Thanks very much, Chris.
                  • 6. Re: What's the best practices for active standby pair with AWT cache group?
                    Chrisjenkins-Oracle
                    Glad it helped. Yes, to enable parallel Replication you need to:

                    1. Drop the database (ttDestroy). Be sure to save the data elsewhere first if you wish to keep it!!!

                    2. Add the ReplicationParallelism attribute to the list of DSN attributes.

                    3. Re-create the database (connect as instance administrator)

                    4. Setup replication.

                    The recommended value of ReplicationParallelism is between 1 and half of the value specified for LogBufParallelism. The value specified for LogBufParallelism should be >=1 and <= the number of CPU cores in the machine. So if you have a 32 core machine you might set LogBufParallelism to 16 and ReplicationParallelism to 8 depending on our workload. Note that very high values for ReplicationParallelism are unlikely to bring extra benefit and the benefit you will see is very dependant on your workload. You may see no benefit or you may see a large benefit.

                    Chris