Created
October 2, 2015 16:44
-
-
Save akrzos/71d563f0eb08d8eb9ad3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@localhost vmdb]# bundle exec bin/rails c | |
Loading production environment (Rails 4.2.4) | |
irb(main):001:0> mrss_start = MiqProcess.processInfo()[:memory_usage] | |
=> 175747072 | |
irb(main):002:0> GC.stat | |
=> {:count=>65, :heap_allocated_pages=>2284, :heap_sorted_length=>2293, :heap_allocatable_pages=>0, :heap_available_slots=>930949, :heap_live_slots=>893888, :heap_free_slots=>37061, :heap_final_slots=>0, :heap_marked_slots=>357292, :heap_swept_slots=>355709, :heap_eden_pages=>2284, :heap_tomb_pages=>0, :total_allocated_pages=>2728, :total_freed_pages=>444, :total_allocated_objects=>6976853, :total_freed_objects=>6082965, :malloc_increase_bytes=>1649152, :malloc_increase_bytes_limit=>16777216, :minor_gc_count=>1, :major_gc_count=>64, :remembered_wb_unprotected_objects=>18453, :remembered_wb_unprotected_objects_limit=>19520, :old_objects=>322586, :old_objects_limit=>476797, :oldmalloc_increase_bytes=>1649600, :oldmalloc_increase_bytes_limit=>16777216} | |
irb(main):003:0> e = ExtManagementSystem.find_by_name('vmware-small') | |
ExtManagementSystem Inst Including Associations (108.7ms - 1rows) | |
=> #<ManageIQ::Providers::Vmware::InfraManager id: 1, name: "vmware-small", port: nil, hostname: "10.12.20.65", ipaddress: nil, created_on: "2015-10-02 16:29:02", updated_on: "2015-10-02 16:29:02", guid: "b0ee104c-6922-11e5-b84f-0001a4ae710c", zone_id: 1, type: "ManageIQ::Providers::Vmware::InfraManager", api_version: nil, uid_ems: nil, host_default_vnc_port_start: nil, host_default_vnc_port_end: nil, provider_region: nil, last_refresh_error: nil, last_refresh_date: nil, provider_id: nil, security_protocol: nil, realm: nil, tenant_id: nil> | |
irb(main):004:0> timing = Benchmark.realtime {EmsRefresh.refresh e} | |
MiqServer Inst Including Associations (27.5ms - 1rows) | |
... | |
VmOrTemplate Inst Including Associations (10.9ms - 100rows) | |
=> 17.826855113999954 | |
irb(main):005:0> mrss_end = MiqProcess.processInfo()[:memory_usage] | |
=> 275668992 | |
irb(main):006:0> GC.stat | |
=> {:count=>75, :heap_allocated_pages=>4037, :heap_sorted_length=>4111, :heap_allocatable_pages=>0, :heap_available_slots=>1645484, :heap_live_slots=>1484057, :heap_free_slots=>161427, :heap_final_slots=>0, :heap_marked_slots=>817836, :heap_swept_slots=>312844, :heap_eden_pages=>4021, :heap_tomb_pages=>16, :total_allocated_pages=>4483, :total_freed_pages=>446, :total_allocated_objects=>13506073, :total_freed_objects=>12022016, :malloc_increase_bytes=>10894864, :malloc_increase_bytes_limit=>19993962, :minor_gc_count=>1, :major_gc_count=>74, :remembered_wb_unprotected_objects=>29784, :remembered_wb_unprotected_objects_limit=>26805, :old_objects=>754719, :old_objects_limit=>679248, :oldmalloc_increase_bytes=>10895312, :oldmalloc_increase_bytes_limit=>16777216} | |
irb(main):007:0> mrss_change = mrss_end - mrss_start | |
=> 99921920 | |
irb(main):008:0> puts "#{mrss_start}, #{mrss_end}, #{mrss_change}" | |
175747072, 275668992, 99921920 | |
=> nil | |
irb(main):009:0> puts Process.pid | |
35707 | |
=> nil | |
irb(main):010:0> timing |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment