Your performance issue appears to be podman startup cost. Performance tuning podman is outside the scope of this forum.
.Net 6/8 WebApi take long time to start
I compile this simple project and run it in Linux bash is normal.
But when I create service file to run this program, it take almost 2 minute to start. The same as in Podman.
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapGet("/", () => "HelloWorld");
app.Run();
Update 2024/07/01
HELP! HELP! HELP!
I found the reason. But nothing can do~
I have mounted a SMB folder from Windows, this folder has a large number of folders and files.
[/etc/fstab: //ip/depot /mnt/depot cifs username=xxx,password=xxx,_netdev 0 0 ]
Run this WebApi program in bash is normal. But I start the service[systemctl start webapi], got the PID number and strace the PID. I found that this program is traversing all the directories in the folder。It took nearly 2 minutes until the scan was completed。
I have test Linux kernel > 5.x, e.g RokcyLinux 9.x, openEuler24.03, Anolis 8.9(ANCK) .