To optimize Adaptive Server RepAgent memory consumption and improve replication performance, set the maximum amount of mermory that each scanner thread can use to store object schema required for replication.
Use the max schema cache per scanner parameter of sp_config_rep_agent to allow each RepAgent scanner to store and process more transactions, therefore improve replication performance. If the cache fills up, it flushes out older object schema to make space for newer object schema.