首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >针对低性能硬件优化spring boot

针对低性能硬件优化spring boot
EN

Stack Overflow用户
提问于 2021-08-02 14:41:01
回答 1查看 264关注 0票数 3

我想为一个低性能的硬件优化一个Spring引导。我只是将JDBC用于SqlLite数据库。看起来一开始就浪费了5分钟,我不确定在哪里或者为什么。如果有人有什么建议的话。我看到了其他的想法,但我不确定它是否适用于我的情况,我的表现是覆盆子Pi 1。

代码语言:javascript
复制
  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.3.2.RELEASE)
2021-08-02 14:18:55.075  INFO 24149 --- [           main] com.app.AppGatewayApplication  : Starting AppGatewayApplication v0.0.1-SNAPSHOT with PID 24149 (/opt/app/app.jar started by root in /opt/app)
**2021-08-02 14:18:55.261  INFO 24149 --- [           main] com.app.AppGatewayApplication  : No active profile set, falling back to default profiles: default
2021-08-02 14:22:46.915  WARN 24149 --- [           main] io.undertow.websockets.jsr               : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used**
2021-08-02 14:22:51.668  INFO 24149 --- [           main] io.undertow.servlet                      : Initializing Spring embedded WebApplicationContext
2021-08-02 14:22:51.671  INFO 24149 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 230771 ms
2021-08-02 14:23:37.337  INFO 24149 --- [           main] o.f.c.internal.license.VersionPrinter    : Flyway Community Edition 6.5.5 by Redgate
2021-08-02 14:23:45.163  INFO 24149 --- [           main] o.f.c.internal.database.DatabaseFactory  : Database: jdbc:sqlite:data/app.db (SQLite 3.32)
2021-08-02 14:23:49.716  INFO 24149 --- [           main] o.f.core.internal.command.DbValidate     : Successfully validated 19 migrations (execution time 00:02.585s)
2021-08-02 14:23:49.962  INFO 24149 --- [           main] o.f.core.internal.command.DbMigrate      : Current version of schema "main": 1.1.19
2021-08-02 14:23:50.027  INFO 24149 --- [           main] o.f.core.internal.command.DbMigrate      : Schema "main" is up to date. No migration necessary.
2021-08-02 14:23:51.952  INFO 24149 --- [           main] com.app.repository.e                     :  Connection  - - - - - - - -  New DBConnection created
EN

回答 1

Stack Overflow用户

发布于 2021-08-02 19:00:31

除非您知道造成时间损失的原因,否则很难提高性能。

因此,我将首先增加日志级别,以了解在此期间到底发生了什么。一旦明确了这一点,您就可以考虑如何提高性能了。

此外,从2.4版开始,Spring Boot提供了一些方法来了解在服务启动期间发生了什么,以及每一步需要多长时间。例如,您可以在这里找到一些关于如何将此监视构建到您的服务中的提示:https://www.amitph.com/spring-boot-startup-monitoring/

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68623531

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档