Open Closed

PERFORMANCE ISSUE! 5.* version migration #2767


User avatar
0
Buckoge created
  • ABP Framework version: v5.1.3
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Database: PostgreSQL 13

So far, I have successfully solved everything through documentation or through posts, now i need your help so I can upgrade to the new version

Example 4.4.4

As you can see in the picture, the loading time is 3.18 s

Example 5.1.3

As you can see in the picture, the loading time is 10.77 s

Steps taken during migration:

  1. Changed the version of each project from 5 to 6 (after this when I start the application the speed is the same)
  2. Run abp update command
  3. Run abp install-libs
  4. Upgrade all nuget packages
  5. add-migration and update-database

I only have two changes to the code and they are:

  1. In: App.Domain/IdentityServer/IdentityServerDataSeedContributor.cs:

from var apiScope = await _apiScopeRepository.GetByNameAsync(name); to var apiScope = await _apiScopeRepository.FindByNameAsync(name);

  1. in: AppWebModule i added because of postgresql:

Configure<AbpClockOptions>(options => { options.Kind = DateTimeKind.Utc; });

I saw that you had this problem: https://support.abp.io/QA/Questions/2303/ABP-50---very-slow-when-using-the-Startup-Template

Maybe it is something like that ...

Do you have any idea to direct me where and what to look for?

Maybe to send you log files?

Since this is my first question after one year of development in the abp, I want to say all the positive impression of using abp. In 7 months we have developed the application and we have been live for 5 months now. Thanks


