Pomalý boot - potřebuji LVM?

Ahoj,

rád bych trochu vylepšil správu služeb na mém notebooku s Fedorou 17. Už jsem něco povypínal, teďka už ale nevím, co vypnout, abych to nepokazil… Můžete mi prosím poradit, co bych ještě mohl vypnout?

Potřebuju například podporu LVM (používám i logické oddíly a flashky)? RPC bind?

Na notebooku netisknu, neprovozuji server, SElinux není můj kamarád, nepoužívám testovací verze, používám NetworkManager a nic jiného. Používám ho na hudbu, práci do školy a tak.

Díky moc za rady!


[martin@localhost ~]$ systemd-analyze blame

  8660ms fedora-storage-init.service
  6239ms dkms_autoinstaller.service
  4985ms udev-settle.service
  3704ms fedora-loadmodules.service
  3339ms systemd-binfmt.service
  3015ms NetworkManager.service
  2798ms proc-sys-fs-binfmt_misc.mount
  2727ms systemd-remount-fs.service
  2456ms udev.service
  2406ms fedora-readonly.service
  2332ms udev-trigger.service
  2309ms media.mount
  2277ms dev-hugepages.mount
  2261ms sys-kernel-debug.mount
  2228ms dev-mqueue.mount
  2219ms systemd-vconsole-setup.service
  2024ms fedora-storage-init-late.service
  1980ms sys-kernel-config.mount
  1412ms bootchart.service
  1407ms iptables.service
  1302ms lvm2-monitor.service
   836ms mdmonitor-takeover.service
   790ms systemd-sysctl.service
   612ms fedora-wait-storage.service
   550ms systemd-tmpfiles-setup.service
   536ms nfs-lock.service
   457ms systemd-readahead-collect.service
   456ms auditd.service
   435ms systemd-readahead-replay.service
   432ms mcelog.service
   394ms console-kit-log-system-start.service
   386ms wpa_supplicant.service
   332ms systemd-logind.service
   277ms avahi-daemon.service
   253ms livesys.service
   194ms dbus.service
   187ms irqbalance.service
   143ms gpm.service
   110ms systemd-user-sessions.service
    77ms home.mount
    51ms console-kit-daemon.service
    49ms udisks2.service
    27ms accounts-daemon.service
    23ms rpcbind.service
    20ms spice-vdagentd.service
    15ms upower.service
     7ms sys-fs-fuse-connections.mount
     6ms rtkit-daemon.service


[root@localhost ~]# fdisk -l

Disk /dev/sda: 640,1 GB, 640 135 028 736 bajtů
hlav: 255, sektorů na stopu: 63, cylindrů: 77 825, celkem 1 250 263 728 sektorů
Jednotky = sektorů po 1 * 512 = 512 bajtech
Velikost sektoru (logického/fyzického): 512 bajtů / 4096 bajtů
Velikost I/O (minimální/optimální): 4096 bajtů / 4096 bajtů
Identifikátor disku: 0x068975c1

Zařízení Zavádět   Začátek       Konec    Bloky    Id  Systém
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   436414463   218103808    7  HPFS/NTFS/exFAT
/dev/sda3       436414464  1216708607   390147072    f  W95 Rozš. (LBA)
/dev/sda4      1216708608  1250260991    16776192   12  Compaq diagnostics
/dev/sda5       436416512   518336511    40960000   83  Linux
/dev/sda6       518338560  1216708607   349185024   83  Linux


