[jira] [Commented] (HBASE-20268) It takes more than 15 seconds to bring up hbase shell
[ https://issues.apache.org/jira/browse/HBASE-20268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16417711#comment-16417711 ] Mike Drob commented on HBASE-20268: --- Spent time digging into this, we have about 5 seconds of starting the JVM, 5 seconds of starting the IRB, and 5 seconds of everything else. Unfortunately, I wasn't able to make much progress on either front. Leaving this wiki page here for now https://github.com/jruby/jruby/wiki/Improving-startup-time > It takes more than 15 seconds to bring up hbase shell > - > > Key: HBASE-20268 > URL: https://issues.apache.org/jira/browse/HBASE-20268 > Project: HBase > Issue Type: Improvement > Components: shell >Affects Versions: 2.0.0-alpha-4 >Reporter: huaxiang sun >Assignee: Mike Drob >Priority: Major > > On a hbase 2.0 based cluster, it takes more than 15 seconds to bring up hbase > shell. > Output: > {noformat} > # [root@hsun-1 ~]# echo exit | time /usr/java/default/bin/java -jar > /opt/cloudera/parcels/CDH/jars/jruby-complete-9.1.10.0.jar -S irb > # Switch to inspect mode. > # exit > # 9.81user 0.30system 0:03.59elapsed 281%CPU (0avgtext+0avgdata > 308672maxresident)k > # 0inputs+776outputs (0major+79787minor)pagefaults 0swaps > # > # [root@hsun-1 ~]# echo exit | time hbase shell > # Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is > deprecated and will likely be removed in a future release > # HBase Shell > # Use "help" to get list of supported commands. > # Use "exit" to quit this interactive shell. > # Version 2.0.0-cdh6.0.x-SNAPSHOT, rUnknown, Thu Mar 22 12:30:22 PDT 2018 > # Took 0.0040 seconds > # exit > # 33.92user 1.20system 0:15.21elapsed 230%CPU (0avgtext+0avgdata > 360928maxresident)k > # 0inputs+1064outputs (0major+176658minor)pagefaults 0swaps > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HBASE-20268) It takes more than 15 seconds to bring up hbase shell
[ https://issues.apache.org/jira/browse/HBASE-20268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16412208#comment-16412208 ] Mike Drob commented on HBASE-20268: --- I have good news and bad news here... Looks like ~35 sec of that was from {{@hbase = Hbase::Hbase.new}} in {{bin/hirb.rb}}, creating a connection. Except after I start an HBase locally, because I didn't have one running before, the whole time cuts down to ~9 seconds, which is still slow but bearable. I went ahead and borrowed your cluster (hope you don't mind!) and added {{export JRUBY_OPTS=--profile}} and tried running things again. {code} main profile results: Total time: 12.36 totalselfchildren calls method 5.915.910.00 343 File.file? 5.620.005.62 1 IRB.start 5.460.005.46 1 IRB.setup 5.440.005.44 2 IRB::Locale#load 5.420.005.42 2 IRB::Locale#find 5.420.005.42 2 IRB::Locale#search_file 5.420.005.42 2 IRB::Locale#each_localized_path 5.420.005.41 2 IRB::Locale#each_sublocale 5.280.075.20 420 Class#new 5.150.005.15 9 Gem.try_activate 5.150.005.15 9 Gem::Specification.find_by_path 4.890.014.88 14 Enumerable.find 4.860.014.85 108 Gem::BasicSpecification#contains_requirable_file? 4.850.014.85 108 Gem::BasicSpecification#have_file? 4.840.014.83 228 Array#any? 4.480.044.44 579 Kernel.require 3.190.003.19 1 IRB.init_config 3.190.003.19 1 IRB::Locale#initialize 2.880.112.77 366 Array#each 2.460.002.45 272 Kernel.require 2.390.142.25 27 Kernel.load 2.260.002.26 1 IRB.init_error 1.860.011.85 16 Gem::Specification.load 1.730.001.73 1 Gem::Specification.load_defaults 1.730.001.73 1 Gem::Specification.each_spec 1.730.001.73 1 Gem::Specification.each_gemspec 1.710.001.71 1 Hbase::Hbase#initialize 1.671.670.00 1 Java::OrgApacheHadoopHbaseClient::ConnectionFactory.createConnection 0.670.000.67 1 Object#require_jar 0.670.000.67 1 Jars.require_jar 0.650.000.65 1 Jars.require_jar_with_block 0.650.000.65 1 Jars.do_require 0.630.000.63 1 Jars.home 0.630.000.63 1 Jars.local_maven_repo 0.630.010.62 1 Jars.maven_local_settings 0.620.000.61 13 Shell.load_command_group 0.610.020.59 137 Shell.load_command 0.560.560.00 15 IO.read 0.550.010.55 29 Kernel.gem 0.530.000.53 4 Gem::Dependency#to_spec 0.530.000.53 168 Kernel.send 0.530.000.53 4 Gem::Dependency#to_specs 0.530.000.53 4 Gem::Dependency#matching_specs 0.510.510.00 73 Java::JavaPackage#method_missing 0.480.000.48 16 Array#select 0.480.000.47 10 Gem::Specification.gemspec_stubs_in 0.470.000.47 5 Gem::Specification.default_stubs 0.460.010.45 442 Gem::StubSpecification#data 0.450.000.45 16 Gem::StubSpecification#valid? 0.450.010.44 16 Kernel.open {code} I'll look more at this on Monday. > It takes more than 15 seconds to bring up hbase shell > - > > Key: HBASE-20268 > URL: https://issues.apache.org/jira/browse/HBASE-20268 > Project: HBase > Issue Type: Improvement > Components: shell >Affects Versions: 2.0.0-alpha-4 >Reporter: huaxiang sun >Assignee: Mike Drob >Priority: Major > > On a hbase 2.0 based cluster, it takes more than 15 seconds to bring up hbase > shell. > Output: > {noformat} > # [root@hsun-1 ~]#
[jira] [Commented] (HBASE-20268) It takes more than 15 seconds to bring up hbase shell
[ https://issues.apache.org/jira/browse/HBASE-20268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16412113#comment-16412113 ] Mike Drob commented on HBASE-20268: --- On my local macbook I get ~4 sec with jruby alone and ~45 seconds through the shell against tip of master branch. We're almost certainly doing something extra that causes a terrible user experience here. > It takes more than 15 seconds to bring up hbase shell > - > > Key: HBASE-20268 > URL: https://issues.apache.org/jira/browse/HBASE-20268 > Project: HBase > Issue Type: Improvement > Components: shell >Affects Versions: 2.0.0-alpha-4 >Reporter: huaxiang sun >Assignee: Mike Drob >Priority: Major > > On a hbase 2.0 based cluster, it takes more than 15 seconds to bring up hbase > shell. > Output: > {noformat} > # [root@hsun-1 ~]# echo exit | time /usr/java/default/bin/java -jar > /opt/cloudera/parcels/CDH/jars/jruby-complete-9.1.10.0.jar -S irb > # Switch to inspect mode. > # exit > # 9.81user 0.30system 0:03.59elapsed 281%CPU (0avgtext+0avgdata > 308672maxresident)k > # 0inputs+776outputs (0major+79787minor)pagefaults 0swaps > # > # [root@hsun-1 ~]# echo exit | time hbase shell > # Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is > deprecated and will likely be removed in a future release > # HBase Shell > # Use "help" to get list of supported commands. > # Use "exit" to quit this interactive shell. > # Version 2.0.0-cdh6.0.x-SNAPSHOT, rUnknown, Thu Mar 22 12:30:22 PDT 2018 > # Took 0.0040 seconds > # exit > # 33.92user 1.20system 0:15.21elapsed 230%CPU (0avgtext+0avgdata > 360928maxresident)k > # 0inputs+1064outputs (0major+176658minor)pagefaults 0swaps > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)