23 Answer(s)
  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    Hello,

    Did you check 5.0 migration guide?

  • User Avatar
    0
    Buckoge created

    Hi,

    Yes I changed everything few months ago as in the description for query: https://docs.abp.io/en/abp/latest/Migration-Guides/Abp-4_2#irepository-getqueryableasync

    For bootstrap 5 I haven't changed there are small changes, example: Renamed .float-left and .float-right to .float-start and .float-end.

    If you think it affects, I can change it and let you know.

    I didn't notice that I needed something else in the migration. Did I miss something?

  • User Avatar
    0
    Buckoge created

    Three days there is no answer?

    Are you checking anything on this?

    These values ​​that I have shown you are in my local environment.

    At customer in their live environment currently opens a window in 5 seconds (version 4) main window, and with the new version 5 over 15 seconds.

    This is a big difference between versions 4 and 5. I think if not better at least the performance should be the same.

    I fixed bootstrap 5 and the time is the same as in the pictures.

    Can you help me solve this?

  • User Avatar
    0
    Dicky.tech@gmail.com created

    Have been experiencing significant performance issues since I moved to abp 5. When I used abp 3.2 everything was fast.

    In .net 5 when my api get 20 api calls, iis cpu hits 100 %

    Note: I created a new project for abp 5.1

  • User Avatar
    0
    Buckoge created

    This is blocking issue for me, i can't upgrade abp to new version.

    Is support included in my license? Can you help me or not?

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Hi @Buckoge

    So far, I have successfully solved everything through documentation or through posts, now i need your help so I can upgrade to the new version

    Example 4.4.4

    As you can see in the picture, the loading time is 3.18 s

    Example 5.1.3

    As you can see in the picture, the loading time is 10.77 s

    As an answer to performance issues, we can't say anything according to this comparison. Request-response time can be affected by many things including network bandwidth or server throughput or etc.

    If you have any benchmark result that clearly shows the problem is related with ABP Framework, then we can take some action. Otherwise, we never know where the problem is.

  • User Avatar
    0
    alper created
    Support Team Director

    to be able to help you, you need to specify concrete issues with screenshots, logs, reproducible steps but you mention a wide topic that involves checking your custom project and its consultancy work. one team member should work on your project.

  • User Avatar
    0
    Dicky.tech@gmail.com created

    It appears my problem is related to add the background tasks on the application service project instead of a separate project.

    Any guide/ sample on how to have the background workers on a separate project in .net 5 ?

  • User Avatar
    0
    Buckoge created

    Hello guys,

    I just made a simple test project with abp cli version 4 and upgrade it to version 5. I created models with abp suite.

    Here are the links to the public GitHub repositories:

    Link 1: AbpPerformanceTest4

    Link 2: AbpPerformanceTest5

    Steps:

    1. Clone both repositories (or upgrade 4 to version 5)
    2. Run migration
    3. In app run:
    4. Compare loading time in both projects and see results

    In my opinion those results clearly show that the performance problem is related to ABP Framework upgrade to version 5

  • User Avatar
    0
    alper created
    Support Team Director

    thanks for sharing the repos. one question: did you install Redis on your computer? if not install and test again

  • User Avatar
    0
    Buckoge created

    Hi Albert,

    No, I didn't have a Redis installed.

    I took the following steps: in app add package and connection string: https://docs.abp.io/en/abp/5.2/Redis-Cache

    I installed: https://github.com/microsoftarchive/redis/releases https://redis.io/download/#redis-stack-downloads

    In RedisInsight i add redis database

    Can you send me some link on how to connect the abp app with redis?

  • User Avatar
    0
    Radoslav created

    I am not sure if redis will really improve the performance that much (depending on what is being cached and how much data your are storing in redis). This is how it is being configured and added.

    https://github.com/abpframework/eShopOnAbp/blob/main/services/basket/src/EShopOnAbp.BasketService/appsettings.json "Redis": { "Configuration": "localhost:6379" },

    https://github.com/abpframework/eShopOnAbp/blob/main/shared/EShopOnAbp.Shared.Hosting.Microservices/EShopOnAbpSharedHostingMicroservicesModule.cs

    var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
    context.Services
        .AddDataProtection()
        .PersistKeysToStackExchangeRedis(redis, "EShopOnAbp-Protection-Keys");
    
  • User Avatar
    0
    Buckoge created

    Thanks Radoslav for the example

    I successfully connected Redis, but unfortunately there are no changes in performance.

    For performance everything is ok without Redis in version 4. Is it is possible to see why there are differences in version 5 and is it is possible to adjust it as in version 4?

  • User Avatar
    0
    alper created
    Support Team Director

    do you have the same issue when you create a brand new ABP 4 and ABP 5? this will lead us to understand if it's directly related to ABP otherwise we need to focus on your custom config and code.

  • User Avatar
    0
    alper created
    Support Team Director

    you can create a project from a specific version. see https://docs.abp.io/en/abp/latest/CLI-New-Command-Samples#create-a-solution-from-a-specific-version

  • User Avatar
    0
    Buckoge created

    Yes the same differences appeared during the new project

    and yes i created the project via cli, this is how i created a test project and just used abp suite, and then update to 5, as I share in repos

    abp new AbpPerformanceTest -u mvc --mobile none --version 4.4.4 --database-management-system PostgreSQL -csf --connection-string Host=localhost;Database=AbpPerformanceTest;Port=5432;

  • User Avatar
    0
    alper created
    Support Team Director

    ok, this is good feedback, as your test result, the brand new ABP 4 and 5 are different in performance. @maliming can you please check this situation.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please do not publish the source code of the abp commercial project in Github, you can set it to private

    I already downloaded the projects. Will check asap.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    I tested your two apps. They are not much different on my machine .

    AbpPerformanceTest4:

    AbpPerformanceTest5:

  • User Avatar
    0
    Buckoge created

    The page index is ok, the difference is when loading edit page.

    Can you add one item (new test model) and try again (actions than edit button).

    Ok, I'll remove both projects from Github

  • User Avatar
    0
    Buckoge created

    Hi great news,

    I just upgraded to 5.2 and everything works much faster, even faster than in version 4 :-)

    There must have been something that is changed in this version

    Now I will update my project and let you know the results

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Glad to hear this

  • User Avatar
    0
    alper created
    Support Team Director

    I'm happy that the latest stable version is faster than the previous versions thanks to the team!

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11