[
https://issues.apache.org/jira/browse/HBASE-20268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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
total self children calls method
----------------------------------------------------------------
5.91 5.91 0.00 343 File.file?
5.62 0.00 5.62 1 IRB.start
5.46 0.00 5.46 1 IRB.setup
5.44 0.00 5.44 2 IRB::Locale#load
5.42 0.00 5.42 2 IRB::Locale#find
5.42 0.00 5.42 2 IRB::Locale#search_file
5.42 0.00 5.42 2 IRB::Locale#each_localized_path
5.42 0.00 5.41 2 IRB::Locale#each_sublocale
5.28 0.07 5.20 420 Class#new
5.15 0.00 5.15 9 Gem.try_activate
5.15 0.00 5.15 9 Gem::Specification.find_by_path
4.89 0.01 4.88 14 Enumerable.find
4.86 0.01 4.85 108
Gem::BasicSpecification#contains_requirable_file?
4.85 0.01 4.85 108
Gem::BasicSpecification#have_file?
4.84 0.01 4.83 228 Array#any?
4.48 0.04 4.44 579 Kernel.require
3.19 0.00 3.19 1 IRB.init_config
3.19 0.00 3.19 1 IRB::Locale#initialize
2.88 0.11 2.77 366 Array#each
2.46 0.00 2.45 272 Kernel.require
2.39 0.14 2.25 27 Kernel.load
2.26 0.00 2.26 1 IRB.init_error
1.86 0.01 1.85 16 Gem::Specification.load
1.73 0.00 1.73 1 Gem::Specification.load_defaults
1.73 0.00 1.73 1 Gem::Specification.each_spec
1.73 0.00 1.73 1 Gem::Specification.each_gemspec
1.71 0.00 1.71 1 Hbase::Hbase#initialize
1.67 1.67 0.00 1
Java::OrgApacheHadoopHbaseClient::ConnectionFactory.createConnection
0.67 0.00 0.67 1 Object#require_jar
0.67 0.00 0.67 1 Jars.require_jar
0.65 0.00 0.65 1 Jars.require_jar_with_block
0.65 0.00 0.65 1 Jars.do_require
0.63 0.00 0.63 1 Jars.home
0.63 0.00 0.63 1 Jars.local_maven_repo
0.63 0.01 0.62 1 Jars.maven_local_settings
0.62 0.00 0.61 13 Shell.load_command_group
0.61 0.02 0.59 137 Shell.load_command
0.56 0.56 0.00 15 IO.read
0.55 0.01 0.55 29 Kernel.gem
0.53 0.00 0.53 4 Gem::Dependency#to_spec
0.53 0.00 0.53 168 Kernel.send
0.53 0.00 0.53 4 Gem::Dependency#to_specs
0.53 0.00 0.53 4 Gem::Dependency#matching_specs
0.51 0.51 0.00 73 Java::JavaPackage#method_missing
0.48 0.00 0.48 16 Array#select
0.48 0.00 0.47 10
Gem::Specification.gemspec_stubs_in
0.47 0.00 0.47 5 Gem::Specification.default_stubs
0.46 0.01 0.45 442 Gem::StubSpecification#data
0.45 0.00 0.45 16 Gem::StubSpecification#valid?
0.45 0.01 0.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 ~]# 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)