Hi every Body, I''d like to know how much memory is allocated for Dtrace when I''m using it. I looked at the dtrace guide, and in case of a switch policy involved, I have been understood that dtrace allocates two buffers (an active and an inactive) per CPU. I know that you can configure the dtrace buffer size using the "bufsize" option but I''d like to know what size of buffer is used by default when I don''t configure anything. I looked into the dtrace source code but didn''t manage to find this information. If anybody has some inputs on this it could be helpful. Also, is there a way to display the size of the Dtrace buffers from a dtrace script? Thank''s for your help Damien
>From the guide on page 151:"... The buffer size defaults to four megabytes." Regards, Chip ________________________________ From: dtrace-discuss-bounces at opensolaris.org on behalf of Caruana, Damien Sent: Fri 5/19/2006 8:28 AM To: dtrace-discuss at opensolaris.org Subject: [dtrace-discuss] Dtrace Buffer management Hi every Body, I''d like to know how much memory is allocated for Dtrace when I''m using it. I looked at the dtrace guide, and in case of a switch policy involved, I have been understood that dtrace allocates two buffers (an active and an inactive) per CPU. I know that you can configure the dtrace buffer size using the "bufsize" option but I''d like to know what size of buffer is used by default when I don''t configure anything. I looked into the dtrace source code but didn''t manage to find this information. If anybody has some inputs on this it could be helpful. Also, is there a way to display the size of the Dtrace buffers from a dtrace script? Thank''s for your help Damien -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20060519/8f00fb3c/attachment.html>
Right, I didn''t see this. It is exactly what I''m looking for. Thank''s Damien -----Original Message----- From: Chip Bennett [mailto:cbennett at laurustech.com] Sent: vendredi 19 mai 2006 16:29 To: Caruana, Damien; dtrace-discuss at opensolaris.org Subject: RE: [dtrace-discuss] Dtrace Buffer management>From the guide on page 151:"... The buffer size defaults to four megabytes." Regards, Chip _____ From: dtrace-discuss-bounces at opensolaris.org on behalf of Caruana, Damien Sent: Fri 5/19/2006 8:28 AM To: dtrace-discuss at opensolaris.org Subject: [dtrace-discuss] Dtrace Buffer management Hi every Body, I''d like to know how much memory is allocated for Dtrace when I''m using it. I looked at the dtrace guide, and in case of a switch policy involved, I have been understood that dtrace allocates two buffers (an active and an inactive) per CPU. I know that you can configure the dtrace buffer size using the "bufsize" option but I''d like to know what size of buffer is used by default when I don''t configure anything. I looked into the dtrace source code but didn''t manage to find this information. If anybody has some inputs on this it could be helpful. Also, is there a way to display the size of the Dtrace buffers from a dtrace script? Thank''s for your help Damien -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20060519/8a99646d/attachment.html>
Just one other thing, Default buffer size applies to each CPU. If I have a dual core server, is it supposed to be a two CPU server or a single one? Thank''s Damien -------- Message d''origine-------- De: dtrace-discuss-bounces at opensolaris.org de la part de Caruana, Damien Date: ven. 19/05/2006 18:00 ?: Chip Bennett; dtrace-discuss at opensolaris.org Objet : RE: [dtrace-discuss] Dtrace Buffer management Right, I didn''t see this. It is exactly what I''m looking for. Thank''s Damien -----Original Message----- From: Chip Bennett [mailto:cbennett at laurustech.com] Sent: vendredi 19 mai 2006 16:29 To: Caruana, Damien; dtrace-discuss at opensolaris.org Subject: RE: [dtrace-discuss] Dtrace Buffer management>From the guide on page 151:"... The buffer size defaults to four megabytes." Regards, Chip _____ From: dtrace-discuss-bounces at opensolaris.org on behalf of Caruana, Damien Sent: Fri 5/19/2006 8:28 AM To: dtrace-discuss at opensolaris.org Subject: [dtrace-discuss] Dtrace Buffer management Hi every Body, I''d like to know how much memory is allocated for Dtrace when I''m using it. I looked at the dtrace guide, and in case of a switch policy involved, I have been understood that dtrace allocates two buffers (an active and an inactive) per CPU. I know that you can configure the dtrace buffer size using the "bufsize" option but I''d like to know what size of buffer is used by default when I don''t configure anything. I looked into the dtrace source code but didn''t manage to find this information. If anybody has some inputs on this it could be helpful. Also, is there a way to display the size of the Dtrace buffers from a dtrace script? Thank''s for your help Damien -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20060519/3de18f44/attachment.html>
Caruana, Damien wrote:> Just one other thing, > Default buffer size applies to each CPU. If I have a dual core server, > is it supposed to be a two CPU server or a single one?i bet for two.
For dual core processors, there has to be a pair of buffers for each core, because the cores could be generating DTrace data simultaneously. However, as I understand it, from a presentation I saw last year, the T1 only has 8 pair of buffers, rather than 32. As expected, you need 8 pair, because there are 8 cores. However, the four threads on one core are never simultaneously in a state where they would record DTrace data, so the four threads can share the same buffers. However, it makes me wonder if you might need to increase the size of the buffers on T1s, because of the potential for recording data four times faster, while the consumer can only pull data out at 1x speed. Any thoughts? Thanks, Chip Alessio Cervellin wrote:> Caruana, Damien wrote: > >> Just one other thing, >> Default buffer size applies to each CPU. If I have a dual core >> server, is it supposed to be a two CPU server or a single one? > > > i bet for two. > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org
There is a pair of buffers for each virtual processor. For the T1 -- which exposes each thread as a virtual processor -- there are 32 pairs of buffers for tracing. Each of the 4 threads on each core can be in a state where it''s actively tracing data to the DTrace buffer. Adam On Sat, May 20, 2006 at 01:28:56PM -0500, Chip Bennett wrote:> For dual core processors, there has to be a pair of buffers for each > core, because the cores could be generating DTrace data simultaneously. > > However, as I understand it, from a presentation I saw last year, the T1 > only has 8 pair of buffers, rather than 32. As expected, you need 8 > pair, because there are 8 cores. However, the four threads on one core > are never simultaneously in a state where they would record DTrace data, > so the four threads can share the same buffers. > > However, it makes me wonder if you might need to increase the size of > the buffers on T1s, because of the potential for recording data four > times faster, while the consumer can only pull data out at 1x speed. > > Any thoughts? > > Thanks, > Chip > > Alessio Cervellin wrote: > > >Caruana, Damien wrote: > > > >>Just one other thing, > >>Default buffer size applies to each CPU. If I have a dual core > >>server, is it supposed to be a two CPU server or a single one? > > > > > >i bet for two. > >_______________________________________________ > >dtrace-discuss mailing list > >dtrace-discuss at opensolaris.org > > > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
Hmmm.... This is what I was told by a Sun engineer last year at Immersion Week in St. Charles. If that''s not correct I apologize for misleading. I was suspicious when I was first told this, so I did some research on the T1. It actually makes a certain amount of sense. One core only has one pipeline. In a standard processor, around 75% of processing time would be lost due to long latency operations, cache misses, etc. So the T1 uses FMT (Fine-grained Chip Multi-Threading) to keep the pipeline active. Even though there are four threads, only one is active on the pipeline, while the others are waiting. However, now that I''m thinking about it again, only one thread active on the pipeline is not the point, is it. It''s how many threads are accessing memory at the same time, which I suppose could be all four of them. Thanks for chiming in Adam. Chip Adam Leventhal wrote:>There is a pair of buffers for each virtual processor. For the T1 -- which >exposes each thread as a virtual processor -- there are 32 pairs of buffers >for tracing. Each of the 4 threads on each core can be in a state where it''s >actively tracing data to the DTrace buffer. > >Adam > >On Sat, May 20, 2006 at 01:28:56PM -0500, Chip Bennett wrote: > > >>For dual core processors, there has to be a pair of buffers for each >>core, because the cores could be generating DTrace data simultaneously. >> >>However, as I understand it, from a presentation I saw last year, the T1 >>only has 8 pair of buffers, rather than 32. As expected, you need 8 >>pair, because there are 8 cores. However, the four threads on one core >>are never simultaneously in a state where they would record DTrace data, >>so the four threads can share the same buffers. >> >>However, it makes me wonder if you might need to increase the size of >>the buffers on T1s, because of the potential for recording data four >>times faster, while the consumer can only pull data out at 1x speed. >> >>Any thoughts? >> >>Thanks, >>Chip >> >>Alessio Cervellin wrote: >> >> >> >>>Caruana, Damien wrote: >>> >>> >>> >>>>Just one other thing, >>>>Default buffer size applies to each CPU. If I have a dual core >>>>server, is it supposed to be a two CPU server or a single one? >>>> >>>> >>>i bet for two. >>>_______________________________________________ >>>dtrace-discuss mailing list >>>dtrace-discuss at opensolaris.org >>> >>> >>_______________________________________________ >>dtrace-discuss mailing list >>dtrace-discuss at opensolaris.org >> >> > > >