Very slow container starting

decibel83

Renowned Member
Oct 15, 2008
210
1
83
Hi.

I have a PVE system with about 15 containers.
Containers takes from 2 to 5 minutes to start each container, and one of them takes 12 minutes...

How I can investigate why they takes so long to start?

Thank you very much!
Bye.
 
How much container have in the hard disk size ?

sometimes the verification disk take more than 5 minutes
 
Code:
ve1:~# lspci
00:00.0 Host bridge: Intel Corporation 5520/5500/X58 I/O Hub to ESI Port (rev 13)
00:01.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 1 (rev 13)
00:03.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 3 (rev 13)
00:07.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 7 (rev 13)
00:14.0 PIC: Intel Corporation 5520/5500/X58 I/O Hub System Management Registers (rev 13)
00:14.1 PIC: Intel Corporation 5520/5500/X58 I/O Hub GPIO and Scratch Pad Registers (rev 13)
00:14.2 PIC: Intel Corporation 5520/5500/X58 I/O Hub Control Status and RAS Registers (rev 13)
00:14.3 PIC: Intel Corporation 5520/5500/X58 I/O Hub Throttle Registers (rev 13)
00:1a.0 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #4
00:1a.1 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #5
00:1a.2 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #6
00:1a.7 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #2
00:1c.0 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Root Port 1
00:1c.4 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Root Port 5
00:1c.5 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Root Port 6
00:1d.0 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #1
00:1d.1 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #2
00:1d.2 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #3
00:1d.7 USB Controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #1
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 90)
00:1f.0 ISA bridge: Intel Corporation 82801JIR (ICH10R) LPC Interface Controller
00:1f.2 SATA controller: Intel Corporation 82801JI (ICH10 Family) SATA AHCI Controller
00:1f.3 SMBus: Intel Corporation 82801JI (ICH10 Family) SMBus Controller
02:00.0 VGA compatible controller: nVidia Corporation G98 [GeForce 8400 GS] (rev a1)
03:00.0 RAID bus controller: 3ware Inc 9650SE SATA-II RAID PCIe (rev 01)
06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
07:00.0 FireWire (IEEE 1394): JMicron Technology Corp. IEEE 1394 Host Controller (rev 10)

Code:
ve1:~# cat /proc/cpuinfo
processor       : (from 0 to 7)
vendor_id       : GenuineIntel
cpu family      : 6
model           : 26
model name      : Intel(R) Core(TM) i7 CPU         930  @ 2.80GHz
stepping        : 5
cpu MHz         : 2807.141
cache size      : 8192 KB
physical id     : 0
siblings        : 8
core id         : 0
cpu cores       : 4
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida tpr_shadow vnmi flexpriority ept vpid
bogomips        : 5614.28
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

Code:
ve1:~# free
             total       used       free     shared    buffers     cached
Mem:       8157784    3573848    4583936          0      35856     511232
-/+ buffers/cache:    3026760    5131024
Swap:      7340024     335360    7004664

Code:
ve1:~# w
 10:19:50 up 10 days, 18:19,  1 user,  load average: 5.21, 12.04, 6.33

Code:
ve1:~# pveperf (with all 13 containers running)
CPU BOGOMIPS:      44838.94
REGEX/SECOND:      986334
HD SIZE:           94.49 GB (/dev/mapper/pve-root)
BUFFERED READS:    13.58 MB/sec
AVERAGE SEEK TIME: 405.60 ms
FSYNCS/SECOND:     0.22
DNS EXT:           11004.77 ms
DNS INT:           39.20 ms (blupixel.net)
 
...
FSYNCS/SECOND: 0.22
DNS EXT: 11004.77 ms
DNS INT: 39.20 ms (blupixel.net)
[/code]

almost no fsyncs/second? this should be at least 1000. do a deep analysis of your disk IO system (raid controller setup, cache setting, hard disks, etc.)
 
Ok, but how to understand how many containers I can keep on this server?
And what is a normal container start up time?

It depends on what you use in a vm. For example, you have a SQL server with heavy load and lots of IO works, that VM may consume, lets say 4-5 GB of ram and also %60-70 of CPU.

But if you have a simple XP with not much work in it, it may only need 1 GB of ram and also %20-30 of CPU..

All depends on what is being done in vm. So best practise would be, setting their limits correctly like Ram, CPU and stop some of them and see the difference. I would stop 12 containers and after stoping done, restart the rest one and see its performance. And if it is ok, that might mean you do not have hardware issue only heavy load. Then go for second container and 3rd, 4th. When you see it is being slow, that might give you a sign.


My containers start up time are between 25 - 90 sec., depending on hardware node and other kvm's load.