1

To increase my ETL performance, I have enabled "AutoAdjustBufferSize" property on my data flow tasks. However, it is not allocating enough buffer to the memory I need.

Check out what SSIS tells me...

Information: The buffer manager failed a memory allocation call for 1954545664 bytes, but was unable to swap out any buffers to relieve memory pressure. 2 buffers were considered and 2 were locked. Either not enough memory is available to the pipeline because not enough are installed, other processes were using it, or too many buffers are locked.

Information: Buffer manager allocated 1864 megabyte(s) in 1 physical buffer(s).

Error: The system reports 36 percent memory load. There are 34156761088 bytes of physical memory with 21535158272 bytes free. There are 4294836224 bytes of virtual memory with 1996070912 bytes free. The paging file has 39257034752 bytes with 24542248960 bytes free.

Several questions on this:

  1. Why are there only 2 buffers allows here? (max buffer rows is set to 1048576)
  2. Why does it say BOTH that it allocated the same bytes that it says it couldn't allocate?

To note:

  • It works when I manually set the buffer row size to the default (104857360)
  • All development and source data files live on a network server. I'm using visual studio in my local computer to access the development/source files
4

2 回答 2

1

我不同意@Ferdipux 的“绕过最大缓冲区大小和最大缓冲区行指定的上限”的说法。它绕过最大缓冲区大小,但不绕过最大缓冲区行数。

我将引用官方的MS 声明

数据流引擎通过计算单行数据的估计大小开始调整其缓冲区大小的任务。然后它将行的估计大小乘以 DefaultBufferMaxRows 的值,以获得缓冲区大小的初步工作值。如果 AutoAdjustBufferSize 设置为 true,引擎数据流引擎将计算的值作为缓冲区大小,而忽略 DefaultBufferSize 的值。

基于同一站点,最大 SSIS 缓冲内存为 2GB。您的消息说 2 个缓冲区,可能是因为您有 2 个任务。这意味着每个任务可以有 1GB 的最大缓冲区。

您必须计算行大小(请参阅此博客),并在此基础上确定您的最大行数。从外观上看,你的桌子很宽。

例如:
您的行大小是 1000 字节。
2147483647 / 1000 字节 = 2147483.647
2147483.647 / 2 个任务 = 1073741.8235
所以为了安全起见,将其四舍五入到 1 070 000 行。

于 2020-03-05T17:05:23.423 回答
0

SSIS 告诉您它遇到了 RAM 压力,请求 19+ GB 的 RAM 无济于事,然后尝试换出一些使用的缓冲区。但是,从现有的 2 个缓冲区中,所有 2 个缓冲区都已使用/锁定,并且无法换出。
原因可能是您的设置AutoAdjustBufferSize=true,它允许非常广泛地增长数据流缓冲区,绕过由最大缓冲区大小最大缓冲区行设置指定的上限。这就是缓冲区增长超出限制的原因。这样做的主要目的是以更高的 RAM 利用率为代价来加速数据处理。当您的数据可以通过数据流任务快速流动时没关系,但如果不是这种情况 - 您可能会收到上面提到的错误消息。
推荐 - 集AutoAdjustBufferSize=false并试验不会产生此类错误的缓冲区大小。

于 2019-12-28T13:39:27.923 回答