<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Out of Virtual Memory in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/Out-of-Virtual-Memory/m-p/2104818#M7034</link>
    <description>&lt;P&gt;Many thanks Hein, I will pass this info on to our support team.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Aug 2023 07:36:52 GMT</pubDate>
    <dc:creator>IanM</dc:creator>
    <dc:date>2023-08-11T07:36:52Z</dc:date>
    <item>
      <title>Out of Virtual Memory</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Out-of-Virtual-Memory/m-p/2104550#M7025</link>
      <description>&lt;P&gt;Hi, we have an Oracle to Oracle replication with a reasonably high CDC throughput.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a single uncommitted transaction of around 4.5Mil changes, waiting for source commit.&lt;/P&gt;
&lt;P&gt;We then get an error:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="ui-provider ej bqu bqv bqw bqx bqy bqz bra brb brc brd bre brf brg brh bri brj brk brl brm brn bro brp brq brr brs brt bru brv brw brx bry brz bsa bsb"&gt;Stream component 'st_0_transaction_sorter' terminated&lt;BR /&gt;Stream component failed at subtask 0, component st_0_transaction_sorter&amp;nbsp;&lt;BR /&gt;Error executing data handler&lt;BR /&gt;The Transaction Storage Swap cannot write Event&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;and checking the windows event logs we have:&lt;/P&gt;
&lt;P&gt;'Windows - Out of Virtual Memory'&lt;/P&gt;
&lt;P&gt;I'm surprised this happens. I expected Replicate to switch to using disk / tswp files before this would occur.&lt;/P&gt;
&lt;P&gt;It seems it might be a competing windows process scheduled to start at 07:00, as we have seen this a number of times at exactly 07:00.&lt;/P&gt;
&lt;P&gt;We have 32Gb Ram on the VM with 8Gb Paging File size&amp;nbsp; and Gigabytes of free disk space.&lt;/P&gt;
&lt;P&gt;I have previously adjusted my 'common settings' to:&lt;/P&gt;
&lt;DIV&gt;"common_settings": {&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; "stream_buffers_number": 8,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; "stream_buffer_size": 40,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can ask for the virtual memory to be increased.&lt;/P&gt;
&lt;P&gt;I'm concerned that by just increasing the virtual memory, it may just go wrong again once that limit is reached.&lt;/P&gt;
&lt;P&gt;Guidance please?&lt;/P&gt;
&lt;P&gt;Ian&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 13:31:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Out-of-Virtual-Memory/m-p/2104550#M7025</guid>
      <dc:creator>IanM</dc:creator>
      <dc:date>2023-08-10T13:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Out of Virtual Memory</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Out-of-Virtual-Memory/m-p/2104592#M7026</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/137694"&gt;@IanM&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Welcome to Qlik Community forum and thanks for reaching out here.&lt;/P&gt;
&lt;P&gt;In general, Qlik Replicate fully utilizes the memory for data processing, certainly it depends on tasks settings and the server memory resources. Let's focus on a single task first; if there are multiple tasks running in parallel on the same server, then they share the CPU/Memory/HDD space etc resources and they may impact each other.&lt;/P&gt;
&lt;P&gt;In your scenario, when the huge transaction (around 4.5Mil changes) start, Replicate will start getting the changes (by reading Oracle redo log) and try to cache the changes (chunk by chunk) in memory to wait for submit, or rollback transaction flag. If the current allocated memory is insufficient to hold the transaction then Replicate will ask for additional memory allocation: If there are enough memory to allocate to Replicate, then keep the change data in memory; Repeat above step until the memory allocation reached task memory setting "&lt;FONT face="courier new,courier"&gt;Total transactions memory size exceeds&lt;/FONT&gt;", then the data will be offload from memory to harddisk, see &lt;A title="Transaction Offload Tuning" href="https://help.qlik.com/en-US/replicate/May2023/Content/Global_Common/Content/SharedEMReplicate/Customize%20Tasks/tasks_applychangtunestab.htm#Change%20Processing%20Tuning:~:text=Offload%20transaction%20in,is%201000." target="_blank" rel="noopener"&gt;Transaction Offload Tuning&lt;/A&gt;.&lt;BR /&gt;However while OS trying to allocate more memory to Replicate this time, there are no available memory for allocate, we got 'Windows - Out of Virtual Memory'.&lt;/P&gt;
&lt;P&gt;Looks to me the 32G RAM with Gigabytes of HDD are insufficient for so high CDC throughput and big transaction. This is the &lt;A title="Recommended hardware configuration" href="https://help.qlik.com/en-US/replicate/May2023/Content/Replicate/Main/Installation/Recommended_Hardware_Configuration.htm#Recommended%20hardware%20configuration:~:text=64%20GB,the%20source%20system" target="_blank" rel="noopener"&gt;Recommended hardware configuration&lt;/A&gt;, Extra-Large system or more powerful server is highly recommended.&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2023 14:50:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Out-of-Virtual-Memory/m-p/2104592#M7026</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2023-08-10T14:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Out of Virtual Memory</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Out-of-Virtual-Memory/m-p/2104708#M7029</link>
      <description>&lt;P&gt;The error&amp;nbsp; generates from Windows itself being asked too much, which may or might not be due the Replicate configurations.&lt;/P&gt;
&lt;P&gt;Clearly, at least for the short while the active processes needed more than 32GB + 8GB = 40 GB. It could be this was due to allowing the Replicate tasks to grow too big, for example the "Task settings - Change Processing Tuning -&amp;nbsp;&lt;SPAN&gt;Force apply a batch when processing memory exceeds (MB): " has a direct effect on the memory you allow replicate tasks to allocate.&amp;nbsp; Similarly Full Load Tuning - "Maximum number of tables" times "Commit rate during full load:" if you go silly there, the system will behave silly as requested.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;That 8GB swapspace is sort of a reserve or overflow area which could simply be increase to also be for example 32 GB. If you dip into that, then you may find that the system will just slow down dramatically instead of programs crashing out when using disks instead of memory. Better perhaps, but not great. Best is to control (limit) the programs themselves or the number/type of programs requested to run at the same time.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best is to work with your Server Manager to have a look at which process uses what memory leading up to the problem moment. &lt;STRONG&gt;They may have specialist tools with historic usage views available,&lt;/STRONG&gt; or they may use Windows primitive like "tasklist | sort /+64 " or&amp;nbsp; "Get-WmiObject Win32_Process".&amp;nbsp; Examples of both usages below.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Hein.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CMD - as administrator 
C:\scripts&amp;gt;tasklist | sort /+64

System Idle Process              0 Services                   0          8 K
smss.exe                       404 Services                   0        380 K
SystemSettings.exe            5312 Console                    1        516 K
:
repctl.exe                   15488 Services                   0    177,420 K
:
chrome.exe                    1736 Console                    1    456,792 K
sqlservr.exe                  6312 Services                   0    501,672 K
chrome.exe                    2160 Console                    1    535,064 K
chrome.exe                    8184 Console                    1    746,148 K
Image Name                     PID Session Name        Session#    Mem Usage
oracle.exe                    6184 Services                   0  1,607,756 K
========================= ======== ================ =========== ============

PowerShell as Adminstrator:

PS C:\scripts&amp;gt; ./vm

  Pid HEINV-LPW10 2023-08-10 15:41:28 Elapsed(s) CPU(s)    Reads Writes VM(MB) WS(MB)
  --- ------------------------------- ---------- ------    ----- ------ ------ ------
 8352 C:\Program Files\Attunity\Repl     4566359   2070     7335     57    782    133
 3168 C:\Program Files\Attunity\Repl     4566351   3481 30509240   1272    357     68
15488 Oracle_to_Oracle 127.0.0.1:355      510645    110    81700  29553    464    173

Notice the Working Set (actually in memory) for the single Replicate Task
on this server pid=15488 reported by both as about 170MB. 
The Powershell script also shows the Virtual Memory reserved by the task
That is 464 MB, a lot more than the Working Set.

Script itself:

PS C:\scripts&amp;gt; type vm.ps1
$tmp = $env:COMPUTERNAME + ' ' + (Get-Date -Format "yyyy-MM-dd HH:mm:ss")
Get-WmiObject Win32_Process -filter "name like 'rep%.exe'" | Format-Table -AutoSize @{Label="Pid"; Expression={$_.ProcessId}},
 @{ label=$tmp; expression={ (($_.CommandLine -replace("^.*?reptasksrv","")) + ' '*30 ).substring(1,30) }},
# @{ label=$tmp; expression={ (($_.CommandLine).substring(1,60) )}},
 @{ Label="Elapsed(s)"; Expression={[math]::floor((New-TimeSpan $_.ConvertToDateTime($_.CreationDate)).TotalSeconds)}},
 @{ Label="CPU(s)"; Expression={[math]::floor(($_.UserModeTime + $_.KernelModeTime) / 10000000)}},
 @{ Label="Reads"; Expression={$_.ReadOperationCount}},
 @{ Label="Writes"; Expression={$_.WriteOperationCount}},
 @{ Label="VM(MB)"; Expression={[math]::floor($_.VM/1048576)}},
 @{ Label="WS(MB)"; Expression={[math]::floor($_.WS/1048576)}}

&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 13:38:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Out-of-Virtual-Memory/m-p/2104708#M7029</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2023-08-14T13:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Out of Virtual Memory</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Out-of-Virtual-Memory/m-p/2104815#M7033</link>
      <description>&lt;P&gt;Thanks John. I will request increase to 64Gb Ram.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 07:34:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Out-of-Virtual-Memory/m-p/2104815#M7033</guid>
      <dc:creator>IanM</dc:creator>
      <dc:date>2023-08-11T07:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Out of Virtual Memory</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Out-of-Virtual-Memory/m-p/2104818#M7034</link>
      <description>&lt;P&gt;Many thanks Hein, I will pass this info on to our support team.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 07:36:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Out-of-Virtual-Memory/m-p/2104818#M7034</guid>
      <dc:creator>IanM</dc:creator>
      <dc:date>2023-08-11T07:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Out of Virtual Memory</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Out-of-Virtual-Memory/m-p/2105493#M7045</link>
      <description>&lt;P&gt;As an update - we have found the issue and am posting here as it may help someone else.&lt;/P&gt;
&lt;P&gt;Our windows VM support team was able to wind back their monitoring software to 07:00 on the day of the issue and could see all available memory was taken. 838Mb by Replicate, but 23Gb by a process called tracerpt.exe.&lt;/P&gt;
&lt;P&gt;Tracerpt appears to be an automated report generating tool looking at the windows system logs.&lt;/P&gt;
&lt;P&gt;So we had a look at the logs (Event Viewer:&amp;nbsp; Windows &amp;gt; System) and there was a repeating 'Service Control Manager' error every 30 seconds.&lt;/P&gt;
&lt;P&gt;The error was 'Attunity Replicate Console Service' reporting that it could not start and would try again in 30 seconds.&lt;/P&gt;
&lt;P&gt;Bearing in mind that Qlik Replicate hasn't used the 'Attunity' name for quite a few upgrades, this repeating error must have been going on for well over a year, every 30 seconds.&lt;/P&gt;
&lt;P&gt;It appears the Replicate upgrade failed to fully remove the previous service.&lt;/P&gt;
&lt;P&gt;So we believe the Tracerpt was trying to compile a report and used the 23Gb RAM. This was in competition with Replicate trying to deal with our non-committed 'long running transaction', causing Replicate to fail.&lt;/P&gt;
&lt;P&gt;We have increased the RAM as a precaution, Disabled the 'auto re-start' on the 'Attunity Replicate Console Service' and also requested that the windows system logs are deleted or archived as soon as possible.&lt;/P&gt;
&lt;P&gt;Re-test scheduled..&lt;/P&gt;</description>
      <pubDate>Mon, 14 Aug 2023 11:15:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Out-of-Virtual-Memory/m-p/2105493#M7045</guid>
      <dc:creator>IanM</dc:creator>
      <dc:date>2023-08-14T11:15:40Z</dc:date>
    </item>
  </channel>
</rss>