[root@localhost ~]# lshw
localhost.localdomain     
    description: Laptop
    product: 300V3A/300V4A/300V5A/200A4B/200A5B (System SKUNumber)
    vendor: SAMSUNG ELECTRONICS CO., LTD.
    version: 0.1
    serial: HKVM93TBA00022
    width: 64 bits
    capabilities: smbios-2.6 dmi-2.6 vsyscall32
    configuration: administrator_password=unknown boot=normal chassis=laptop family=HuronRiver System frontpanel_password=unknown keyboard_password=unknown power-on_password=unknown sku=System SKUNumber uuid=40AE941F-D21D-B211-8000-F5C648980FDD
  *-core
       description: Motherboard
       product: 300V3A/300V4A/300V5A/200A4B/200A5B
       vendor: SAMSUNG ELECTRONICS CO., LTD.
       physical id: 0
       version: FAB1
       serial: 123490EN400015
       slot: Part Component
     *-firmware
          description: BIOS
          vendor: Phoenix Technologies Ltd.
          physical id: 0
          version: 05FI
          date: 10/12/2011
          size: 128KiB
          capacity: 2496KiB
          capabilities: pci upgrade shadowing cdboot bootselect edd int5printscreen int9keyboard int14serial int17printer int10video pc98 acpi usb biosbootspecification netboot
     *-cpu
          description: CPU
          product: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz
          vendor: Intel Corp.
          physical id: 2f
          bus info: cpu@0
          version: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz
          serial: Not Supported by CPU
          slot: CPU
          size: 800MHz
          capacity: 2200MHz
          width: 64 bits
          clock: 100MHz
          capabilities: x86-64 fpu fpu_exception wp 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 constant_tsc arch_perfmon pebs bts nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave avx lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid cpufreq
          configuration: cores=2 enabledcores=2 threads=4
        *-cache:0
             description: L1 cache
             physical id: 30
             slot: L1-Cache
             size: 64KiB
             capacity: 64KiB
             capabilities: synchronous internal write-through data
        *-cache:1
             description: L2 cache
             physical id: 31
             slot: L2-Cache
             size: 256KiB
             capacity: 256KiB
             capabilities: synchronous internal write-through data
        *-cache:2
             description: L3 cache
             physical id: 32
             slot: L3-Cache
             size: 3MiB
             capacity: 3MiB
             capabilities: synchronous internal write-back unified
     *-memory
          description: System Memory
          physical id: 33
          slot: System board or motherboard
          size: 4GiB
        *-bank:0
             description: DIMM [empty]
             physical id: 0
             slot: ChannelA-DIMM0
        *-bank:1
             description: DIMM [empty]
             physical id: 1
             slot: ChannelA-DIMM1
        *-bank:2
             description: SODIMM DDR3 Synchronous 1333 MHz (0,8 ns)
             product: AD73I1C1674EV
             vendor: Fujitsu
             physical id: 2
             serial: 93330200
             slot: ChannelB-DIMM0
             size: 4GiB
             width: 64 bits
             clock: 1333MHz (0.8ns)
        *-bank:3
             description: DIMM [empty]
             physical id: 3
             slot: ChannelB-DIMM1
     *-pci
          description: Host bridge
          product: 2nd Generation Core Processor Family DRAM Controller
          vendor: Intel Corporation
          physical id: 100
          bus info: pci@0000:00:00.0
          version: 09
          width: 32 bits
          clock: 33MHz
        *-pci:0
             description: PCI bridge
             product: Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port
             vendor: Intel Corporation
             physical id: 1
             bus info: pci@0000:00:01.0
             version: 09
             width: 32 bits
             clock: 33MHz
             capabilities: pci pm msi pciexpress normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:40 ioport:3000(size=4096) memory:e0000000-e0ffffff ioport:b0000000(size=301989888)
           *-display UNCLAIMED
                description: 3D controller
                product: nVidia Corporation
                vendor: nVidia Corporation
                physical id: 0
                bus info: pci@0000:01:00.0
                version: a1
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi pciexpress cap_list
                configuration: latency=0
                resources: memory:e0000000-e0ffffff memory:b0000000-bfffffff memory:c0000000-c1ffffff ioport:3000(size=128)
        *-display
             description: VGA compatible controller
             product: 2nd Generation Core Processor Family Integrated Graphics Controller
             vendor: Intel Corporation
             physical id: 2
             bus info: pci@0000:00:02.0
             version: 09
             width: 64 bits
             clock: 33MHz
             capabilities: msi pm vga_controller bus_master cap_list rom
             configuration: driver=i915 latency=0
             resources: irq:42 memory:e1000000-e13fffff memory:d0000000-dfffffff ioport:4000(size=64)
        *-usb:0
             description: USB Controller
             product: 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2
             vendor: Intel Corporation
             physical id: 1a
             bus info: pci@0000:00:1a.0
             version: 04
             width: 32 bits
             clock: 33MHz
             capabilities: pm debug ehci bus_master cap_list
             configuration: driver=ehci_hcd latency=0
             resources: irq:16 memory:e160a000-e160a3ff
        *-multimedia
             description: Audio device
             product: 6 Series/C200 Series Chipset Family High Definition Audio Controller
             vendor: Intel Corporation
             physical id: 1b
             bus info: pci@0000:00:1b.0
             version: 04
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi pciexpress bus_master cap_list
             configuration: driver=snd_hda_intel latency=0
             resources: irq:46 memory:e1600000-e1603fff
        *-pci:1
             description: PCI bridge
             product: 6 Series/C200 Series Chipset Family PCI Express Root Port 1
             vendor: Intel Corporation
             physical id: 1c
             bus info: pci@0000:00:1c.0
             version: b4
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:16 memory:e1500000-e15fffff
           *-network
                description: Wireless interface
                product: Centrino Wireless-N 130
                vendor: Intel Corporation
                physical id: 0
                bus info: pci@0000:02:00.0
                logical name: wlan0
                version: 34
                serial: dc:a9:71:5c:5c:92
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
                configuration: broadcast=yes driver=iwlwifi driverversion=3.7.9-104.fc17.x86_64 firmware=18.168.6.1 ip=192.168.2.4 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
                resources: irq:45 memory:e1500000-e1501fff
        *-pci:2
             description: PCI bridge
             product: 6 Series/C200 Series Chipset Family PCI Express Root Port 4
             vendor: Intel Corporation
             physical id: 1c.3
             bus info: pci@0000:00:1c.3
             version: b4
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport
             resources: irq:19 ioport:2000(size=4096) ioport:e1400000(size=1048576)
           *-network
                description: Ethernet interface
                product: RTL8111/8168B PCI Express Gigabit Ethernet controller
                vendor: Realtek Semiconductor Co., Ltd.
                physical id: 0
                bus info: pci@0000:03:00.0
                logical name: p3p1
                version: 06
                serial: e8:11:32:d9:04:dd
                size: 10Mbit/s
                capacity: 1Gbit/s
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
                configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168e-3_0.0.4 03/27/12 latency=0 link=no multicast=yes port=MII speed=10Mbit/s
                resources: irq:44 ioport:2000(size=256) memory:e1404000-e1404fff memory:e1400000-e1403fff
        *-usb:1
             description: USB Controller
             product: 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1
             vendor: Intel Corporation
             physical id: 1d
             bus info: pci@0000:00:1d.0
             version: 04
             width: 32 bits
             clock: 33MHz
             capabilities: pm debug ehci bus_master cap_list
             configuration: driver=ehci_hcd latency=0
             resources: irq:23 memory:e1609000-e16093ff
        *-isa
             description: ISA bridge
             product: HM65 Express Chipset Family LPC Controller
             vendor: Intel Corporation
             physical id: 1f
             bus info: pci@0000:00:1f.0
             version: 04
             width: 32 bits
             clock: 33MHz
             capabilities: isa bus_master cap_list
             configuration: driver=lpc_ich latency=0
             resources: irq:0
        *-storage
             description: SATA controller
             product: 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller
             vendor: Intel Corporation
             physical id: 1f.2
             bus info: pci@0000:00:1f.2
             version: 04
             width: 32 bits
             clock: 66MHz
             capabilities: storage msi pm ahci_1.0 bus_master cap_list
             configuration: driver=ahci latency=0
             resources: irq:41 ioport:4088(size=8) ioport:4094(size=4) ioport:4080(size=8) ioport:4090(size=4) ioport:4060(size=32) memory:e1608000-e16087ff
        *-serial UNCLAIMED
             description: SMBus
             product: 6 Series/C200 Series Chipset Family SMBus Controller
             vendor: Intel Corporation
             physical id: 1f.3
             bus info: pci@0000:00:1f.3
             version: 04
             width: 64 bits
             clock: 33MHz
             configuration: latency=0
             resources: memory:e1604000-e16040ff ioport:efa0(size=32)
        *-communication
             description: Communication controller
             product: 6 Series/C200 Series Chipset Family MEI Controller #1
             vendor: Intel Corporation
             physical id: 16
             bus info: pci@0000:00:16.0
             version: 04
             width: 64 bits
             clock: 33MHz
             capabilities: pm msi bus_master cap_list
             configuration: driver=mei latency=0
             resources: irq:43 memory:e1605000-e160500f
     *-scsi:0
          physical id: 1
          logical name: scsi0
          capabilities: emulated
        *-disk
             description: ATA Disk
             product: ST640LM001 HN-M6
             vendor: Seagate
             physical id: 0.0.0
             bus info: scsi@0:0.0.0
             logical name: /dev/sda
             version: 2AR1
             serial: S2THJ9EC700028
             size: 596GiB (640GB)
             capabilities: partitioned partitioned:dos
             configuration: ansiversion=5 sectorsize=4096 signature=068975c1
           *-volume:0
                description: Windows NTFS volume
                physical id: 1
                bus info: scsi@0:0.0.0,1
                logical name: /dev/sda1
                version: 3.1
                serial: f0e4-df5f
                size: 98MiB
                capacity: 100MiB
                capabilities: primary bootable ntfs initialized
                configuration: clustersize=4096 created=2012-12-14 23:39:36 filesystem=ntfs label=SYSTEM state=clean
           *-volume:1
                description: Windows NTFS volume
                physical id: 2
                bus info: scsi@0:0.0.0,2
                logical name: /dev/sda2
                version: 3.1
                serial: 687305f7-08b0-1b4c-ba8e-a04f14512b78
                size: 207GiB
                capacity: 208GiB
                capabilities: primary ntfs initialized
                configuration: clustersize=4096 created=2011-07-22 04:50:49 filesystem=ntfs state=clean
           *-volume:2
                description: Extended partition
                physical id: 3
                bus info: scsi@0:0.0.0,3
                logical name: /dev/sda3
                size: 372GiB
                capacity: 372GiB
                capabilities: primary extended partitioned partitioned:extended
              *-logicalvolume:0
                   description: Linux filesystem partition
                   physical id: 5
                   logical name: /dev/sda5
                   logical name: /
                   capacity: 39GiB
                   configuration: mount.fstype=ext4 mount.options=rw,seclabel,relatime,data=ordered state=mounted
              *-logicalvolume:1
                   description: Linux filesystem partition
                   physical id: 6
                   logical name: /dev/sda6
                   logical name: /home
                   capacity: 333GiB
                   configuration: mount.fstype=ext4 mount.options=rw,seclabel,relatime,data=ordered state=mounted
           *-volume:3
                description: Windows NTFS volume
                physical id: 4
                bus info: scsi@0:0.0.0,4
                logical name: /dev/sda4
                version: 3.1
                serial: daff-0a5b
                size: 15GiB
                capacity: 15GiB
                capabilities: primary boot ntfs initialized
                configuration: clustersize=4096 created=2012-12-14 23:25:59 filesystem=ntfs label=RECOVERY state=clean
     *-scsi:1
          physical id: 2
          logical name: scsi2
          capabilities: emulated
        *-cdrom
             description: DVD-RAM writer
             product: CDDVDW SN-208BB
             vendor: TSSTcorp
             physical id: 0.0.0
             bus info: scsi@2:0.0.0
             logical name: /dev/cdrom
             logical name: /dev/sr0
             version: SC00
             capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
             configuration: ansiversion=5 status=nodisc
  *-battery
       product: Smart Battery
       vendor: Intel Corp.
       physical id: 1
       version: 2008
       serial: 1.0
       slot: Rear
  *-power UNCLAIMED
       description: TBD by ODM
       product: TBD by ODM
       vendor: TBD by ODM
       physical id: 2
       version: 1.0
       serial: TBD by ODM
       capacity: 32768mWh

