2

观察到 GluonTS 深度状态时间序列模型在不同操作系统中的表现不同。在 Mac OS(四核、物理 VM、intel i7 @2.3 GHz)上的 docker 容器上运行时,预测需要大约 3 秒;此函数在 Linux 操作系统上的 docker 容器上运行时大约需要 8 秒(仅 4 CPU,VM,intel Broadwell @2.19 GHz);同样的功能在 kubernetes 集群(分配有 16 个 CPU、VM、BM.standard2.52)上运行时大约需要 20 秒。在此期间监视 CPU / 内存时,可以观察到程序正在尝试消耗所有分配的 CPU,同时最少地占用内存和页面文件。我在 Linux 环境中运行 cProfile,下面是分析器的简短输出。我了解 mxnet 带有不同的库来支持不同的操作系统。mxnet 性能是否存在任何已知问题?如何最好地确定性能问题。

        1    0.000    0.000    7.819    7.819 /usr/local/lib/python3.7/site-packages/xxxxxx/forecast/forecast_client.py:26(predict)
        1    0.000    0.000    7.801    7.801 /usr/local/lib/python3.7/site-packages/xxxxxx/forecaster.py:8(predict)
        2    0.000    0.000    7.801    3.900 /usr/local/lib/python3.7/site-packages/gluonts/mx/model/predictor.py:157(predict)
        2    0.000    0.000    7.800    3.900 /usr/local/lib/python3.7/site-packages/gluonts/model/forecast_generator.py:113(__call__)
        1    0.000    0.000    7.786    7.786 /usr/local/lib/python3.7/functools.py:835(wrapper)
        1    0.000    0.000    7.786    7.786 /usr/local/lib/python3.7/site-packages/gluonts/mx/model/predictor.py:61(_)
   5901/1    0.029    0.000    7.785    7.785 /usr/local/lib/python3.7/site-packages/mxnet/gluon/block.py:688(__call__)
   5901/1    0.075    0.000    7.785    7.785 /usr/local/lib/python3.7/site-packages/mxnet/gluon/block.py:1127(forward)
        1    0.001    0.001    7.764    7.764 /usr/local/lib/python3.7/site-packages/gluonts/model/deepstate/_network.py:216(hybrid_forward)
    89852    3.323    0.000    4.976    0.000 /usr/local/lib/python3.7/site-packages/mxnet/_ctypes/ndarray.py:80(_imperative_invoke)
        2    0.000    0.000    4.301    2.151 /usr/local/lib/python3.7/site-packages/gluonts/model/deepstate/_network.py:102(compute_lds)
        2    0.002    0.001    4.239    2.119 /usr/local/lib/python3.7/site-packages/mxnet/gluon/rnn/rnn_cell.py:803(unroll)
        4    0.010    0.003    4.226    1.057 /usr/local/lib/python3.7/site-packages/mxnet/gluon/rnn/rnn_cell.py:195(unroll)
5880/2352    0.021    0.000    4.162    0.002 /usr/local/lib/python3.7/site-packages/mxnet/gluon/rnn/rnn_cell.py:287(forward)
     2352    0.019    0.000    3.939    0.002 /usr/local/lib/python3.7/site-packages/mxnet/gluon/rnn/rnn_cell.py:958(hybrid_forward)
        1    0.001    0.001    2.847    2.847 /usr/local/lib/python3.7/site-packages/gluonts/mx/distribution/lds.py:201(log_prob)
        1    0.024    0.024    2.840    2.840 /usr/local/lib/python3.7/site-packages/gluonts/mx/distribution/lds.py:238(kalman_filter)
     2352    0.085    0.000    2.313    0.001 /usr/local/lib/python3.7/site-packages/mxnet/gluon/rnn/rnn_cell.py:527(hybrid_forward)
      672    0.041    0.000    2.290    0.003 /usr/local/lib/python3.7/site-packages/gluonts/mx/distribution/lds.py:581(kalman_filter_step)
     1176    0.007    0.000    1.383    0.001 /usr/local/lib/python3.7/site-packages/mxnet/gluon/rnn/rnn_cell.py:988(hybrid_forward)
     2352    0.019    0.000    1.092    0.000 /usr/local/lib/python3.7/site-packages/mxnet/gluon/rnn/rnn_cell.py:969(<listcomp>)
      672    0.026    0.000    0.790    0.001 /usr/local/lib/python3.7/site-packages/gluonts/mx/distribution/multivariate_gaussian.py:73(log_prob)
    89852    0.403    0.000    0.760    0.000 /usr/local/lib/python3.7/site-packages/mxnet/ndarray/register.py:75(_verify_all_legacy_ndarrays)
     4704    0.020    0.000    0.740    0.000 /usr/local/lib/python3.7/site-packages/mxnet/gluon/rnn/rnn_cell.py:961(<lambda>)
    10249    0.052    0.000    0.666    0.000 <string>:2(linalg_gemm2)

关于环境:

  • 蟒蛇3.7
  • 胶凝剂 0.6.1
  • MXNET 1.6.0
4

0 回答 0