10 year(s) ago
百度网站收录地址: http://www.baidu.com/search/url_submit.html Google网站收录地址: http://ww.google.com/addurl/ Yahoo网站收录地址: http://search.help.cn.yahoo.com/h4_4.html 微软Bing必应网站收录地址: http://cn.bing.com/docs/submit.aspx 网易有道网站收录: http://tellbot.youdao.com/report 中搜网收录: http://ads.zhongsou.com/register/page.jsp 酷帝收录: http://www.coodir.com/accounts/addsite.asp Alexa收录: http://www.alexa.com/help/webmasters 目录收录: http://www.dmoz.org/ 索引量查询:http://indexed.webmasterhome.cn/ 批量提交: http://www.freewebsubmission.com/
9 year(s) ago
php的执行效率与ruby,python相比本身不是占有优势的,但是magento的速度不能怪在语言的执行效率上. 因为框架本身涉及到EAV,Zend,缓存不彻底等多个方面因素. 本文简要根据CosmoCommerce的经验说明magento在速度提高上面应该操作的注意点: 1 生产环境请开启编译magento compilation. 2 请确保缓存保存方式,避免数据库压力.或服务器压力. 3 web server如果是用apache fast cgi机制运行,请保证分配的稳定性.nginx/lighttpd同样需要确保分配资源的稳定性,因为购物车不能容忍客户端出现白屏和失去连接. 如果技术上无法解决资源分配的不稳定,必须使用apache,并且通过硬件升级来获得性能提高. 4 数据库在配置的时候需要独立处理read和write,并通过不同engine来获得各自特性. 5 通过企业版的magento的页缓存可以极大提高系统性能,因此尽可能配置开启页缓存.若没有经济能力购买企业版,可以通过自己优化代码来提高缓存命中率. 这方面根据定制情况不同,需要寻找专家来处理. 6 由于magento的session生成较多. 对会话的管理需要维护在较短时间内,避免开启的session时间过长. 7 由于magento的数据表启用EAV结构,因此跨表查询消耗很大,因此没有定制太复杂的情况下,请尽可能采用flat结构. 8 页面优化请开启js merge. 如果技术,预算允许,请寻找第三方完善js优化,甚至重写所有的前端js和css 9 页面css,js,图片等静态数据可以考虑存储在nginx等消耗资源小的服务器上, 若有广域推送数据的需求,可以放在cdn上面. 10尽可能启用php 5.3和apc/eaccelerate等op-code 优化机制. 如果是企业版本身和zend server就是自成一体.
9 year(s) ago
一个是CPU高配置的: Completed 5000 requests Finished 9566 requests Server Software: Apache/2.2.14 Server Hostname: xxx Server Port: 80 Document Path: /go-lux Document Length: 339 bytes Concurrency Level: 15 Time taken for tests: 60.003 seconds Complete requests: 9566 Failed requests: 0 Write errors: 0 Non-2xx responses: 9566 Total transferred: 5758732 bytes HTML transferred: 3242874 bytes Requests per second: 159.43 [#/sec] (mean) Time per request: 94.087 [ms] (mean) Time per request: 6.272 [ms] (mean, across all concurrent requests) Transfer rate: 93.73 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 43 48 110.3 43 3042 Processing: 43 46 24.0 44 398 Waiting: 43 46 22.8 44 398 Total: 86 94 112.8 87 3086 Percentage of the requests served within a certain time (ms) 50% 87 66% 87 75% 88 80% 90 90% 90 95% 90 98% 91 99% 128 100% 3086 (longest request) 一个是服务器CPU低配置的: Benchmarking xxx2 (be patient) Finished 1005 requests Server Software: Apache/2.2.14 Server Hostname: xxx2 Server Port: 80 Document Path: / Document Length: 38124 bytes Concurrency Level: 15 Time taken for tests: 60.010 seconds Complete requests: 1005 Failed requests: 0 Write errors: 0 Non-2xx responses: 1009 Total transferred: 39021205 bytes HTML transferred: 38449102 bytes Requests per second: 16.75 [#/sec] (mean) Time per request: 895.667 [ms] (mean) Time per request: 59.711 [ms] (mean, across all concurrent requests) Transfer rate: 635.01 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 44 54 163.7 44 3045 Processing: 566 836 104.2 835 1711 Waiting: 431 694 103.0 694 1575 Total: 611 889 196.1 880 3973 Percentage of the requests served within a certain time (ms) 50% 880 66% 918 75% 940 80% 960 90% 994 95% 1040 98% 1106 99% 1138 100% 3973 (longest request) 通过分析,我们发现在apache上即使代码未作优化和缓存。CPU的性能会对Magento响应效率有着非常大的影响。 如需要进一步提高,我们需要进行搭配nginx,并对代码的page cache进行优化。 以上两个机器配置都是主流服务器配置。
9 year(s) ago
未开启cache,未开启 Compilation测试数据: Benchmarking xxx (be patient) Finished 336 requests Server Software: Apache/2.2.14 Server Hostname: xxx Server Port: 80 Document Path: / Document Length: 23432 bytes Concurrency Level: 15 Time taken for tests: 60.212 seconds Complete requests: 336 Failed requests: 0 Write errors: 0 Total transferred: 8064840 bytes HTML transferred: 7902600 bytes Requests per second: 5.58 [#/sec] (mean) Time per request: 2688.045 [ms] (mean) Time per request: 179.203 [ms] (mean, across all concurrent requests) Transfer rate: 130.80 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 44 45 0.8 44 49 Processing: 1529 2587 366.8 2578 4381 Waiting: 1392 2402 360.2 2398 4241 Total: 1576 2632 366.8 2623 4428 WARNING: The median and mean for the initial connection time are not within a normal deviation These results are probably not that reliable. Percentage of the requests served within a certain time (ms) 50% 2623 66% 2774 75% 2867 80% 2917 90% 3044 95% 3174 98% 3470 99% 3645 100% 4428 (longest request) 未开启cache,开启 Compilation测试数据: Benchmarking xxx (be patient) Finished 314 requests Server Software: Apache/2.2.14 Server Hostname: xxx Server Port: 80 Document Path: / Document Length: 23432 bytes Concurrency Level: 15 Time taken for tests: 60.009 seconds Complete requests: 314 Failed requests: 0 Write errors: 0 Total transferred: 7512712 bytes HTML transferred: 7361512 bytes Requests per second: 5.23 [#/sec] (mean) Time per request: 2866.654 [ms] (mean) Time per request: 191.110 [ms] (mean, across all concurrent requests) Transfer rate: 122.26 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 44 54 169.0 44 3039 Processing: 1657 2744 384.2 2752 4777 Waiting: 1522 2601 379.2 2600 4596 Total: 1702 2798 405.4 2798 5164 Percentage of the requests served within a certain time (ms) 50% 2798 66% 2908 75% 3006 80% 3085 90% 3217 95% 3338 98% 3698 99% 4026 100% 5164 (longest request) 开启了cache,未开启Compilation测试数据 Benchmarking xxx (be patient) Finished 1355 requests Server Software: Apache/2.2.14 Server Hostname: xxx Server Port: 80 Document Path: / Document Length: 23432 bytes Concurrency Level: 15 Time taken for tests: 60.018 seconds Complete requests: 1355 Failed requests: 0 Write errors: 0 Total transferred: 32464472 bytes HTML transferred: 31811672 bytes Requests per second: 22.58 [#/sec] (mean) Time per request: 664.404 [ms] (mean) Time per request: 44.294 [ms] (mean, across all concurrent requests) Transfer rate: 528.24 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 44 47 81.2 44 3035 Processing: 463 614 108.8 587 1339 Waiting: 283 417 96.3 396 1100 Total: 508 661 137.5 631 3754 Percentage of the requests served within a certain time (ms) 50% 631 66% 660 75% 681 80% 698 90% 764 95% 896 98% 1015 99% 1131 100% 3754 (longest request) 开启了cache,开启了Compilation 的测试数据: Benchmarking xxx (be patient) Finished 1238 requests Server Software: Apache/2.2.14 Server Hostname: xxx Server Port: 80 Document Path: / Document Length: 23432 bytes Concurrency Level: 15 Time taken for tests: 60.007 seconds Complete requests: 1238 Failed requests: 0 Write errors: 0 Total transferred: 29629120 bytes HTML transferred: 29032960 bytes Requests per second: 20.63 [#/sec] (mean) Time per request: 727.063 [ms] (mean) Time per request: 48.471 [ms] (mean, across all concurrent requests) Transfer rate: 482.19 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 44 47 85.1 44 3038 Processing: 508 677 99.0 659 1606 Waiting: 328 477 77.0 467 1215 Total: 552 724 130.7 704 3724 Percentage of the requests served within a certain time (ms) 50% 704 66% 733 75% 757 80% 772 90% 827 95% 907 98% 999 99% 1081 100% 3724 (longest request) 从数据中我们可以分析发现,在开启cache的情况下,Compilation的效果不太明显,而且即使大家都不开启缓存,页面速度比较上开启Compilation也没有太大优势。 当然我们这个测试样本还不够全,需要更多的样本评估。
9 year(s) ago
以下是magento ee 1.8的分析数据: 未开启page cache缓存: webbench -c 100 -t 30 http://xxx/ Webbench - Simple Web Benchmark 1.5 Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software. Benchmarking: GET http://xxx/ 100 clients, running 30 sec. Speed=2278 pages/min, 434150 bytes/sec. Requests: 1139 susceed, 0 failed. 开启了page cache缓存: webbench -c 100 -t 30 http://xxx/ Webbench - Simple Web Benchmark 1.5 Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software. Benchmarking: GET http://xxx/ 100 clients, running 30 sec. Speed=28124 pages/min, 5233988 bytes/sec. Requests: 14062 susceed, 0 failed. 同样系统的性能有10倍,这是为什么呢? 这是因为magento企业版做了一个observer进行捕捉request,这样从controller上进行了代码判断。 从而避免了加载大量不必要的资源,由此我们可以得到启发,在catalog级别上,我们可以通过.htaccess上进行静态页面规则映射,只有文件不存在的,我们才会去调用系统php,同时生成静态html页面。这样我们可以把大量的静态文件放置在nginx上面,做到最大资源利用
9 year(s) ago
通过joomla后台我们开启缓存,而且确保开启apc的后台缓存。 这样我们的joomla的性能可以提高至少一倍。 开启apc缓存后台: 100 clients, running 30 sec. Speed=2748 pages/min, 1189081 bytes/sec. Requests: 1374 susceed, 0 failed. 未开启apc缓存后台: 100 clients, running 30 sec. Speed=884 pages/min, 382604 bytes/sec. Requests: 442 susceed, 0 failed. 可见性能差别还是非常大。
9 year(s) ago
以下文字写的很完整,很详实。供开发者学习。管理维护人员借鉴。
Subversion Introduction: |
Subversion Commands: |
Command | Description |
---|---|
svn --help | List Subversion commands |
svn help command Also: ? or h | Help on given "command" |
svn add filenamesvn add directory | Add a file or directory to Subversion CM control. Must also perform: svn ci filename (or svn commit) to upload the file or directory. File will not be available in the repository until a "commit" is performed. If adding a directory, the directory and all of its contents recursively are added. i.e.: svn ci directory svn commit directory svn commit . |
svn blame filename svn blame -r RevisionNumber filename Also: praise, annotate, ann | Show file contents with revisions annotated with author information. |
svn cat filename | List contents of file under Subversion control. |
svn checkout http://node-name/repos/svn/trunk/parentPath/path This creates: path/file1 path/file2 ...svn checkout http://node-name/repos/svn/trunk/parentPath . This creates: path/file1 path/file2 ... Note the difference a "." makes. svn checkout file:///repos/svn/trunk/path/ svn co -r 497 http://node-name/repos/svn/trunk/path file-name Also: svn co https://..., svn://..., and svn+ssh:// MS/Windows: svn co file:///c:/repository/project/trunk | Checkout every file from the path and subdirectories specified below. Creates "working" copy of files and directories. Checkout a repository.Use option "-r" to specify a specific revision other than the latest. The URL "svn://" communicates with an SVN server (port 3690) The URL "http://" comunicates with the Apache server and modulemod_dav_svn (port 80) [more common server] |
svn cleanup | Cleanup subversion files resulting from escaped processes and crashed. |
svn commit filename svn commit --message "Message goes here." filename svn commit -m "Message goes here." filename svn ci filename1 filename2 filename3 svn ci . | Check-in (commit) local "working" file, files or directory and contents (recursively) into Subversion repository. Atomic, i.e. all committed or none, no incomplete check-in. |
svn copy source destination_clone Also: svn cp ... | Copy file or directory tree. One can copy from one local working copy to another or to repository server URL's. The sources and destinations can be working copies or URLs. |
svn copy http://host/repos/project/trunk http://host/repos/project/tags/TagName-1.4.5 -m "Tag Release 1.4.5" | Tag a release. Takes a snapshot of the repository and assigns a name. This can be performed at any directory branch. |
svn copy . http://host/repos/project/tags/TagName-1.4.5 -m "Tag Release 1.4.5" | Tag a release. Takes a snapshot of your local working copy and assigns a name. This can be performed at any directory branch. |
svn delete filename svn delete directory Also: del, remove or rm svn rm http://host/repos/project/trunk/file-or-directory | Delete file from repository. The UNIX command rm file-name. Must perform a "commit" to update the repository and local working directory with the changes. i.e.: svn commit . |
svn diff filename svn di filename | Show file diffs between SVN repository and your file changes using GNU file diff format. Use GUI diff tools as shown below. |
svn diff -r rev1:rev2 filename | Show file diffs between specified versions. Example: svn diff -r 456:459 subfn.cpp Using GUI diff tool: svn diff -r 457:459 --diff-cmd kdiff3 file-name |
svn diff filename > patch-file | Generate patch file used by the patch command. |
svn export directory | Export directory tree to your file system but it will not be a "working directory" under SVN control. |
svn export -r Rev-Number http://node-name/path | Export directory tree of specified version and create local directory tree and files not under SVN control. |
svn import local-directory http://node/repos/svn/trunk/directory | Add directory (and files in it recursively) to path in repository specified. |
svn info filename | Display information about file or directory. (Date modified, author, revision, path in repository.) Can not specify a URL. |
svn list directory svn list file-name | List file or directory of files in repository. Used to browse repository before checkout. If current directory is given (svn list ./), then Subversion will list the repository URL of the current directory. |
svn list -r RevisionNumber directory | List directory of files in repository in specified revision. |
svn lock filename -m "comment as to why its locked or by whom" (Comment is not required but is often useful) | Lock file to grant exclusive access to one and forbid all others. A commit will unlock the file (unless the "--no-unlock" option is used). A lock can be removed with the commands: svn unlock filename, svnlook and the svnadmincomands (i.e. List: svnadmin lslocks and remove: svnadmin rmlocks filename). |
svn log filename svn log . svn log http://URL/path/file svn log -v . svn log -r RevisionNumber http://URL/path/file | Show the Subversion log messages for a set of revision(s) and/or file(s) and/or all directory contents in repository. List verbose. Includes list of all files in change Shows the file changes associated with revision number. |
svn merge http://url/path/branch1 http://url/path/branch2 working-local-dir svn merge file1@revJ file2@revK svn merge -r 414:411 http://url/path working-dir svn merge -r 413:HEAD file-name | Merge directory changes into your current working directory or merge a file in Subversion into the file in your working directory. If target is not specified, the identical basename or current directory is assumed. Used to incorporate changes checked in which are not accounted for in your file or to merge branches. Example using GUI merge tool: svn diff -r 459:454 --diff-cmd kdiff3 --extensions '-m' file-name Next, tell subversion that the conflicts have been resolved: svn resolve file-name Finally, check-in file: svn ci file-name or abort changes: svn revert file-name |
svn merge --dry-run -r 414:413 http://url/path | Test merge. No changes are made to your local working copy but shows Subversion feedback as if merge was performed. |
svn merge -r 414:413 http://url/path svn merge -r 414:413 . | Undo changes committed in revision 414. |
svn mkdir directory svn mkdir http://URL/directory | Create a new directory under version control. |
svn move directory1 directory2 svn mv directory1 directory2 svn mv file-old-name file-new-name | Rename or move a file or directory. Moves/renames file/directory in repository and in local work area. Must perform svn ci file-new-name after the move for changes to to take place in repository. |
svn revert filename | Undo changes in local work files. Throw away local changes. |
svn resolved filename | Run this command after resolving merge conflicts. Next "commit" your changes. |
svn status svn status -u svn status -u . svn status -uq . | Show status of file changes in current directory and recursively in directories below.
Show out of date file info: svn status --show-updates
(equivalent: svn status -u)
-u: Determines status by comparing your local repository with the server repository. Without this option, the status shown will only be the changes you have made in your local repository.-q: Quiet. Do not print "?: File/directory not under version control" or "!: File/directory missing" extraneous information.
First collumn:
|
svn switch http://server/new-branch svn switch --relocate http://server/old-path http://server/new-path | Switch your local working copy to mirror a new repository branch instead of main trunk or previous branch. Also allows you to point your repository to a new path on the server if the server path changes since you performed a check-out. |
svn update svn update filename svn update -r458 filename svn update --ignore-externals ./ | Migrate all updates from Subversion repository to your local copy (recusively for all files in the current directory and all below it). If there have been updates to the svn repository since you downloaded the files, subversion will give you the opportunity to merge. Status of files will use the coding as stated above for "status". Files marked with a "C" (conflict) should be merged of reverted. If merged then one can perform a "resolve" and then a "check-in". If a file name is specified, only that file is updated. Can also syncronize to a specified revision given by -r. Use --ignore-externals to avoid the slow processing of externals to a potentially slow distant internet server. |
U file.h C file1.cpp G file2.cpp ? a.outYou will see:
Subversion Peg revisions: |
Subversion Properties: |
Property | Description | ||||
---|---|---|---|---|---|
svn:ignore | A newline separated list of file patterns to ignore. List of files/directories to be ignored by svn status | ||||
svn:keywords | Valid RCS style keywords are:
|
||||
svn:executable | Ensure file attribute is executable. Possible values: ON, OFF Example: svn propset svn:executable ON app.exe | ||||
svn:eol-style | One of 'native', 'LF', 'CR', 'CRLF'. Specify and maintain specified line ending for text file.
|
||||
svn:mime-type | The mime type of the file:
|
||||
svn:needs-lock | Prevents conflicts for files which can not be contextually merged. i.e. photos, binaries, object libraries. | ||||
svn:externals | List of files or directories pointed to. Locate repository where directory specified should be retrieved. The directive propset is not required:svn propedit svn:externals local-target-dir
|
Command | Description |
---|---|
svn propdel PropertyName file-name svn propdel --revprop -r RevisionName http://url/path Also: pdel, pd | Remove property name from files or directories. Remove properties on file in repository. |
svn propedit PropertyName file-name svn propedit --revprop -r RevisionName http://url/path Also: pedit, pe | Edit property name of files or directories. Edit properties on file in repository. |
svn propget PropertyName file-name svn propget --revprop -r RevisionName http://url/path Also: pget, pg | Print value of property name of files or directories. Print properties on file in repository. |
svn proplist file-name svn proplist * svn proplist --revprop -r RevisionName http://url/path Also: plist, pl | List properties of file, files or directory. |
svn propset PROPNAME PropertyValue file-name svn propset PROPNAME --revprop -r RevisionName PropertyValuehttp://url/path svn propset svn:mime-type text/html file-name.dat Also: pset, ps | Set properties of file or directory. Set mime type for a file in the repository. Must perform a commit to upload changes to the repository.Set file properties so that "^M"'s are removed upon check-in: svn propset svn:eol-style LF file-name.txt See YoLinux Subversion server configuration tutorial: No ctrl-M. |
Subversion and Graphical diffs for Linux: |
1) File differences since checkout: |
|
|
2) File differences between two revisions: |
.. ... [helpers] editor-cmd = gedit diff-cmd = /opt/bin/diffScript diff3-cmd = /opt/bin/diff3Script ... .. |
|
.. ... [helpers] diff-cmd = echo ... .. |
3) Conflicts, file differences and merge: |
... [helpers] diff-cmd = svndiffwrapper diff3-cmd = svndiffwrapper ... |
List of graphical diff and merge tools: |
Subversion GUI interfaces for Linux: |
... set cvscfg(editor) "xterm -e vim" set cvscfg(tkdiff) "tkdiff" |
Subversion Security Tips: |
[auth] store-auth-creds = no |
|
Subversion utility commands and scripts: |
Command | Description |
---|---|
svnversion local-path | This svn admin command will produce a compact version number for a working copy. Lists range of versions, adds "S" if switched, "M" modified. |
svnchangesince | Shows the changes to the subversion repository since the local copy was last updated. |
svnlastlog | Displays the last log message that pertains to the current working copy. Simplified svnlastchange. |
svnlastchange | Displays the last log message and a unified diff of the changes made in the last commit. |
svn-clean | Removes all the files and directories that are not in Subversion. |
|
Subversion Best Practices: |