List Info

Thread: Resource contention bug?




Resource contention bug?
user name
2006-12-04 17:55:29
>From that thread dump, it looked like it might be the
way Blojsom is calling OSCache that's the problem, but maybe
I misinterpreted the output.
I think there are a few other places where there's room for
optimization, although I'm not sure about the priority of
this stuff now that 3.* is based on DB, and not FS any more:

"Thread-402" daemon prio=1 tid=0x6fc29eb0
nid=0x731c runnable [0x68afc000..0x68afcf30]
        at java.io.UnixFileSystem.getLastModifiedTime(Native
Method)
        at java.io.File.lastModified(File.java:795)
        at
org.blojsom.util.BlojsomUtils$1.compare(BlojsomUtils.java:10
24)
        at java.util.Arrays.mergeSort(Arrays.java:1307)
        at java.util.Arrays.mergeSort(Arrays.java:1296)
        at java.util.Arrays.mergeSort(Arrays.java:1296)
        at java.util.Arrays.mergeSort(Arrays.java:1296)
        at java.util.Arrays.sort(Arrays.java:1223)
        at
org.blojsom.blog.FileBackedBlogEntry.loadComments(FileBacked
BlogEntry.java:226)
        at
org.blojsom.blog.FileBackedBlogEntry.load(FileBackedBlogEntr
y.java:528)
        at
org.blojsom.fetcher.StandardFetcher.getEntriesForCategory(St
andardFetcher.java:231)
        at
org.blojsom.fetcher.StandardFetcher.getEntriesAllCategories(
StandardFetcher.java:335)
        at
org.blojsom.fetcher.CachingFetcher$AllCategoriesFetcherThrea
d.run(CachingFetcher.java:415)
        - locked <0x77797fe0> (a
com.opensymphony.oscache.general.GeneralCacheAdministrator)
        at java.lang.Thread.run(Thread.java:595)


Those java.io.* calls show we are hitting the FS, and those
two .load* method calls are frequently seen in my thread
dumps.  That is likely because blog.simpy.com has a pretty
busy FS, so things get slow in there.  I'd imagine you'd
want to cache comments, though, as they typically don't
change that frequently, expiring them only when a new
comment gets added, perhaps.  Maybe that's already doable,
and I just haven't configured it properly to cache comments,
too?

Otis


----- Original Message ----
From: David Czarnecki <davidblojsom.com>
To: blojsom-users <blojsom-userslists.sourceforge.net>
Sent: Monday, December 4, 2006 11:33:44 AM
Subject: Re: [Blojsom-users] Resource contention bug?

The OSCache references in the lock waiting make me think
it's an issue with
OSCache. D'you try using OSCache 2.3.2?

<h
ttp://opensymphony.com/oscache/download.action>

On 12/4/06 12:20 AM, "ogjunk-blojsomyahoo.com" <ogjunk-blojsomyahoo.com>
wrote:

> Hi,
> 
> This may be just something for Dave to look at, but
maybe others would be
> interested, too.  I run Blojsom 2.30 at http://blog.simpy.com/
under Jetty.
> I've noticed that right after I restart the servlet
container the load shoots
> up, so I decided to see what the JVM is doing with kill
-QUIT .  I did that on
> a few occasions and often saw Blojsom in states like
these:
> 
> 
> Full thread dump Java HotSpot(TM) Server VM
(1.5.0_08-b03 mixed mode):
> 
> "Thread-410" daemon prio=1 tid=0x6cbc3cd8
nid=0x4f21 runnable
> [0x5e2f6000..0x5e2f6fb0]
>         at
sun.nio.cs.UTF_8$Encoder.encodeArrayLoop(UTF_8.java:460)
>         at
sun.nio.cs.UTF_8$Encoder.encodeLoop(UTF_8.java:575)
>         at
java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:5
44)
>         at
java.lang.StringCoding$CharsetSE.encode(StringCoding.java:34
2)
>         at
java.lang.StringCoding.encode(StringCoding.java:378)
>         at java.lang.String.getBytes(String.java:812)
>         at
java.io.UnixFileSystem.getLastModifiedTime(Native Method)
>         at java.io.File.lastModified(File.java:795)
>         at
org.blojsom.util.BlojsomUtils$1.compare(BlojsomUtils.java:10
23)
>         at java.util.Arrays.mergeSort(Arrays.java:1307)
>         at java.util.Arrays.mergeSort(Arrays.java:1296)
>         at java.util.Arrays.mergeSort(Arrays.java:1296)
>         at java.util.Arrays.sort(Arrays.java:1223)
>         at 
> 
org.blojsom.blog.FileBackedBlogEntry.loadComments(FileBacked
BlogEntry.java:226>
)
>         at 
>
org.blojsom.blog.FileBackedBlogEntry.load(FileBackedBlogEntr
y.java:528)
>         at 
>
org.blojsom.fetcher.StandardFetcher.getEntriesForCategory(St
andardFetcher.java
> :231)
>         at 
>
org.blojsom.fetcher.StandardFetcher.getEntriesAllCategories(
StandardFetcher.ja
> va:335)
>         at 
>
org.blojsom.fetcher.CachingFetcher$AllCategoriesFetcherThrea
d.run(CachingFetch
> er.java:415)
>         - locked <0x74595af0> (a
>
com.opensymphony.oscache.general.GeneralCacheAdministrator)
>         at java.lang.Thread.run(Thread.java:595)
> 
> "Thread-409" daemon prio=1 tid=0x6c55f550
nid=0x4f20 waiting for monitor entry
> [0x5e377000..0x5e377f30]
>         at 
>
org.blojsom.fetcher.CachingFetcher$AllCategoriesFetcherThrea
d.run(CachingFetch
> er.java:414)
>         - waiting to lock <0x74595af0> (a
>
com.opensymphony.oscache.general.GeneralCacheAdministrator)
>         at java.lang.Thread.run(Thread.java:595)
> 
> "Thread-408" daemon prio=1 tid=0x6222bf60
nid=0x4ef0 waiting for monitor entry
> [0x5e3f8000..0x5e3f8eb0]
>         at 
>
org.blojsom.fetcher.CachingFetcher$AllCategoriesFetcherThrea
d.run(CachingFetch
> er.java:414)
>         - waiting to lock <0x74595af0> (a
>
com.opensymphony.oscache.general.GeneralCacheAdministrator)
>         at java.lang.Thread.run(Thread.java:595)
> 
> ....
> 
> Note Thread-409|408, Dave.  I often see dozens of these
locked at the exact
> same point/line.  I haven't looked at the source, but
it feels like some
> resource contention issue that you may want to
investigate.
> 
> Otis
> 
> 
> 
> 
>
------------------------------------------------------------
-------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the
chance to share your
> opinions on IT & business topics through brief
surveys - and earn cash
> http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Blojsom-users mailing list
> Blojsom-userslists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers

-- 
David Czarnecki

http://www.blojsom.com/b
log/ | http://blojsom.sf.net



------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Blojsom-users mailing list
Blojsom-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers




------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Blojsom-users mailing list
Blojsom-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers
Resource contention bug?
user name
2006-12-04 18:25:46
Comments, etc. are cached with the entry. This is when data
is being loaded
in the cache. 

On 12/4/06 12:55 PM, "ogjunk-blojsomyahoo.com" <ogjunk-blojsomyahoo.com>
wrote:

>> From that thread dump, it looked like it might be
the way Blojsom is calling
>> OSCache that's the problem, but maybe I
misinterpreted the output.
> I think there are a few other places where there's room
for optimization,
> although I'm not sure about the priority of this stuff
now that 3.* is based
> on DB, and not FS any more:
> 
> "Thread-402" daemon prio=1 tid=0x6fc29eb0
nid=0x731c runnable
> [0x68afc000..0x68afcf30]
>         at
java.io.UnixFileSystem.getLastModifiedTime(Native Method)
>         at java.io.File.lastModified(File.java:795)
>         at
org.blojsom.util.BlojsomUtils$1.compare(BlojsomUtils.java:10
24)
>         at java.util.Arrays.mergeSort(Arrays.java:1307)
>         at java.util.Arrays.mergeSort(Arrays.java:1296)
>         at java.util.Arrays.mergeSort(Arrays.java:1296)
>         at java.util.Arrays.mergeSort(Arrays.java:1296)
>         at java.util.Arrays.sort(Arrays.java:1223)
>         at 
> 
org.blojsom.blog.FileBackedBlogEntry.loadComments(FileBacked
BlogEntry.java:226>
)
>         at 
>
org.blojsom.blog.FileBackedBlogEntry.load(FileBackedBlogEntr
y.java:528)
>         at 
>
org.blojsom.fetcher.StandardFetcher.getEntriesForCategory(St
andardFetcher.java
> :231)
>         at 
>
org.blojsom.fetcher.StandardFetcher.getEntriesAllCategories(
StandardFetcher.ja
> va:335)
>         at 
>
org.blojsom.fetcher.CachingFetcher$AllCategoriesFetcherThrea
d.run(CachingFetch
> er.java:415)
>         - locked <0x77797fe0> (a
>
com.opensymphony.oscache.general.GeneralCacheAdministrator)
>         at java.lang.Thread.run(Thread.java:595)
> 
> 
> Those java.io.* calls show we are hitting the FS, and
those two .load* method
> calls are frequently seen in my thread dumps.  That is
likely because
> blog.simpy.com has a pretty busy FS, so things get slow
in there.  I'd imagine
> you'd want to cache comments, though, as they typically
don't change that
> frequently, expiring them only when a new comment gets
added, perhaps.  Maybe
> that's already doable, and I just haven't configured it
properly to cache
> comments, too?
> 
> Otis
> 
> 
> ----- Original Message ----
> From: David Czarnecki <davidblojsom.com>
> To: blojsom-users <blojsom-userslists.sourceforge.net>
> Sent: Monday, December 4, 2006 11:33:44 AM
> Subject: Re: [Blojsom-users] Resource contention bug?
> 
> The OSCache references in the lock waiting make me
think it's an issue with
> OSCache. D'you try using OSCache 2.3.2?
> 
> <h
ttp://opensymphony.com/oscache/download.action>
> 
> On 12/4/06 12:20 AM, "ogjunk-blojsomyahoo.com" <ogjunk-blojsomyahoo.com>
> wrote:
> 
>> Hi,
>> 
>> This may be just something for Dave to look at, but
maybe others would be
>> interested, too.  I run Blojsom 2.30 at http://blog.simpy.com/
under Jetty.
>> I've noticed that right after I restart the servlet
container the load shoots
>> up, so I decided to see what the JVM is doing with
kill -QUIT .  I did that
>> on
>> a few occasions and often saw Blojsom in states
like these:
>> 
>> 
>> Full thread dump Java HotSpot(TM) Server VM
(1.5.0_08-b03 mixed mode):
>> 
>> "Thread-410" daemon prio=1 tid=0x6cbc3cd8
nid=0x4f21 runnable
>> [0x5e2f6000..0x5e2f6fb0]
>>         at
sun.nio.cs.UTF_8$Encoder.encodeArrayLoop(UTF_8.java:460)
>>         at
sun.nio.cs.UTF_8$Encoder.encodeLoop(UTF_8.java:575)
>>         at
java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:5
44)
>>         at
java.lang.StringCoding$CharsetSE.encode(StringCoding.java:34
2)
>>         at
java.lang.StringCoding.encode(StringCoding.java:378)
>>         at
java.lang.String.getBytes(String.java:812)
>>         at
java.io.UnixFileSystem.getLastModifiedTime(Native Method)
>>         at java.io.File.lastModified(File.java:795)
>>         at
org.blojsom.util.BlojsomUtils$1.compare(BlojsomUtils.java:10
23)
>>         at
java.util.Arrays.mergeSort(Arrays.java:1307)
>>         at
java.util.Arrays.mergeSort(Arrays.java:1296)
>>         at
java.util.Arrays.mergeSort(Arrays.java:1296)
>>         at java.util.Arrays.sort(Arrays.java:1223)
>>         at 
>> 
> 
org.blojsom.blog.FileBackedBlogEntry.loadComments(FileBacked
BlogEntry.java:226>
>
> )
>>         at 
>>
org.blojsom.blog.FileBackedBlogEntry.load(FileBackedBlogEntr
y.java:528)
>>         at 
>> 
org.blojsom.fetcher.StandardFetcher.getEntriesForCategory(St
andardFetcher.jav>>
a
>> :231)
>>         at 
>> 
org.blojsom.fetcher.StandardFetcher.getEntriesAllCategories(
StandardFetcher.j>>
a
>> va:335)
>>         at 
>> 
org.blojsom.fetcher.CachingFetcher$AllCategoriesFetcherThrea
d.run(CachingFetc>>
h
>> er.java:415)
>>         - locked <0x74595af0> (a
>>
com.opensymphony.oscache.general.GeneralCacheAdministrator)
>>         at java.lang.Thread.run(Thread.java:595)
>> 
>> "Thread-409" daemon prio=1 tid=0x6c55f550
nid=0x4f20 waiting for monitor
>> entry
>> [0x5e377000..0x5e377f30]
>>         at 
>> 
org.blojsom.fetcher.CachingFetcher$AllCategoriesFetcherThrea
d.run(CachingFetc>>
h
>> er.java:414)
>>         - waiting to lock <0x74595af0> (a
>>
com.opensymphony.oscache.general.GeneralCacheAdministrator)
>>         at java.lang.Thread.run(Thread.java:595)
>> 
>> "Thread-408" daemon prio=1 tid=0x6222bf60
nid=0x4ef0 waiting for monitor
>> entry
>> [0x5e3f8000..0x5e3f8eb0]
>>         at 
>> 
org.blojsom.fetcher.CachingFetcher$AllCategoriesFetcherThrea
d.run(CachingFetc>>
h
>> er.java:414)
>>         - waiting to lock <0x74595af0> (a
>>
com.opensymphony.oscache.general.GeneralCacheAdministrator)
>>         at java.lang.Thread.run(Thread.java:595)
>> 
>> ....
>> 
>> Note Thread-409|408, Dave.  I often see dozens of
these locked at the exact
>> same point/line.  I haven't looked at the source,
but it feels like some
>> resource contention issue that you may want to
investigate.
>> 
>> Otis
>> 
>> 
>> 
>> 
>>
------------------------------------------------------------
-------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get
the chance to share your
>> opinions on IT & business topics through brief
surveys - and earn cash
>> http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> Blojsom-users mailing list
>> Blojsom-userslists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers

-- 
David Czarnecki

http://www.blojsom.com/b
log/ | http://blojsom.sf.net



------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Blojsom-users mailing list
Blojsom-userslists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/blojsom-u
sers
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )