<div dir="ltr"><div>ok guys, </div>
<div>I figured this out. It works beatifully now!</div>
<div>All I had to do is download (per instructions on the logback website) the c3po pooling library </div>
<div>and modify the appender's xml file to:</div>
<div> </div>
<div><appender name="DB" class="ch.qos.logback.classic.db.DBAppender"><br> <connectionSource class="ch.qos.logback.core.db.DataSourceConnectionSource"><br> <dataSource class="com.mchange.v2.c3p0.ComboPooledDataSource"><br>
<driverClass>com.mysql.jdbc.Driver</driverClass><br> <jdbcUrl>jdbc:mysql://localhost:3306/Greg</jdbcUrl><br> <user>greg</user><br> <password>greg</password><br>
</dataSource><br> </connectionSource><br> </appender></div>
<div> </div>
<div>In my case the database name is: Greg, password and username: greg</div>
<div>It works great and it is in fact very fast now. I just loaded it with 50,000 records without any problems whatsoever.</div>
<div>I guess is safe to say "read the documentation first man...!" :-)</div>
<div>Cheers,</div>
<div>Greg </div>
<div><br><br> </div>
<div class="gmail_quote">On Tue, Sep 23, 2008 at 9:38 AM, Greg Flex <span dir="ltr"><<a href="mailto:greg.flex@gmail.com">greg.flex@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div dir="ltr">
<div>Ok no problem.</div>
<div>I'm running the program and the database on just one computer.</div>
<div>It's all local and no one is connecting to it....</div>
<div>It's a Xeon 2.66 GHz machine with 4 cores and 3GB of ram.</div>
<div>I'm running Windows XP. (the newest service pack)</div>
<div>I'm looking at the Task Manager right now and I see that over 2GB of memory is available.</div>
<div>I just ran my program again but this time I've reduced the Thread.sleep to just 10ms. </div>
<div>Instead of 40,000 records just about 8,000 got written.</div>
<div>This means 10-ms is too fast and MySQL can't handle it or something.</div>
<div>I'm not sure but from the documentation on line looks like the connection pooling is the way out...</div>
<div>I don't know and I guess I don't understand that well the notion of "connection pooling" so I don't know</div>
<div>how to set it up/create one.</div>
<div>Any suggestions? </div>
<div>Thanks a lot</div>
<div>Greg.</div>
<div>
<div></div>
<div class="Wj3C7c">
<div> </div>
<div><br><br> </div>
<div class="gmail_quote">On Tue, Sep 23, 2008 at 9:06 AM, Thorbjørn Ravn Andersen <span dir="ltr"><<a href="mailto:ravn@runjva.com" target="_blank">ravn@runjva.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Greg Flex skrev:<br>
<div>> I didn't "touch" the configuration of MySQL at all. I assume it's the<br>> normal/standard configuration that comes with it.....<br>> I ran the program again for some time last night. I wrote one log.xxx<br>
> then paused the thread for about 100ms then wrote another log.xxx<br>> I managed to write 39,000 logs to MySQL without any problems. It looks<br>> to me then that the "speed" has something to do here.<br>
> If writting too fast (too many records at once) to the database (both<br>> MySQL and HSQLDB) they simply "choke"....<br>> I don't know however if this is the problem; just my observations.....<br>
> Do you think this might cause it?<br>> Greg.<br></div>I am not thinking of the configuration of the database software as such<br>but of the configuration of the computer which runs the database software.<br><br>I suspect that you have less physical memory available to the database<br>
than they think they can use, hence the operating system starts swapping<br>which kills performance.<br><br>Can you please describe your setup in detail so we can replicate the<br>scenario? I.e. number of computers involved, connections between them,<br>
network performance, memory assigned, operating systems used, etc.<br><font color="#888888"><br>/Thorbjørn<br></font>
<div>
<div></div>
<div>_______________________________________________<br>Logback-user mailing list<br>Logback-user@qos.ch<br><a href="http://qos.ch/mailman/listinfo/logback-user" target="_blank">http://qos.ch/mailman/listinfo/logback-user</a><br>
</div></div></blockquote></div><br></div></div></div></blockquote></div><br></div>