Performance is painful
BobbyCarp
Joined: 2005-06-30
Posts: 18 |
![]() |
Functionality is impressive, but G2 is way TOOOOO slow. Uploading pictures is dreadfully slow and retrieval is not great either. Is the team going to work on performance before 2.0 goes final? I sure hope so. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
what are your system specs' got a phpinfo link? |
|
BobbyCarp
Joined: 2005-06-30
Posts: 18 |
![]() |
Here is the output from System Maintenance/System Information: Gallery version = 2.0-beta-3+ core 0.9.31 I am configured as multi-site, so I don't know how to give you the link to the phpinfo.php file. I tried using gallery2/lib/tools/phpinfo.php and I got the following error: You must create a config.php file in the Gallery directory before you can continue configuring the application. Use the installer to create one. Thanks for helping with this, |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
you're reporting that g2 is too slow. this is a fairly relative statement and G2 is surely slow on an old systems. what system specs does your server have? cpu / RAM / php accelerators / ... ? |
|
BobbyCarp
Joined: 2005-06-30
Posts: 18 |
![]() |
My web site and gallery is hosted by PowWeb which I understand has a fair number of users who use Gallery. I would have to contact them for the specs of the server that my account runs on. I don't have time to do that right now. I did do a comparison between Gv1.5 and Gv2 uploading photos: Test is 5 photos from 2.1 megapixel camera, total size 4.5MB. G1.5 took 7 minutes to upload 9 minutes for 5 photos from a very small megapixel camera is not good. My Nikon D70 pictures are much larger than these Canon S110 pics. Any thoughts about these numbers? Could you try an upload of 5 similar pics to your host and measure the time just to see if we're in the same ballpark? Thanks, |
|
RalphTheWonderLlama
Joined: 2005-07-16
Posts: 68 |
![]() |
I just uploaded 5 4megapixel photos to my server in 30 seconds. It's a pretty slow computer (PIII 550MHz, 384Mb RAM) but then again, it's in the next room. Also I don't have thumbnails working yet So the comparison with other people doesn't really work because that's an internet speed thing, either you or your host. I really don't get the 2 minute difference though, especially if you have thumbnails off. That seems a little strange, maybe run that test again. G2 uses MySql, is a bit bigger and more robust, and will end up being slower for sure, but 2 minutes, man. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
BobbyCarp, an uploading benchmark? that's interesting, but not too important. because you view much more often than you upload new pictures. having said that, you are not the only user who is reporting that g2 is slower than g1. that's true for small galleries. as soon as your gallery gets a little larger, g2 will be faster than g1 because g2 won't suffer from the size of your gallery or only minimally. and we're planning to make g2 faster. we want to introduce more caching (we cache already a lot on different levels). |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
I'd like to note, to rule out G2, try uploading those same 5 images to your server via FTP how long does that take? What's the advertised upload speeds from your ISP? This is a connection related issue or maybe poor performance on the server, but NOT G2. If others were having the problem, yeah, maybe G2 would be a factor. Maybe the connection between you and PowWeb just goes through some bad "pipes". Try also doing a traceroute between you and the server you're uploading to. |
|
aseac
Joined: 2005-03-04
Posts: 5 |
![]() |
I have a question. Thank you |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
aseac, and what is the question? And if your question was how to benchmark: Maybe try ab/ab2 (apache benchmark). |
|
aseac
Joined: 2005-03-04
Posts: 5 |
![]() |
valiant, well, my question was how to benchmark g2. |
|
deezNutz
![]()
Joined: 2005-07-06
Posts: 26 |
![]() |
aseac, I run g2 on a FC4 box, so I may give you some advice. By default FC4 is slow because it turns on a billion services that you're probably not using. Check your process list and see what you can diable. This will free up some cpu time and also a bunch of memory. Also, looking at your system spec, you need lot more memory. I bet your system is swapping out to your HD even when idleing. (for shits & giggles, would you paste the output from free -h to confirm this) Also, install an accelerator (This will again require additional memory) I gained about 3x speed improvement from eaccelerator on PIII-1ghz with 512 MB By the way, I recently upgraded the server to a P4 -2ghz with 512MB ram (from PIII-1ghz with 512 MB ram) and didn't really gain a whole lot of performance on serving out pages. On the other hand, creating thumbnails/resizes is now ultra quick... |
|
johann@nenni.net
![]()
Joined: 2003-09-01
Posts: 43 |
![]() |
I have a little file on my webiste who give me lots of info about my web hoster, It need some changes for each Webhoster, but i t should at least give som basic info (Server related info) Together with phpinfo, you should get pretty good ide about the server your site is running on (Linux) See attachment info.php Very simple php system commands it display this info: (and some more) http://gallery.nenni.net/info.php Uptime: System Information: CPU Information: Memory Usage (MB): More memory info (vmstat): Disk Usage: Ip address: Process info: |
|
aseac
Joined: 2005-03-04
Posts: 5 |
![]() |
johann@nenni.net, |
|
mackis5
Joined: 2005-04-25
Posts: 22 |
![]() |
johann@nenni.net wrote:
See attachment info.php Where is the attached file? I only see a link, and then I cant see the source. |
|
nivekiam
![]()
Joined: 2002-12-10
Posts: 16504 |
![]() |
Quote:
Where is the attached file? I only see a link, and then I cant see the source. johann@nenni.net, the uploader probably filtered out the php file. Try zipping it or changing it to .php.txt with instructions to remove the .txt extension. Here's the list of allowed file extensions: http://gallery.menalto.com/index.php?name=PNphpBB2&file=posting&mode=rules&f=22 |
|
johann@nenni.net
![]()
Joined: 2003-09-01
Posts: 43 |
![]() |
aseac wrote:
johann@nenni.net, I can be course I did outsource my private home servers to a Web hosting company, and pay only 7,50€ a month... :D I did have Quad CPU Server at home, but the Electricity was to expensive... I save many many $$$$ by outsource this... :D And it does look good at this Webhost, at least my little script show at the CPU and memory usage is very low in average... |
|
johann@nenni.net
![]()
Joined: 2003-09-01
Posts: 43 |
![]() |
mackis5 wrote:
I do not know where the Attachment did go... So here is the script.. I do not take any credit for this, it is just from the manual and google search on Linux commands.. ----- cut ----- <b>Uptime:</b> <b>System Information:</b> <b>CPU Information:</b> <b>Memory Usage (MB):</b> <?php system("free -h"); ?> <b>More memory info (vmstat):</b> <b>Disk Usage:</b> <b>Disk Usage:</b> <b>Ip address:</b> <b>Process info:</b> <b>Environment info:</b> <b>Apache info:</b> <b>Apache error log last 20 lines:</b> <br> ----- cut -------- |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
don't wonder if it doesn't work on your (freebsd) host. |
|
bruneian
Joined: 2005-07-23
Posts: 7 |
![]() |
I love the G2 ... its faster than G1. |
|
BobbyCarp
Joined: 2005-06-30
Posts: 18 |
![]() |
I have many years of experience with performance tuning on software, so I understand the need to benchmark similar test cases over different times of day, etc. with the fluctuations in Internet traffic & other issues. That being said, I ran 3 tests this morning which I think highlights the performance problem with gallery and isolates it to a specific functional area and removes the concern about my PowWeb web host server performance. All 3 tests involved the upload of the same 5 pictures which total 4.4MB. Test 1: Upload 5 pictures using the "From Web Browser" tab in the Add Items page. Turned off the create thumbnails now check box. Test 2: Upload 5 pictures to my web server using FTP. Test 3: Upload 5 pictures using the "Upload Applet" tab in the Add Items page. As you can see, the FTP and Upload Applet are very similar in performance, I would expect the applet to take longer as it involves server logic that has to run in addition to the transfer. During the applet upload, the speed shown in the dialog was approximately 38kb/s. Something is clearly wrong with the upload from web browser functionality. Can a gallery developer help me instrument the code to figure out where the time is being spent? Thanks, |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
modules/core/ItemAddFromBrowser.inc could you also test ItemAddFromServer.inc (Add item from local server). If you test ItemAddFromBrowser, you also benchmark how long your browser has to send form data (files as POST data) to the server. |
|
BobbyCarp
Joined: 2005-06-30
Posts: 18 |
![]() |
I just did add items from server for the 5 files and left the create thumbnails now on. It took 22 seconds. For more info, I include my DSL connection speed info below: I also ran broadbandrepors test on my connection. I get 1.277 Mbps upload and 319 kbps download. 319 kbps is 31 kps which is around what the upload applet told me. The 4.4MB for 5 files is 4296K / 31 kps = 138 seconds. This is 2 min 18 secs which really validates my connection working good for FTP and the upload applet. I have to leave for the day, so I can pick this up tomorrow. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
then, i guess, it's your browser / apache that take so long. in the add from web browser method, g2 receives the form variables from apache. there's not much overhead involved. then initiate the upload in the browser and wait until the page finishes loading. stop this time with a clock. the time you measured is the time your browser/webserver combination requires to transfer and give G2 the data. |
|
doctormord
![]()
Joined: 2005-01-26
Posts: 63 |
![]() |
It also would help to gain some performance when g2 wouldnt create thumbnails parallel when viewing fresh added pictures without creating thumbnails first. When i do so, G2 starts 12x times "convert" to do the thumbnails and resizes at ones. This really sucks much power and mainly freeze my server. (amd1700+, 256mb ram, turckmmcache 8mb) Would be much nicer to get the thumbs generated in a "serial" way. Maybe this is possible? (Maintenance-Module do it serial not parallel). cheers doc |
|
bharat
![]()
Joined: 2002-05-21
Posts: 7994 |
![]() |
doctormord, if you select the "create thumbnails" checkbox at upload time we create them in serial. Or if you do Site Admin -> Maintenance and select the "Build thumbnails/resizes" task it will also do them in serial. |
|
doctormord
![]()
Joined: 2005-01-26
Posts: 63 |
![]() |
Thats right, but when i use Gallery Remote it wont create the thumbs for me. Does it also create the resizes at upload time? I dont think so at all. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
no, when you use GR, it doesn't create thumbs at upload time. and resizes are not generated at upload time in any case. |
|
johann@nenni.net
![]()
Joined: 2003-09-01
Posts: 43 |
![]() |
Is it possible to get info from the Developers about what we should expect in performance? Response time, or some info how we should test (like the info from valiant) Or some simple performance test we can use to test our G2 install, so we do not need to complain so much... I did try ab from apache project, but I am not so sure if that give correct results, we need some methods we can use as "standard"... When I say at Gallery is slow, it is when I Display the Gallery, or access for the first time... (My ADSL is 3700/600, but at work I have BIG connection to Internet) and I get very similar results when testing from home and from work. Things like 5 standard photos in diffrent size, or standard configuration on one test album, so we can test this photos against standard album (using same toolkit, same thumb size, same anything...) |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
how to benchmark etc. is an often discussed topic. we already thought about a little how a G2 benchmark could look like. it's good to have something like a standardized benchmark, but it's not that important. in the end, you can browse a few of the G2s that are linked in the demo topic and compare the speed to your own G2. if the conclusion is that your G2 is much slower, then take a look at the FAQ to see our recommendations on how to speed it up. for now, ab must be enough. the most important requests are showitem requests for albums and for single items as well as download item requests. from time to time we use APD or other tools to profile G2, that is, to find out how many times a function gets called per request and how much we lose where etc. |
|
deezNutz
![]()
Joined: 2005-07-06
Posts: 26 |
![]() |
doctormord, you get 12 convert running because your browser requests all 12 images at once. apache will spawn a new thread or instance to serve each request via g2. g2 realizes that it needs to convert the image first so spawns convert. The threads/instances are not aware of the fact that 11 other ones are already running. Your browser wants the image now, so apache/g2 tries to give it to it. Technically you could configure your apache to not run multiple instances or threads, but that would just kill your performance for everything and potentially cause your browser to time out... Instead, I would recommend you run site admin -> maintenance -> build thumbs/resizes like valiant suggested above. I usually do this once a day if I have uploaded new pictures on that day. For people who complain about performance. Think about what you really need and choose the correct Gallery version based on that: If you just want a gallery with less than 5-10,000 pictures. Gallery 1 may be your choice. It is not database driven and is quick. If you want more than 10,000 pictures G2 is your choice. G2 scales very nicely to 100,000+ pictures. But there is an overhead for this. So just because it's version 2 it doesn't mean it's better and it's what you need. I think Gallery 1 & 2 are complimentary tools of each other addressing different needs. So, if you have an older linux box and want to share your pictures with your family use Gallery1. G2 will have an added db overhead regardless if you're sharing 100 pictures or 100,000. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
Maybe I'd agree that G2 doesn't serve the ultra low-end market at the moment and G1 may be a better choice for this kind of application. |
|
BobbyCarp
Joined: 2005-06-30
Posts: 18 |
![]() |
Valiant, I have spent a lot of time isolating and further understanding this issue (too much time!). I did what you requested putting an exit; right in main.php after starting the upload and found that all of the time is in the upload. In order to understand if this was a PHP vs. Perl thing, I downloaded and tested both a PHP and a Perl CGI upload script and that they were both as slow as the gallery upload. I then went up to my notebook upstairs to run the test, which it turns out I should have done first to compare performance with my desktop! Gallery upload tests using Firefox were 2:01 for "From Web Browser" form and 2:10 "Upload Applet" which is dead on with FTP times. It turns out that the CPU on the notebook is around 2-5% utilization during the upload. On the desktop the CPU is 100% for the first 3 minutes and then 2-5% for the final 1 minute. I turned off ZoneAlarm load on startup and rebooted my desktop to make sure that ZA was not causing this CPU usage and it isn't the cause. iexplorer process in the Task Manager shows to be the one using all the CPU, but now the question is why? What is configured on my TCP/IP on the desktop that is causing IE to peg the CPU? Any ideas for further digging into this problem would be appreciated. The setup is a DSL modem to a Linksys router. The desktop has a cable connect to the router and the notebook is using wireless. I hope when we figure this out, others can benefit from our findings... Cheers, |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
good to know that it's not G2, but a weird windows/IE issue. |
|