Wie kann ich einen Engpass bei einem Ubuntu-Server auf Intel Atom-Basis feststellen?

2747
Jon Cage

Ich habe zu Hause einen kleinen Medienserver, der über Software-RAID und eine Gigabit-Verbindung zum Rest meines Netzwerks verfügt.

Aus irgendeinem Grund bekomme ich jedoch nur ~ 10 MB / s Übertragungen, wenn Sie auf den Server kopieren.

Ich verwende Software-RAID5 (mdadm) über 4 1-TB-Festplatten. Darüber hinaus verwende ich dann LVM, um mir einen riesigen Speicherplatz bereitzustellen, der dann in mehrere Partitionen aufgeteilt wird, deren Größe bei Bedarf geändert werden kann. Ich vermute, dass dies höchstwahrscheinlich die Ursache ist, aber ich würde gerne wissen, wo die Ursache liegt.

Wie kann ich also den Netzwerkdurchsatz (Windows 7-Desktop <-> Ubuntu-Server) und die Festplattenleistung vergleichen, um herauszufinden, wo mein Engpass liegt?

[Bearbeiten] Bei Interesse ist das Motherboard ein Intel Desktop Board D945GCLF2 . Das ist ein Atom-Prozessor der 300-Serie mit dem Intel® 945GC Express-Chipsatz

[Edit2] Ich fühle mich wie ein Idiot ! Ich habe gerade meinen Desktop überprüft und ich hatte die langsamere der beiden Onboard-NICs angeschlossen, so dass der Server hier wahrscheinlich nicht schuld ist. Übertragen einer Ubuntu-Kopie vom Server bekomme ich ~ 35-40MB / s laut Windows 7. Ich mache diese HD-Tests, wenn ich eine Chance bekomme (nur der Vollständigkeit halber).

1
Software-RAID mit einer Atom-CPU ... Schauen Sie nicht weiter. Besonders bei RAID5, das Paritätsberechnungen vornimmt. Ich nehme an, dass Ihr Netzwerk 100 Mbit / s hat, was einen maximalen Durchsatz von 12 Mbit / s ergibt, also sind 10 MB / s gut =) Antoine Benkemoun vor 14 Jahren 4
Jon hat einen Gigabit-Link. lajuette vor 14 Jahren 0
@lajuette - Da Gbit-Komponenten nicht immer ausreichen, müssen Sie sicherstellen, dass jedes Glied in der Kette eine Gbit-Verbindung ausgehandelt hat und nicht aufgrund von ungeeigneten Inkompatibilitäten, Kabelfehlern oder zufälligen Ereignissen auf eine langsamere Verbindungsgeschwindigkeit zurückgefallen ist. David Spillett vor 14 Jahren 0
Dies ist keine Antwort, sondern empfiehlt eine Korrektur. Die einfachste Lösung scheint das Hinzufügen einer hardwarebasierten RAID-Karte zu sein. Der IO-Overhead wird von Ihrer begrenzten CPU entlastet, und wenn Sie einen vernünftigen Cache haben (sollten Sie!), Werden Sie zusätzliche Vorteile sehen. Scheint an diesem Punkt die einfachste Plug-and-Go-Option zu sein. Darüber hinaus profitieren Sie von der Aktivierung von Jumbo-Frames, wenn alle Ihre Kits dies unterstützen. vor 14 Jahren 0

4 Antworten auf die Frage

4
lajuette

Like Antoine said: An Atom CPU and SW RAID is a bad idea. To measure the troughput of your disks you can use hdparm.

Have a look at this: http://www.cyberciti.biz/tips/how-fast-is-linux-sata-hard-disk.html

You should measure your disk devices and your raid devices seperately. That way you can see if the disks are slow (broken?) or the RAID is slow. Also have a look at your cpu usage (e.g. with top) while measuring or accessing your RAID ome other way.

If that's not the bottleneck check if your GBEthernet Link is using its full capacity. Have a look aht the output of ifconfig. Mine reads as follows (Mac OS X 10.6, it should look similar on Ubuntu):

en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500 ether 64:b9:e8:bf:8f:b4 inet 192.168.0.5 netmask 0xffffff00 broadcast 192.168.0.255 media: autoselect (1000baseT <full-duplex,flow-control>) status: active 

2nd line from the bottom: 1000baseT means: GB Ethernet!

[edit] I found this article: http://www.performancewiki.com/diskio-monitoring.html It recommends sar and iostat for monitoring disk IO.

