WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: (solved) How to benchmark the TCE-loading from HDD or from USB?  (Read 6710 times)

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Hello,
I have extensions on an HDD and would move them all to a CF or to an USB if the extension loading (onboot or ondemand) is quicker. But, how to know which medium is the best in the reading access aspect?
Does exist a method how to benchmark the loading of extensions? (different from looking at a watch..).
Even with my 2 different HDDs, I have the feeling the reading acess is different. So, I would like to know if there is a method to benchmark the different storages places of my PC (reading access/loading to RAM) for finding the optimal data structure.
Thanks.
« Last Edit: July 10, 2011, 02:33:53 PM by floppy »
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline genec

  • Full Member
  • ***
  • Posts: 240
Re: How to benchmark the TCE-loading from HDD or from USB?
« Reply #1 on: June 27, 2011, 07:57:18 PM »
A stopwatch is the most accurate.

That said, things like using dd to read a raw partition or file, tar all of your files to a file in memory (ie on tmpfs; no compression) and bonnie on a raw partition or file may be representative of relative performance.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11022
Re: How to benchmark the TCE-loading from HDD or from USB?
« Reply #2 on: June 28, 2011, 03:18:36 AM »
A stopwatch still has the human element, you could use bootchart for more accurate readings (see the wiki).

edit: Depends on what you want to measure of course. If extension loading at boot, bootchart; if general read performance, hdparm -tT or the like. Seeks may factor in to extension loading while they would have no effect on sequential reads.
« Last Edit: June 28, 2011, 03:20:27 AM by curaga »
The only barriers that can stop you are the ones you create yourself.

Offline yoshi314

  • Full Member
  • ***
  • Posts: 135
Re: How to benchmark the TCE-loading from HDD or from USB?
« Reply #3 on: June 28, 2011, 03:44:32 AM »
you could do e.g. hdparm -tT /dev/sda  to run a simple benchmark (it's non destructive) on a device.

also, if printk was timed (is it?) you might observe the kernel messages to see how fast the system goes up.

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: How to benchmark the TCE-loading from HDD or from USB?
« Reply #4 on: June 28, 2011, 07:07:11 AM »
you could use bootchart for more accurate readings (see the wiki).
I could not find the topic in the wiki. Where is it?
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: How to benchmark the TCE-loading from HDD or from USB?
« Reply #5 on: June 28, 2011, 07:08:49 AM »
also, if printk was timed (is it?) you might observe the kernel messages to see how fast the system goes up.
how to? as a boot code?
the output will be accessible via "messages" in "control panel"? or anywhere else?
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11022
The only barriers that can stop you are the ones you create yourself.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11500
Re: How to benchmark the TCE-loading from HDD or from USB?
« Reply #7 on: June 29, 2011, 04:32:01 AM »
Hi floppy
You could set up a small script that loads your extensions. Then boot using the  base  boot code.
Now open a terminal and enter   time ./scriptname   and it will tell you how long it took.

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: How to benchmark the TCE-loading from HDD or from USB?
« Reply #8 on: June 29, 2011, 02:57:36 PM »
 and it will tell you how long it took.

simple good. how to print the time before and after loading in the script? "print $time" or something similar?
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11500
Re: How to benchmark the TCE-loading from HDD or from USB?
« Reply #9 on: June 29, 2011, 03:24:42 PM »
Hi floppy
Use the command as I listed it. It will actually tell you how long it took to complete.
The time command does not tell you what time it is, it times a command.
For example, if you enter

time ls -l

at the command line it will tell you how long it took to get a directory listing.

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: How to benchmark the TCE-loading from HDD or from USB?
« Reply #10 on: June 29, 2011, 03:31:57 PM »
very sorry. I did not read it correctly. reason is perhaps the 0,4l white wine from france.. and my wife laptop on the kitchen table allowing to read the forum...
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: How to benchmark the TCE-loading from HDD or from USB?
« Reply #11 on: July 08, 2011, 05:00:12 PM »
Some time consuming activities during boot are:

[    1.714829] isapnp: Scanning for PnP cards...
[    2.028141] isapnp: No Plug & Play device found   so, I will try with the boot code noisapnp

[    2.039404] 00:08: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[    5.053405] floppy0: no floppy controllers found
how to avoid a floppy scan?.. I dismounted the floppy drive to have less hardware for scanning..

[   20.630663] JBD: barrier-based sync failed on hda2-8 - disabling barriers
[   42.698903] JBD: barrier-based sync failed on hdd3-8 - disabling barriers
[   65.952414] eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1
What does mean the message at 20.63 ? Can I speed up the activity by doing something?
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: How to benchmark the TCE-loading from HDD or from USB?
« Reply #12 on: July 08, 2011, 06:01:37 PM »
Quote
how to avoid a floppy scan?
Did the boot code floppy=0,irq prevent the scan?
10+ Years Contributing to Linux Open Source Projects.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11500
Re: How to benchmark the TCE-loading from HDD or from USB?
« Reply #13 on: July 09, 2011, 12:22:07 AM »
Hi floppy
Quote
how to avoid a floppy scan?
You definitely do not want the computer scanning you.  ;D

Offline floppy

  • Hero Member
  • *****
  • Posts: 577
Re: How to benchmark the TCE-loading from HDD or from USB?
« Reply #14 on: July 09, 2011, 12:20:13 PM »
Hi floppy
Quote
how to avoid a floppy scan?
You definitely do not want the computer scanning you.  ;D

Rich, floppy is dead http://forum.tinycorelinux.net/index.php?topic=9313.0 and we could not find any bones of it. So, no scanning is possible of this poor animal.
and I was sure, I would one time have a comment on this nick.. so, the time came with you. Congratulation.
If you mean I should post a scan af myself here, in fact, Ii would not like to make anybody jalous of few oversized components..  ;D
this is probably not the case for my pc: this piece of history is not really oversized.
AMD K6-IIIATZ 550MHz MB DFI K6xv3/+66
P4 HP DC7100 3GB 3GHz
Samsung NC10 boot from SD card port (via USB reader)
.. all TinyCore proofed