forgive my poor English, but i really want to have my problem fixed and join you though i am not a programer.
i use drupal6.6 to convert my origin website , which is a great flux one in my school about 5000IP/day .
i fixed a lot of problems through GOOGLE , tpl.php,form.api,CCK+VIEWS,etc
but i really come up a problem : too slow to do some update after login!
every day , my website will have 50 students and teachers have to update their information like news and so on . they tell me that the new test website(drupal) is great but the performance is too bad.
could you please tell me how to do, thx a lot
my server:windows2003(i have to) + apache2.2+php5.25+eaccelerator+mysql+drupal6.6
modules:CCK+VIEWS+OG mainly
here is my devel data:
1 stand for the fist time i click a menu
2 stand for the same menu page after my reflesh
(1)drupal/admin/generate
the first time i click:
1.Executed 184 queries in 768.2 milliseconds. Queries taking longer than 5 ms and queries executed more than once, are highlighted.
after i refresh:
2.Executed 65 queries in 50.3 milliseconds. Queries taking longer than 5 ms and queries executed more than once, are highlighted.
(2)drupal/admin/
1.Executed 100 queries in 178.25 milliseconds.23.13 1 locale,19.87 1 locale,8.69 1 locale
locale
SELECT s.lid, t.translation, s.version FROM locales_source s LEFT JOIN locales_target t ON s.lid = t.lid AND t.language = 'zh-hans' WHERE s.source = 'For more information, see the online handbook entry for configuring cron jobs.' AND s.textgroup = 'default'
2.Executed 99 queries in 90.36 milliseconds.
(3)drupal/admin/content/node
1.Executed 126 queries in 343.66 milliseconds.
69.72 1 _locale_rebuild_js
SELECT s.lid, s.source, t.plid, t.plural, t.translation FROM locales_source s LEFT JOIN locales_target t ON s.lid = t.lid AND t.language = 'zh-hans' WHERE s.location LIKE '%.js%' AND s.textgroup = 'default' ORDER BY t.plural DESC
2.Executed 102 queries in 64.45 milliseconds.
Comments
Is caching enabled?
On your site, see: Administer > Site configuration > Performance, with page cache, block cache, and other options.
If that standard caching is not enough, you might install one or two performance modules. If you are on a shared server, try Boost. If on a dedicated server, there are several suitable options: Boost, Cache Router (which includes Memcache), etc.
For tutorials and more information, there is for example the handbook page Drupal caching, speed and performance, with about 25 selected Drupal performance resources at this moment. I think I'm going to also include the above brief general advice on that page.
i have already enable the
i have already enable the cache Administer > Site configuration > Performance ,page cache , block cache is not enable due to OG-module ,and CSS , javascript cache are both enable too. Actually ,i try boost and cache router modules too.
but they are just cache to the Anonymous ,and i found out that i dont even need to try boost and cache router ,because drupal6 page cache is great enough! i use apache ab -n 10000 -c 100 http://localhost/drupal to test.
the other reason i give up using boost is that it do not support windows-servers
what i actually ask is that i am so confuse about that drupal seems have no cache to the page after logined. i found out this using ie-httpwatch
thank you very much for your suggestion and of course you're my first reply after joining this passion group
Logged in and non-logged in users
haojiang wrote:
>but they are just cache to the Anonymous
That's true for Boost, but it seems Cache Router (which includes Memcache) can also help logged in users. See Compatible with Memcache module?, on a firebus' solution using Boost, Memcache and Advanced Cache together. (Firebus is, with robertDouglass, one of the two developers of Advanced Cache, also good for logged in users).
However, I think you suggested about 50 of your 5000 daily users are logged in (1%), and 99% are anonymous. If this is really the case, think that good caching for your non-logged in visitors means greatly increased server resources available for logged-in members.
>and i found out that i dont even need to try boost and cache router ,because drupal6 page cache is great enough!
Yes, it's truly great compared to no cache. And static page caching is even much more efficient (with Boost's interesting .htaccess trick to entirely avoid using PHP and database for non-logged in visitors). See some graphs comparing that standard database cache with static page cache.
You know, as hosts explain many times, servers often have problems with the load caused by dynamic PHP applications and database queries, but usually no trouble serving a much larger number of purely static, old good html pages.
>i use apache ab -n 10000 -c 100 http://localhost/drupal to test.
So you know ApacheBench (Apache's ab). I think you are very capable of following the good troubleshooting advice given by intoxination and kbahey.
Probably you know already Drupal's China and Taiwan communities, for additional help and collaboration. BTW, welcome to this performance group!
>the other reason i give up using boost is that it do not support windows-servers
That's because of symlinks, etc. They are discussing a possible solution for Boost's Windows compatibility at Remove symlink creation. Let each path have own file. There are a couple of different patches attached to this issue.
thx very much expressly
thx very much expressly "Compatible with Memcache module"
i will do some try in memcache and advance modules
Don't try solutions when you don't know the problem
As I said below, don't try solutions to problems that you may not have.
Diagnose first, then treat later.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
i found out that i had used a wrong PHP-opcode
i tried eaccelerator first and found out that it seems nothing improve.
and then i happened to know module-cacherouter, and i post a issue :
how to config ? 6.x-1.0-beta6 ,php-APC ,windows-server
i think this may be one way out _ windows are making me losing my mind now
going in circles in the dark
You are confusing yourself more and more.
You seem to have defined one area (language query being slow), but you never confirmed if this is the issue or not.
You are now going around in circles in the dark.
Install the performance module, which is part of the devel -dev version, enable summary mode and query timings, and see what it says.
Try to narrow it down before jumping from one area to the other without definitive answers.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
Performance troubleshooting
haojiang, remember kbahey's good advice on performance troubleshooting. For instance:
"Again, start at a high level and then narrow down. Good that you at least have some suspect module. Try disabling it and then view the same pages and see what the difference is. This will confirm if it is indeed the suspect or not."
You can also do this with other modules such as update, views, etc., to see if there is any related problem in your configuration (firewall, queries, etc.).
BTW, on your issue you quote settings from your php.ini, but some details related to performance are still missing. For example, it would be interesting to know if you have the php directive "output_buffering = On", which is advisable for Windows especially.
But it's good that you are giving more details. However, as said, it's better labeling any additions -like recently to your first post-, for clarity about what is being answered on each post.
I've learned useful performance information from kbahey's excellent site and writings. I would gladly follow his advice, and would proceed systematically, step by step.
Can you determine exactly
Can you determine exactly what is slowing it down? I suggest installing the Devel module and enable the query log to see if any queries are extremely slow.
HollyIT - Grab the Netbeans Drupal Development Tool at GitHub.
Perrformance module
Better yet, enable the performance module, which is now part of devel, and see which pages are the slowest, which have the most number of queries.
If your site has APC enabled, then it is safe to just enable summary mode, and leave the module on for a day and then analyze the results later.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
THX "intoxination" and
THX "intoxination" and "kbahey".
i use devel-module a lot to find out which tpl.php or function should i use ,but i haven't found out that how to use it to look for the queries that slow drupal6 down.
could you please be so kind to show me a guide
Go to Admin -> Site
Go to Admin -> Site Configuration -> Devel Settings. There are 2 checkboxes at the top, Collect query info and Display query log. Check both of those. The next option is the display order. It's best to set that to Duration so the longest queries are at the top. After that you will have a display of all queries, the number of times they are called and execution time in the footer of every page.
HollyIT - Grab the Netbeans Drupal Development Tool at GitHub.
email to another Chinese-Taiwan drupal Professional Staff
with the same question , i email to another Chinese-Taiwan drupal Professional Staff
he told me that ,if i wanted to improve after-login-drupal6-performance greatly ,i should pay more attention to the performance of apache+PHP+mysql but not drupal6
what my server enviroment is that "apache2.28+php5.25+eAccelerator+mysql+zend optimazer"
what do you think i shoud do to improve,software not hardware solution?
Treatment follows diagnosis, not the other way around
Any successful treatment has to follow a correct diagnosis first.
If you are ill, you don't talk to the doctor on the phone and say "I am feeling ill", and expect him to have a diagnosis and treatment immediately. He has to do some clinical examinations, perhaps some lab tests, X-Rays, ...etc. and only then he would have a proper diagnosis of what is wrong with you. Once that is done, he can prescribe a treatment.
As me and others said, devel module has the tools to be able to diagnose stuff within Drupal. You will need other tools to assess the LAMP stack itself, but you have to do it step by step. Don't confuse yourself by looking at many things at the same time.
As I said enable the performance logging module from the -dev version of devel, and see what it says.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
thx for you patient
thx for you patient direction,"intoxination". i can handle devel-module better now.
this first time i open "drupal/admin",the devel downpage show:
27.63 1 locale
but after i refresh the page:
the locale disappear and the 100 queries change to 99. and "1.75 1 locale"
it seems that drupal cache logined-data too,and the time using most is locale-module
so i try the second time for "admin/generate" which is a menu that i seldom click
"8.99 1 cache_set" this show a few times
and after i refresh again
"3.35 1 cache_get"
and i do this test using both mathon\ie\firefox and even another machine
drupal is amazing!
but i still confuse , how long this kind of cache can stay and what can i do to change the cache time?
and what is interesting is that drupal change query times to mysql after i refresh.
i can see that there is always more than 60 queries for each page after-login!
and most of them are "select"!
is there a module can conbine this mysql-select just like they conbine CSS and javascript?
Too low level
You are looking at too low a level here. You started by saying "performance is bad", but no detail on how bad it is.
Is it that the site is slow? How slow? How many milliseconds to generate a page? Is it all the pages or just a few? ...etc. There is no information to go by here.
You went straight into queries that are slow. What about the overall page generation time? Queries that are 27 ms are not ideal, but what is their impact overall? Is the page generated in 500 ms or less? Then you have no problem? Is it taking 2000 ms or more? Then you have a problem. Where is this time? Queries or PHP?
I think you are confusing yourself by looking into too many things at the same time, without first defining the problem, then eliminating the causes for it, and narrowing where it is.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
i edit the question i posted
i edit the question i posted , do you mean that kind of data , "kbahey" ?
Editing is confusing
Now editing the original post (or even comments) can be confusing, because it is not known what the original is, and who is replying to the original and who is replying to the modified post.
So, it is best if you create a paragraph and mark it as [edit by yourname: date/time], then follow it with the new information.
Anyway, you have finally included some useful information. I know that queries take 343 ms on some page. But we are still missing the overall page execution time. If it is 100ms more, then we are still in the acceptable range with less than 500 ms or so.
Again, start at a high level and then narrow down. Good that you at least have some suspect module. Try disabling it and then view the same pages and see what the difference is. This will confirm if it is indeed the suspect or not.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.
i myself found that the most
i myself found that the most time consuming module is locale , but i have to use its function to translate
and the differences between the first click and the refresh click is that , mysql have cache too
Try using Tamper Data
If you have a copy of Firefox handy, I recommend installing the Tamper Data add-on/API then reviewing your site to see where it is taking time to pull the information from. It might be local images, a MySQL query, external images or files that could be hanging up the loading and performance times.
https://addons.mozilla.org/en-US/firefox/addon/966