Pokud nepoužíváš LVM tak můžeš vypnout jeho služby.
Více např: http://www.harald-hoyer.de/personal/blog/fedora-17-boot-optimization-from-15-to-3-seconds
Ale nepřeháněl bych to s vypínáním služeb.
Jak dlouho ti to bootuje?

Nebo překlad zde http://fedora.cz/optimalizace-bootu-u-fedory-17-z-15-na-25-sekund/

No já právě nevím, jestli to LVM potřebuju, ale používám logické partitiony, tak asi potřebuju, co?

V tom článku se mi líbí tenhle příkaz:


$ cd /lib/systemd/system
$ for i in abrt*.service auditd.service avahi-daemon.* bluetooth.* dev-hugepages.mount dev-mqueue.mount \
      fedora-configure.service fedora-loadmodules.service fedora-readonly.service ip6tables.service \
      iptables.service irqbalance.service mcelog.service rsyslog.service sendmail.service sm-client.service \
      sys-kernel-config.mount sys-kernel-debug.mount; do \
    sudo systemctl mask $i; \
  done

Jenže pořádně nevím, co to všechno provede… dev-mqueue.mount ? fedora*? sys-kernel-config.mount ? irqbalance.service? Nepotřebuju to náhodou?

Bootuuje to furt dost pomalu. Ve srovnání s Win7 a Archlinuxem, který mám na mnohem slabší mašině, je to pomalejší.


