Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Sreejith NP
Unable to load the page when number of sites are high
December 28, 2012 2:18 AM
Answer

Sreejith NP

Rank: New Member

Posts: 12

Join Date: March 13, 2012

Recent Posts

My Liferay installation ( 6.1 CE GA1 ) is having 35000 sites. I have created these sites by iterating the site creation process. But after creating these sites and 5 users per site, the page is not getting displayed in time. It takes around 20-30 minutes to display the page.

While hitting the home page , it is found that a lot of queries are fired on the backend. The snapshot is given below.

Hibernate: select dlfileentr0_.fileEntryId as fileEntr1_85_, dlfileentr0_.uuid_ as uuid2_85_, dlfileentr0_.groupId as groupId85_, dlfileentr0_.companyId as companyId85_, dlfileentr0_.userId as userId85_, dlfileentr0_.userName as userName85_, dlfileentr0_.versionUserId as versionU7_85_, dlfileentr0_.versionUserName as versionU8_85_, dlfileentr0_.createDate as createDate85_, dlfileentr0_.modifiedDate as modifie10_85_, dlfileentr0_.repositoryId as reposit11_85_, dlfileentr0_.folderId as folderId85_, dlfileentr0_.name as name85_, dlfileentr0_.extension as extension85_, dlfileentr0_.mimeType as mimeType85_, dlfileentr0_.title as title85_, dlfileentr0_.description as descrip17_85_, dlfileentr0_.extraSettings as extraSe18_85_, dlfileentr0_.fileEntryTypeId as fileEnt19_85_, dlfileentr0_.version as version85_, dlfileentr0_.size_ as size21_85_, dlfileentr0_.readCount as readCount85_, dlfileentr0_.smallImageId as smallIm23_85_, dlfileentr0_.largeImageId as largeIm24_85_, dlfileentr0_.custom1ImageId as custom25_85_, dlfileentr0_.custom2ImageId as custom26_85_ from DLFileEntry dlfileentr0_ where (dlfileentr0_.groupId=? )AND(dlfileentr0_.folderId=? ) order by dlfileentr0_.folderId ASC , dlfileentr0_.name ASC limit ?
Hibernate: select dlfileentr0_.fileEntryId as fileEntr1_85_, dlfileentr0_.uuid_ as uuid2_85_, dlfileentr0_.groupId as groupId85_, dlfileentr0_.companyId as companyId85_, dlfileentr0_.userId as userId85_, dlfileentr0_.userName as userName85_, dlfileentr0_.versionUserId as versionU7_85_, dlfileentr0_.versionUserName as versionU8_85_, dlfileentr0_.createDate as createDate85_, dlfileentr0_.modifiedDate as modifie10_85_, dlfileentr0_.repositoryId as reposit11_85_, dlfileentr0_.folderId as folderId85_, dlfileentr0_.name as name85_, dlfileentr0_.extension as extension85_, dlfileentr0_.mimeType as mimeType85_, dlfileentr0_.title as title85_, dlfileentr0_.description as descrip17_85_, dlfileentr0_.extraSettings as extraSe18_85_, dlfileentr0_.fileEntryTypeId as fileEnt19_85_, dlfileentr0_.version as version85_, dlfileentr0_.size_ as size21_85_, dlfileentr0_.readCount as readCount85_, dlfileentr0_.smallImageId as smallIm23_85_, dlfileentr0_.largeImageId as largeIm24_85_, dlfileentr0_.custom1ImageId as custom25_85_, dlfileentr0_.custom2ImageId as custom26_85_ from DLFileEntry dlfileentr0_ where (dlfileentr0_.groupId=? )AND(dlfileentr0_.folderId=? ) order by dlfileentr0_.folderId ASC , dlfileentr0_.name ASC limit ? ........ and so on


Once the page is displayed, it takes around 30 minutes for log-in also...

Can anybody help me out??


My actual requirement is to create around 2500000 sites ...
Venkat Koppavolu
RE: Unable to load the page when number of sites are high
December 28, 2012 5:17 PM
Answer

Venkat Koppavolu

Rank: Junior Member

Posts: 85

Join Date: July 25, 2010

Recent Posts

Hi Sreejith,

Could you please explain what exactly requirement, please give some more details of it, forum can help you to give best solution to implement.
1. Creating around 2500000 sites then.....

Thanks,
Venkat
Sreejith NP
RE: Unable to load the page when number of sites are high
December 28, 2012 11:11 PM
Answer

Sreejith NP

Rank: New Member

Posts: 12

Join Date: March 13, 2012

Recent Posts

My project is to create web identity for 250000 ( sorry.. it is not 2500000 ) units across the country (India). I am creating sites and its users by iterating the process of site/user creation for each Indian state. While the number of sites were around 12000, everything was working fine. In a single stretch I added around 22000 sites. After that my site is not at all responding in time.
I have removed indexing process while creating the site as it was taking lot of time. After removing indexing the sites were created at a speed of 3 sites / sec where as with indexing the speed was 45sec for one site. I removed the indexing to speed up the process. Otherwise the entire process of site creation will take years to complete.

Please help me out to improve the performance. Now the site pages are taking more than 30 min. to load
Hitoshi Ozawa
RE: Unable to load the page when number of sites are high
December 29, 2012 12:47 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

So did you reindex after you've created your sites?
Jelmer Kuperus
RE: Unable to load the page when number of sites are high
December 29, 2012 2:24 AM
Answer

