[OS X TeX] multi cores

George Gratzer gratzer at me.com
Tue Dec 15 20:50:16 EST 2009


On 2009-12-13, at 6:52 PM, Peter Dyballa wrote:

> 
> Am 13.12.2009 um 23:40 schrieb George Gratzer:
> 
>> a long log file displayed in the terminal (would it get faster if I could suppress that?)
> 
> Definitely! "*tex -interaction=batchmode <file>" should save some seconds...
> 
>> 
>> And at the end:
>> 
>> user  	0m1.597s
> 
> 
> You are using the shell's built-in timer, which cannot be very exact. In bash and GNU's date command, i.e., the command gdate, which has a resolution of nsec, you could run
> 
> 	START=$(gdate +%s.%N) ; latex -interaction=batchmode GLT3 ; END=$(gdate +%s.%N) ; DIFF=$(echo "$END - $START" | bc) ; echo $DIFF


This gives:


(standard_in) 2: parse error


> This one-liner will measure from start to end of the execution. The DIFF value times four (you mentioned once that not all the cores are used) might give the "real" time. Another approach is to use Sun's built-in DTraceToolkit:
> 
> 	sudo procsystime -eoT latex -interaction=batchmode GLT3

I tried this. I got

         SYSCALL          TIME (ns)
   thread_selfid               1387
         geteuid               1441
bsdthread_register               1493
       getrlimit               1654
shared_region_check_np               2377
         madvise               2849
       sigaction               3156
       issetugid               3342
          getpid               3672
           close               7342
           pread               9532
        shm_open              16604
        readlink              19245
            open              27007
  fcntl_nocancel              29594
          munmap              33222
       fstatfs64              52829
         lstat64              92840
        __sysctl             104789
            mmap             114327
 getdirentries64             396922
         fstat64             571881
  close_nocancel            2009555
          stat64            2505946
   open_nocancel            2593402
           ioctl            6244794
  write_nocancel            7047911
   read_nocancel           11918684
          access           26760916
          TOTAL:           60578713

CPU Times for command latex -interaction=batchmode GLT3,

         SYSCALL          TIME (ns)
   thread_selfid                259
         geteuid                340
bsdthread_register                410
       getrlimit                518
          getpid                551
       issetugid                622
shared_region_check_np               1269
         madvise               1490
       sigaction               1678
           close               5130
           pread               7302
  fcntl_nocancel               9140
        shm_open              12642
        readlink              13901
          munmap              18271
            open              24320
       fstatfs64              32250
         lstat64              66299
            mmap              69736
        __sysctl              86169
         fstat64             295009
 getdirentries64             347123
  close_nocancel            1502275
          stat64            1747050
   open_nocancel            2055401
           ioctl            6241617
  write_nocancel            6316663
   read_nocancel            7924768
          access           15639946
          TOTAL:           42422149

What does it mean?

GG







More information about the MacOSX-TeX mailing list