[martin@localhost ~]$ systemd-analyze 
Startup finished in 3200ms (kernel) + 4619ms (initramfs) + 27120ms (userspace) = 34941ms


[martin@localhost ~]$ sudo fdisk -l
[sudo] password for martin: 

Disk /dev/sda: 640,1 GB, 640 135 028 736 bajtů
hlav: 255, sektorů na stopu: 63, cylindrů: 77 825, celkem 1 250 263 728 sektorů
Jednotky = sektorů po 1 * 512 = 512 bajtech
Velikost sektoru (logického/fyzického): 512 bajtů / 4096 bajtů
Velikost I/O (minimální/optimální): 4096 bajtů / 4096 bajtů
Identifikátor disku: 0x068975c1

Zařízení Zavádět   Začátek       Konec    Bloky    Id  Systém
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   436414463   218103808    7  HPFS/NTFS/exFAT
/dev/sda3       436414464  1216708607   390147072    f  W95 Rozš. (LBA)
/dev/sda4      1216708608  1250260991    16776192   12  Compaq diagnostics
/dev/sda5       436416512   518336511    40960000   83  Linux
/dev/sda6       518338560  1216708607   349185024   83  Linux

Aha, tak pozor, pokud používáš LVM (podle prvního příspěvku jsem to asi nepochopil) tak nic s LVM nemaž. S tím bootovaním… u mně to vypadá asi takhle:4

