Re: Save session information in Memory database
What do you mean it will slow down? We have an application which saves about 5 MB of data in session when user is working with some portion of application, so when about 200 users login we go about 1 GB of ram and Tomcat starts running out of heap memory, as all the session data goes in heap memory, So i was hoping if i can persist the data in database, then i can free up some heap memory from tomcat. Will this work? or tomcat will have session in Heap Memory only even if i prefer to persist to write it in database Ashish On Thu, Sep 8, 2011 at 5:16 PM, Christopher Schultz ch...@christopherschultz.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ashish, On 9/8/2011 2:17 PM, Ashish Kulkarni wrote: Has anyone configured tomcat to save session information in memory database like java DB or hsqldb, I'm sure it can be done, as Tomcat provides org.apache.catalina.session.JDBCStore for use with the PersistentManager. On the other hand, if you're going to use an in-memory database, why bother configuring it at all? It will just slow you down IMO. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5pMKcACgkQ9CaO5/Lv0PCaTQCgsd2LFfmaa5MhhlDexq9UXBfZ l0oAniPxSwQRV5L0l65QH0sNsaJ91CeX =H3ho -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Ashish www.ayurwellness.com www.mysoftwareneeds.com
RE: Save session information in Memory database
From: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com] Subject: Re: Save session information in Memory database What do you mean it will slow down? You would be making requests across a wire rather than reads and writes to memory. we go about 1 GB of ram and Tomcat starts running out of heap memory So what stops you from configuring a larger heap? RAM is cheap and 64-bit operating environments are plentiful. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Save session information in Memory database
Hi The problem is we are running on 32 bit system and cannot go beyond 1.5 GB or ram, because of some clients limitations. Is it possible to save session in database, instead of heap memory which would help us, the speed is ok if it slows down a little, That is why i was looking at in memory database instead or conventional database Regards Ashish On Fri, Sep 9, 2011 at 10:50 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com] Subject: Re: Save session information in Memory database What do you mean it will slow down? You would be making requests across a wire rather than reads and writes to memory. we go about 1 GB of ram and Tomcat starts running out of heap memory So what stops you from configuring a larger heap? RAM is cheap and 64-bit operating environments are plentiful. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Ashish www.ayurwellness.com www.mysoftwareneeds.com
Re: Save session information in Memory database
On 09/09/2011 15:58, Ashish Kulkarni wrote: Hi The problem is we are running on 32 bit system and cannot go beyond 1.5 GB or ram, because of some clients limitations. Is it possible to save session in database, instead of heap memory which would help us, the speed is ok if it slows down a little, That is why i was looking at in memory database instead or conventional database Do you *really* need to save all of that data in the session? p Regards Ashish On Fri, Sep 9, 2011 at 10:50 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com] Subject: Re: Save session information in Memory database What do you mean it will slow down? You would be making requests across a wire rather than reads and writes to memory. we go about 1 GB of ram and Tomcat starts running out of heap memory So what stops you from configuring a larger heap? RAM is cheap and 64-bit operating environments are plentiful. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: OpenPGP digital signature
Re: Save session information in Memory database
Hi I have inherited this application, and it was developed this way, i dont have time and resources to analyze this application to start removing data from session, so i am looking for ways to get it working without having to go through this process of removing data from session, I thought if i could save session information in a database instead of in heap it would work, and so in memory database and it would be faster to access then regular DB2 database So any ideas Ashish On Fri, Sep 9, 2011 at 12:46 PM, Pid p...@pidster.com wrote: On 09/09/2011 15:58, Ashish Kulkarni wrote: Hi The problem is we are running on 32 bit system and cannot go beyond 1.5 GB or ram, because of some clients limitations. Is it possible to save session in database, instead of heap memory which would help us, the speed is ok if it slows down a little, That is why i was looking at in memory database instead or conventional database Do you *really* need to save all of that data in the session? p Regards Ashish On Fri, Sep 9, 2011 at 10:50 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com] Subject: Re: Save session information in Memory database What do you mean it will slow down? You would be making requests across a wire rather than reads and writes to memory. we go about 1 GB of ram and Tomcat starts running out of heap memory So what stops you from configuring a larger heap? RAM is cheap and 64-bit operating environments are plentiful. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Ashish www.ayurwellness.com www.mysoftwareneeds.com
Re: Save session information in Memory database
From: Ashish Kulkarni ashish.kulkarn...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Friday, September 9, 2011 11:38 AM Subject: Re: Save session information in Memory database Hi I have inherited this application, and it was developed this way, i dont have time and resources to analyze this application to start removing data from session, so i am looking for ways to get it working without having to go through this process of removing data from session, I thought if i could save session information in a database instead of in heap it would work, and so in memory database and it would be faster to access then regular DB2 database So any ideas Ashish -- Ashish, Have you considered ehcache? http://ehcache.org/ - Bob
Re: Save session information in Memory database
Hi I will look into Ehcache, but will this manage data we save in session, because i dont have time to change code, but try to move the session data out of tomcat, and into a database, Ashish On Fri, Sep 9, 2011 at 2:52 PM, Bob Hall rfha...@yahoo.com wrote: From: Ashish Kulkarni ashish.kulkarn...@gmail.com To: Tomcat Users List users@tomcat.apache.org Sent: Friday, September 9, 2011 11:38 AM Subject: Re: Save session information in Memory database Hi I have inherited this application, and it was developed this way, i dont have time and resources to analyze this application to start removing data from session, so i am looking for ways to get it working without having to go through this process of removing data from session, I thought if i could save session information in a database instead of in heap it would work, and so in memory database and it would be faster to access then regular DB2 database So any ideas Ashish -- Ashish, Have you considered ehcache? http://ehcache.org/ - Bob -- Ashish www.ayurwellness.com www.mysoftwareneeds.com
Re: Save session information in Memory database
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ashish, On 9/9/2011 10:22 AM, Ashish Kulkarni wrote: What do you mean it will slow down? Tomcat's JDBC-based session store serializes session objects in order to save them. Serialization takes time. Ergo, using an in-memory database will be slower than simply using plain-old memory to store objects. We have an application which saves about 5 MB of data in session when user is working with some portion of application, so when about 200 users login we go about 1 GB of ram and Tomcat starts running out of heap memory, as all the session data goes in heap memory, So i was hoping if i can persist the data in database, then i can free up some heap memory from tomcat. Er... you're asking if an in-memory database can free-up memory? Will this work? or tomcat will have session in Heap Memory only even if i prefer to persist to write it in database If you don't want the data taking up memory on your app server, you have two options: 1. Write to on-disk database 2. Write to remote, in-memory database Honestly, if you're going to go to a database, you may as well make it a durable (that is, not in-memory) one. Some folks around here use memcached as a session-backing system. You might want to look into doing that. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5qhp0ACgkQ9CaO5/Lv0PD/4ACfSoe14yhhON08A3J6gG5AXUzD fioAoIbxANtX/uLlfT/0sw+pt4659wen =/sti -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Save session information in Memory database
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ashish, On 9/9/2011 2:38 PM, Ashish Kulkarni wrote: I have inherited this application, and it was developed this way, i dont have time and resources to analyze this application to start removing data from session, so i am looking for ways to get it working without having to go through this process of removing data from session, I thought if i could save session information in a database instead of in heap it would work You may find that much of this data is not serializable, which might mean that you will have to go through a process anyway. and so in memory database and it would be faster to access then regular DB2 database Yes, an in-memory database will be faster, but ... it ... takes ... memory. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5qh5EACgkQ9CaO5/Lv0PDJ2ACfcXt66P8C5+oXtn+BSyNXzMFm t0QAniNUGoDH+2jMzYN7r/XEL/uDPgk/ =ubmn -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Save session information in Memory database
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ashish, On 9/8/2011 2:17 PM, Ashish Kulkarni wrote: Has anyone configured tomcat to save session information in memory database like java DB or hsqldb, I'm sure it can be done, as Tomcat provides org.apache.catalina.session.JDBCStore for use with the PersistentManager. On the other hand, if you're going to use an in-memory database, why bother configuring it at all? It will just slow you down IMO. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5pMKcACgkQ9CaO5/Lv0PCaTQCgsd2LFfmaa5MhhlDexq9UXBfZ l0oAniPxSwQRV5L0l65QH0sNsaJ91CeX =H3ho -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org