Jelmer Kuperus

Rank: Liferay Legend

Posts: 1192

Join Date: March 10, 2010

Recent Posts

I have no idea if Liferay will support 250000 sites on a single instance. It will probably require some effort to figure out why liferay is slow

The most likely candidates imo would be :

  • missing indexes on the database
  • insufficient memory allocated to the database (if indexes wont fit in memory,you either end up swapping or doing lots of full table scans)
  • Insufficient memory allocated to the liferay instance (liferay caches all db entities it loads in memory, you'd need lots and lots of memory)
  • Your java process is running out of memory ( check the log for out of memory exceptions)
  • A flaw in the way liferay is designed


Here's a bunch of things to try in order to diagnose what is making your app run slow

  • Create some threaddumps while your page is taking it's sweet time to load, this should tell you what the thread serving your page is doing at that time, make 3 - 5 threaddumps 5 seconds apart, tda might help with interpreting the results
  • Some databases let you see see what queries are running slow, for instance mysql lets you configure the slow query log
  • check your swap file usage, on linux you can use vmstat, you should be looking at the “si” and “so” columns, which represent the amount of memory paged-in and the amount of memory paged-out.
Hitoshi Ozawa
RE: Unable to load the page when number of sites are high
December 29, 2012 2:55 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

jelmer, he's saying he's removed indexing because it was slowing down adding sites. He should know that if he removes the index, query operation is going to get slow because it's going to do a full scan every time.
Jelmer Kuperus
RE: Unable to load the page when number of sites are high
December 29, 2012 3:12 AM
Answer

Jelmer Kuperus

Rank: Liferay Legend

Posts: 1192

Join Date: March 10, 2010

Recent Posts

Ah i missed that Though reading that post i am not sure if he's referring to database indexes or the Lucene indexing process
Sreejith NP
RE: Unable to load the page when number of sites are high
December 29, 2012 10:59 AM
Answer

Sreejith NP

Rank: New Member

Posts: 12

Join Date: March 13, 2012

Recent Posts

After making 35000 sites, I reindexed all search indexes from Server Administration UI and did a database reindexing too. ( Hope
Control Panel -> Server Admin ->-> Reindex all Search Index
will recreate Lucene index. )

Is there any limit for number of sites taht a single installation of Liferay can handle?
Jelmer Kuperus
RE: Unable to load the page when number of sites are high
December 29, 2012 12:26 PM
Answer

Jelmer Kuperus

Rank: Liferay Legend

Posts: 1192

Join Date: March 10, 2010

Recent Posts

will recreate Lucene index. )


That won't fix your performance problem.
Sreejith NP
RE: Unable to load the page when number of sites are high
December 29, 2012 6:02 PM
Answer

Sreejith NP

Rank: New Member

Posts: 12

Join Date: March 13, 2012

Recent Posts

jelmer kuperus:


That won't fix your performance problem.



any solution for this issue??
Jelmer Kuperus
RE: Unable to load the page when number of sites are high
December 30, 2012 1:27 AM
Answer

Jelmer Kuperus

Rank: Liferay Legend

Posts: 1192

Join Date: March 10, 2010

Recent Posts

I already told you what you need to do to diagnose the problem in my previous post. waiting around until someone comes comes along on the forum that has dealt with the exact same problem that you have imho is an exercise in futility because what you are attempting is so uncommon.
Sreejith NP
RE: Unable to load the page when number of sites are high
December 30, 2012 2:00 AM
Answer

Sreejith NP

Rank: New Member

Posts: 12

Join Date: March 13, 2012

Recent Posts

I have been working on this issue for the last couple of months. I tried all the possible ways I know but in vain. Still I am trying;

is there any limitation on the no. of sites that could be created??
Jelmer Kuperus
RE: Unable to load the page when number of sites are high
December 30, 2012 2:32 AM
Answer

Jelmer Kuperus

Rank: Liferay Legend

Posts: 1192

Join Date: March 10, 2010

Recent Posts

You are asking the wrong questions. See what's going on then draw your own conclusions. Any "hard limits" would be completely situational
If you really have been working on this for months then get someone more experienced on board it should not be overly hard to diagnose your problem using the techniques I described.
Hitoshi Ozawa
RE: Unable to load the page when number of sites are high
December 29, 2012 6:27 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

That won't fix your performance problem.


He's also creating users per site. From his his initial post, there also seems to be large number of access to the document and media library. He probably had some permissions setup too. I don't think it's the number of sites that's the issue but more of total number of assets/permissions and available hardware resources.

It's difficult to say from a very limited information he's only given use still, creating a lucene index may speed things up or it may decrease performance if hardware resource issue is the main problem but he should have a working lucene index anyways.

My sugggestion is to get somebody who knows what he's doing to help this guy on site. When there's many assets and/or users, it's just not liferay issue. You'll need to know the hardware, os, jdk, application server, database, and system architecture.
Sreejith NP
RE: Unable to load the page when number of sites are high
December 29, 2012 6:34 PM
Answer

Sreejith NP

Rank: New Member

Posts: 12

Join Date: March 13, 2012

Recent Posts

My Liferay is loaded on a server having 64 GB RAM, dual quad core processor. using jdk 1.6 and the application id deployed under tomcat (the one which was bundled with liferay). At the back-end, I am using Postgres 9.1.

seems to be large number of access to the document and media library.


Not much web contenst have been created yet in these sites and hence access to the document and media library is not high