Ruby on rails 为什么脱轨的基准在不同的系统中显示不同的值?如何改进ruby gem的内存分配?

Ruby on rails 为什么脱轨的基准在不同的系统中显示不同的值?如何改进ruby gem的内存分配?,ruby-on-rails,ruby,gem,benchmarking,Ruby On Rails,Ruby,Gem,Benchmarking,我安装gem是为了检查gem的内存使用情况。我也使用个人宝石 当我执行命令时: $ bundle exec derailed bundle:objects 我在不同的系统中获得不同的内存值: Measuring objects created by gems in groups [:default, "production"] Total allocated 433895 Total retained 100556 allocated memory by gem -------------

我安装gem是为了检查gem的内存使用情况。我也使用个人宝石

  • 当我执行命令时:

    $ bundle exec derailed bundle:objects 
    
    我在不同的系统中获得不同的内存值:

    Measuring objects created by gems in groups [:default, "production"]
    Total allocated 433895
    Total retained 100556
    
    allocated memory by gem
    -----------------------------------
    24369241  activesupport-4.2.1
    15560550  mime-types-2.4.3
    8103432  json-1.8.2
    2170435  My-gem 0.1.0
    
  • 假设我的gem的内存对象值很高。我需要做些什么来减少这一点