Startup finished in 1886ms (kernel) + 4737ms (initramfs) + 148712ms (userspace) = 155336ms

Až jsem se zhrozil :smiley:
Ještě se dívám že mezi službami které chceš vypnout je i iptables…
Asi by to ten seznam chtělo zredukovat (ale v tom ti moc neporadím).
Ten archlinux má jaké prostředí? Možná by i pomohla aktualizace na F18 (Gnome 3.6).

Logicke oddily na disku jsou neco jineho nez LVM, podle vypisu oddilu z disku tam zadne LVM neni, i kdyz Fedora pouziva LVM ve vychozi instalaci - tzn. pri instalaci si musel delat vlastni rozdeleni disku.


/dev/sda1   *           1        1013     8136891   8e  Linux LVM

Zajimavejsi je vypis toho systemd blame, protoze je jasne, ze 8.6s je fedora storage - to nechapu co mas nebo nemas ve fstab, ale vypada to jako nejake sitove disky, dale 6s dkms doz je dynamic kernel module service, neboli kontrola a kompilace modulu napr. pro grafiku nebo dalsi ovladace distribuovane jako dkms, tzn. pravdepodobne neco co sis pridal navic, binmft je zrejme od Wine a dev-hugepages a kernel-debug nejspis taky nepotrebujes.

@dandim: Arch to má úplně jinak, tam se zapisuje do /etc/rc.conf přímo jen služby, které mají být spuštěny.

@covex: Díky za rady. Můžu tedy zkusit fedora-storage-init.service a lvm vypnout… Když se to pokazí, tak to budu upravovat chrootem z LiveCD? Pochopil jsem, že DKMS je nutné, tak na to asi šahat nebudu. Možná tam budou nějaké moduly pro virtualbox nebo nvidii…

Posílám výpis z fstabu. Na disku mám dále ještě oddíly pro windows. Nepřipojují se automaticky, vydím jejich ikonky na ploše, ale abych je mohl používat, musím je přimountovat. Nijak jsem to nenastavoval, je to tak od instalace.


[martin@localhost ~]$ cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Sat Dec 22 12:15:46 2012
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=7138a63e-60b3-4970-9143-fd395ea19543 /                       ext4    defaults        1 1
UUID=fe346a82-9fbb-492a-ae80-4d3022812c77 /home                   ext4    defaults        1 2



[martin@localhost ~]$ sudo fdisk -l
[sudo] password for martin: 

Disk /dev/sda: 640,1 GB, 640 135 028 736 bajtů
hlav: 255, sektorů na stopu: 63, cylindrů: 77 825, celkem 1 250 263 728 sektorů
Jednotky = sektorů po 1 * 512 = 512 bajtech
Velikost sektoru (logického/fyzického): 512 bajtů / 4096 bajtů
Velikost I/O (minimální/optimální): 4096 bajtů / 4096 bajtů
Identifikátor disku: 0x068975c1

Zařízení Zavádět   Začátek       Konec    Bloky    Id  Systém
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   436414463   218103808    7  HPFS/NTFS/exFAT
/dev/sda3       436414464  1216708607   390147072    f  W95 Rozš. (LBA)
/dev/sda4      1216708608  1250260991    16776192   12  Compaq diagnostics
/dev/sda5       436416512   518336511    40960000   83  Linux
/dev/sda6       518338560  1216708607   349185024   83  Linux