Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Apr 2004 17:56:42 +1000 (EST)
From:      Andy Farkas <andyf@speednet.com.au>
To:        Xin LI <delphij@frontfree.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Qustion about being "Giant-locked"
Message-ID:  <20040406174155.S56300@hewey.af.speednet.com.au>
In-Reply-To: <20040406071205.GA2819@frontfree.net>
References:  <C192C8912E798F4399668791C8965190674FD6@mx.hhp.local> <009401c41ba5$3b000f70$0c00a8c0@artem> <20040406071205.GA2819@frontfree.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 6 Apr 2004, Xin LI wrote:
> On Tue, Apr 06, 2004 at 11:03:13AM +0400, Artem Koutchine wrote:
> > While booting i see many drivers marked
> > as [Giant-locked].
> > Is being Giant-locked good or bad what are the
> > implications?
> It's not good if you have a computer with multiple processors.

I have a box with 4 ppro-200 cpus. It has 4 adaptec eisa scsi controllers,
each controlling 2 disks. All 8 disks are in the same vinum raid-5 volume.
I have a large (1.5gig) file on this volume.

This is what happens when I run md5 on this file 4 times concurrently:

%%%
> md5 really-big-file &
[2] 78243
> md5 really-big-file &
[3] 78244
> md5 really-big-file &
[4] 78245
> md5 really-big-file &
[5] 78246
> vmstat -c10 -w6
 procs      memory      page                    disks     faults      cpu
 r b w     avm    fre  flt  re  pi  po  fr  sr ad0 am0   in   sy  cs us sy id
 1 2 3   73308  28668  235   1   1   0 255  16   0   0  362  390 829  8  4 88
 1 2 3   73308  21300    0   0   0   0 310   0   0   0  382 5928 11671  8 28 64
 1 1 3   73308  29248    0   0   0   0 323 653   0   0  384 5769 11363  8 27 65
 2 2 2   73308  20592   31   0   1   0 393   0   2   0  423 5614 11226  8 28 64
 2 2 2   73308  27968    0   0   0   0 347 653   1   0  420 5655 11352  7 29 64
 2 3 2   73308  19940    0   0   0   0 335   0   0   0  385 5563 11108  7 28 65
 2 3 2   73308  26788    0   0   0   0 369 654   0   0  391 5608 11168  8 27 65
 2 2 2   73308  34112    0   0   0   0 354 653   0   0  391 5656 11352  8 28 64
 2 3 2   73308  25064    0   0   0   0 375   0   0   0  393 5687 11315  8 27 65
 2 3 2   73308  32512    0   0   0   0 344 655   0   0  386 5664 11284  8 27 65
%%%

As you can see, only 8% of all cpus are being used to calculate the md5s.
At least 2 cpus are constantly idle.


> grep GIANT /var/run/dmesg.boot
fxp0: [GIANT-LOCKED]
ahc0: [GIANT-LOCKED]
ahc1: [GIANT-LOCKED]
ahc2: [GIANT-LOCKED]
ahc3: [GIANT-LOCKED]
amr0: [GIANT-LOCKED]
ahc4: [GIANT-LOCKED]
ahc5: [GIANT-LOCKED]
atkbd0: [GIANT-LOCKED]


--

 :{ andyf@speednet.com.au

        Andy Farkas
    System Administrator
   Speednet Communications
 http://www.speednet.com.au/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040406174155.S56300>