Klingt nach guten Ratschlägen - ich werde Ihre Vorschläge ausprobieren. Jon Cage vor 14 Jahren 0
Ich bin an Ihren Ergebnissen interessiert. Wenn das Atom (welches übrigens?) In der Lage ist, solche Dinge zu tun, möchte ich es zu Hause ausprobieren. Ich betreibe ein Media Center auf einem ION Board. lajuette vor 14 Jahren 0
@lajuette - ein Atom sollte als einfacher Dateiserver gut funktionieren, wenn Sie das meinen. Ich habe keine mit einer Gbit-NIC getestet, aber wie Jons Ergebnisse zeigen, kann sie mit einem RAID5-Array 10Mbit-Geschwindigkeiten anzeigen und sollte theoretisch deutlich schneller sein können. Ich habe einmal ein paar Tests mit meinem Netbook durchgeführt, um zu sehen, wie ein Atom auch als VPN-Server fungiert. Er könnte ~ 85-90% der Kapazität eines 100-MBit-Links drücken, wenn Sie OpenVPN als sichere Transportschicht verwenden. Dies hat wahrscheinlich Ihr ION-Board ein leistungsfähigerer Chip aus der Atom-Familie kann also noch besser sein. David Spillett vor 14 Jahren 0
2
David Spillett

A couple of things to check:

  • make sure the NIC is actually in Gbit more, not 10Mbit with ethtool eth0 (replace eth0 with the relevant NIC's device ID if different), look for the "speed" reading for the current mode
  • verify that Windows is currently using its card in Gbit mode too
  • check to see what CPU and I/O load is imposed on the server during the transfer - if you see (in top or similar) one core at near 100% I/O-wait state then your drives are the bottleneck, if you see high "system" CPU use then the CPU it the bottlneck (it could be a mix of the two for writes due to RAID 5's "write -> read+read+write+write" performance hit on four drives and the parity calcs being done by the CPU, if neither system or IO readings are high then the network is most likely the bottleneck.
  • test bulk read performance purely on the server (to test raw IO performance irrespective of the network): cat a large file to /dev/null to see how far that goes (do echo 3 > /proc/sys/vm/drop_caches first so you know the IO is actually hitting the disks and not coming from memory, and if you have it installed use pv instead of cat as it gives useful speed+progress readings), watching the CPU+IO load as this happens too
  • test bulk write performance with cat /dev/zero > /some/file/on/the/array (or pv /dev/zero > /some/file/on/the/array), watching the CPU use as this happens too.
  • test bluk network throughput, irrespective of the drive/array performance, between the machines with netcat and pv - on the Win7 machine do nc -l -p 123 > NUL and on the server then do pv /dev/zero | nc 1.2.3.4 123 where 1.2.3.4 is the Windows box's address (you may end to add a firewall exception for nc).

As you are seeing a flat rate of ~10Mbyte/sec I would suspect a network issue first rather than a bottleneck at the disks or CPU - but RAID5 on an Atom CPU might be one of the bottlenecks so you might want to consider RAID1+0 or RAID10 instead (if your RAID5 array is 3-plus-spare then Linux's RAID10 driver with 3+spare should give similar redundancy (any single drive failure is survivable) but with better performance (write->write*2 rather than write->read+paritycalc+write*2), in 3-drive mode the RAID10 driver does something similar to what IBM controllers call RAID-1E, see http://en.wikipedia.org/wiki/Non-standard_RAID_levels#Linux_MD_RAID_10).

edit:

Added extra thing to test to the list above, and other minor detail

Das ~ 10MByte schien mir auch eine 100MBit-Verbindung verdächtig zu sein. Ich werde deine Vorschläge ausprobieren, wenn ich eine Chance bekomme - danke! Jon Cage vor 14 Jahren 0
1
Dan Andreatta

First of all, you are using SMB/CIFS, which is not a very fast protocol, (it is definitely slower that NFS, for reference).

Second, it depends what workload you are testing. Is it mostly sequential or random? If it is mostly random I/O, then 10MB/s is probably OK. Realistically, from a GB NIC you can expect 30-50MB/s from CIFS (but, as I said, could be higher or lower, depending on the workload).

You can also check this other answer from serverfault for CIFS performance tuning.

A quick search revealed this page with CIFS performance bechmarks. You may find it useful.

Finally, you can test the performance of the network with iperf (it can be compiled for windows as well, and you may find it precompiled somewhere)

Ich habe große Dateien übertragen, also große sequentielle Schreibvorgänge / Lesevorgänge. Jon Cage vor 14 Jahren 0
@ Jon: Abgesehen davon, dass Sie das Netzwerk selbst testen und die CPU-Last auf dem Dateiserver überprüfen müssen, kann ich Sie nur auf die offizielle Samba-Leistungsseite http://www.samba.org/samba/docs/man/Samba weiterleiten -HOWTO-Collection / speed.html vor 14 Jahren 0
0
Jon Cage

Es stellte sich heraus, dass es der Desktop-Computer war, den ich verwendete. es lief bei 100MBit. Vielen Dank für all die Ratschläge - kann sehr nützlich sein für das Benchmarking und die Verbesserung der Gesamtgeschwindigkeit meines Systems!