如何提高tomcat的并发能力

1、Apache + Tomcat 结合起来用Apache 负责静态页面,Tomcat负责动态页面,同时减少connectionTimeout的时间,以应对并发量大线程回收来不及的情况。

2、压力过大的问题,可以做负载均衡,一个TOMCAT无论如何也不可能担当如此多的线程负载,而且JVM过大,其内存管理成本将显著加大。2G的内存,做3-4个TOMCAT实例(512RAM*4),更为科学合理。

3、数据库连接池,不少人,都推荐使用C3P0,能提高访问数据库的并发性能好几倍。

4、采用Tomcat集群可以最大程度的发挥服务器的性能,可以在配置较高的服务器上部署多个Tomcat,也可以在多台服务器上分别部署Tomcat,Apache和Tomcat整合的方式还是JK方式。经过验证,系统对大用户量使用的响应方面,Apache+3Tomccat集群> Apache+2Tomcat集群 > Apache集成Tomcat > 单个Tomcat。并且采用Apache+多Tomcat集群的部署方式时,如果一个Tomcat出现宕机,系统可以继续使用,所以在硬件系统性能足够优越的情况下,需要尽量发挥软件的性能,可以采用增加Tomcat集群的方式。

5.1. 设置MPM(Multi Processing Modules多道处理模块)。ThreadPerChild,这个参数用于设置每个进程的线程数,在Windows环境下默认值是64,最大值是1920,建议设置为100-500之间,服务器性能高的话值大一些,反之小一些。MaxRequestPerChild表示每个子进程能够处理的最大请求数。这个参数的值更大程度上取决于服务器的内存,如果内存比较大的话可以设置为很大的参数,否则设置一个较小的值,建议值是3000.

5.2. 关闭DNS和名字解析  HostnameLookups off

5.3. 打开UseCanonicalName模块 UseCanonicalName on

5.4. 关闭多余模块 一般来说,不需要加载的模块有,mod_include.so、mod_autoindex.so、mod_access.so、mod_auth.so.

5.5. 打开KeepAlive支持 

KeepAlive on, KeepAliveTimeout 15 MaxKeepAliveRequests 1000

根据实际经验,通过Apache和Tomcat集群的方式提高系统性能的效果十分明显,这种方式可以最大化的利用硬件资源,通过多个Tomcat的处理来分担单Tomcat时的压力。

web server允许的最大连接数还受制于操作系统的内核参数设置,通常Windows是2000个左右,Linux是1000个左右。

最新评论:

no.13230 co.ri23my. 176.108.5.98 2018-02-21 17:58

And to the present time corroborate in newsflash distheo.richtig.amsterdam/gesunde-haut/inline-skaten-abnehmen-11949.html that no grease, repressed styled a-ok ones, should be considered a weight-loss food. Coating your salad with grease can deodesc.richtig.amsterdam/gewicht-verlieren/express-abnehmen-18613.html thoroughgoing up up as differing calories as a in of invite ice cream. It’s a disordered ventfi.kremmen.amsterdam/hoe-te-solliciteren/hoe-vaak-haar-wassen-50528.html spread in search los

no.13225 co.ri2.3my. 176.108.5.98 2018-02-21 05:01

And in any invalid be subjected to in rate exda.kremmen.amsterdam/voor-de-gezondheid/borstkanker-ontdekken-39558.html that no grease, ordered styled a-ok ones, should be considered a weight-loss food. Coating your salad with lubricator can worlvan.kremmen.amsterdam/informatie/4-kilo-afvallen-in-4-weken-52236.html tote up up up as divers calories as a latest dope of household ice cream. It’s a abominable deodesc.richtig.amsterdam/schoenheit/fettabsaugen-nach-schwangerschaft-18965.html spread as a

no.13210 c.o.r.i.23my 176.108.5.98 2018-02-20 14:48

And in any case corroborate in rate dresid.richtig.amsterdam/medizinischer-rat/metabolic-balance-mannheim-26974.html that no grease, self-assured treacherous admissible ones, should be considered a weight-loss food. Coating your salad with grease can alen.richtig.amsterdam/gesundheit/abnehmen-dvd-workout-09671.html tag up as weird calories as a in of allure ice cream. It’s a disordered pyara.richtig.amsterdam/gewicht-verlieren/durchfall-schwangerschaft-fehlgeburt-11281.html lunch as a replacemen

no.13110 mor.r.is.on.elva.7.54 91.108.183.187 2017-12-26 21:48

апрапрапр

no.13052 danielOxive 151.249.164.95 2017-11-10 06:23

Обратите внимание!!! Реально полезная штука. С помощью этого средства можно восстанавливать любые кожаные изделия. Всегда пригодится в хозяйстве. [url="https://small-smile.ru/?p=10"]жидкая кожа[/URL]

no.13050 clarakix 151.249.164.95 2017-11-01 18:31

Hello friends! I am an official representative of private company which deals with all kinds of written work (essay, coursework, dissertation, presentation, report, etc) in short time. We are ready to offer a free accomplishment of written work hoping for further cooperation and honest feedback about our service. This offer has limited quantities!!! Details on our website: https://top-stud.biz/?p=4903

no.13042 b.etha.nyweav.e.r.7.8 41.242.90.74 2017-10-25 11:51

https://bookwhen.com/valium52/e/ev-shuy-20171011100000

no.13040 hwrzefpze70 46.161.9.4 2017-10-19 13:09

すべての [url=https://limtorrent.com/]limtorrent[/url] 投稿者

no.13039 bgfpdnrwy76 46.161.9.4 2017-10-19 12:12

すべての [url=https://limtorrent.com/]limtorrent[/url] 投稿者

no.13033 rbnefnksn38 46.161.9.4 2017-10-19 02:18

すべての [url=https://limtorrent.com/]limtorrent[/url] 投稿者

no.13032 rosieDooky 151.249.164.95 2017-10-18 22:06

Hello friends! I am an official representative of private company which deals with all kinds of written work (essay, coursework, dissertation, presentation, report, etc) in short time. We are ready to offer a free accomplishment of written work hoping for further cooperation and honest feedback about our service. This offer has limited quantities!!! Details on our website: >>> essay-edu.biz

no.13030 tuzwkbfrq77 46.161.9.4 2017-10-18 17:29

すべての https://limtorrent.com/ https://limtorrent.com/browse-torrents/ https://limtorrent.com/top100 https://limtorrent.com/latest100 https://limtorrent.com/search-cloud/ 投稿者

no.13029 klmzjwoss64 46.161.9.4 2017-10-18 15:17

すべての https://limtorrent.com/ https://limtorrent.com/browse-torrents/ https://limtorrent.com/top100 https://limtorrent.com/latest100 https://limtorrent.com/search-cloud/ 投稿者

no.13027 alysonf.isher.7.1 192.40.95.27 2017-10-18 09:41

https://lazilyyoungfun.tumblr.com/post/166138931370/buy-levitra-online-without-prescription

no.13022 erbifldxf22 46.161.9.4 2017-10-18 03:57

すべての https://limtorrent.com/ https://limtorrent.com/browse-torrents/ https://limtorrent.com/top100 https://limtorrent.com/latest100 https://limtorrent.com/search-cloud/ 投稿者

no.13021 nwzgfftqn37 46.161.9.4 2017-10-17 11:56

すべての https://masttorrent.com/ https://masttorrent.com/browse-torrents/ https://masttorrent.com/top100 https://masttorrent.com/latest100 https://masttorrent.com/search-cloud/ 投稿者

no.13020 kvtqydkcn24 46.161.9.4 2017-10-17 11:50

すべての https://masttorrent.com/ https://masttorrent.com/browse-torrents/ https://masttorrent.com/top100 https://masttorrent.com/latest100 https://masttorrent.com/search-cloud/ 投稿者

no.13015 rsxcaqgqg20 46.161.9.4 2017-10-16 20:26

すべての https://masttorrent.com/ https://masttorrent.com/browse-torrents/ https://masttorrent.com/top100 https://masttorrent.com/latest100 https://masttorrent.com/search-cloud/ 投稿者

no.13014 rcxifdjbz20 46.161.9.4 2017-10-16 11:03

すべての https://masttorrent.com/ https://masttorrent.com/browse-torrents/ https://masttorrent.com/top100 https://masttorrent.com/latest100 https://masttorrent.com/search-cloud/ 投稿者

no.13008 saidkare2e 178.76.243.0 2017-10-14 19:23

Были заплачены деньги 6000 за покупку базы данных и просто швырнул. с другого аккаунта к нему обратились, уже специально на 100р была сделка на выборку и тоже швырнул. непорядочный гандон. кинет 100р% Телеграм @japoshka кидальная дешевка

no.13000 beth.an.yweav.er.78 186.237.188.153 2017-10-09 10:22

https://www.zotero.org/accutane52

no.12997 al.y.so.nfishe.r7.1 173.239.232.60 2017-10-08 15:22

My friend and I went camping the other day. It was a horrific experience, as he wouldn't let me sleep all night. He kept talking about random things and whined about his sleeplessness. I totally told him to [url=https://www.snowdonrailway.co.uk/phpunit/tramadol-price]read more[/url] and deal with it.

no.12995 mhtsldpnt60 46.161.9.4 2017-10-06 12:17

すべての https://emotorrents.com/ 投稿者

no.12976 eileenHok 151.249.164.95 2017-09-29 13:11

Hello friends! I am an official representative of private company which deals with all kinds of written work (essay, coursework, dissertation, presentation, report, etc) in short time. We are ready to offer a free accomplishment of written work hoping for further cooperation and honest feedback about our service. This offer has limited quantities!!! Details on our website: https://l2immortal.com

no.12974 rima7k5in 178.76.243.0 2017-09-28 15:23

[b]Пополение баланса Авито (Avito) за 50%[/b] | [b]Телеграмм @a1garant[/b] [b]Приветствую вас, дорогие друзья![/b] Будем рады предоставить Всем вам сервис по пополнению баланса на действующие активные аккаунты Avito (а также, совершенно новые). Если Вам необходимы определенные балансы - пишите, будем решать. Потратить можно на турбо продажи, любые платные услуги Авито (Avito). [b]Аккаунты не Брут. Живут долго.[/b] Процент пополнения в нашу сторону и стоимость готовых аккаунт

no.12969 susanClimb 151.249.164.95 2017-09-23 16:52

Hello friends! I am an official representative of private company which deals with all kinds of written work (essay, coursework, dissertation, presentation, report, etc) in short time. We are ready to offer a free accomplishment of written work hoping for further cooperation and honest feedback about our service. This offer has limited quantities!!! Details on our website: https://top-essay.biz

no.12959 mattress2a 178.137.94.166 2017-09-16 20:02

cbd hemp oil for pain cbd oil for pain [url=https://cbdoil4u.org/cbd-oil-for-pain/]best cbd oil for pain management[/url] best cbd hemp oil for pain cbd hemp oil drops for pain for sale cbd oil for pain <a href="https://cbdoil4u.org/cbd-oil-for-pain/">cbd oil for pain</a> cbd oil for pain

no.12954 mattressir 46.119.118.128 2017-09-16 08:05

cbd capsules fairwinds - cbdoilproducts.org cbd cannabis capsules oregon - https://cbdoilproducts.org/cbd-capsules [url=https://cbdoilproducts.org/cbd-capsules]https://cbdoilproducts.org here[/url] cbd capsules side effects on this site https://cbdoilproducts.org/cbd-capsules/ cannabis cbd capsules for sale <a href="https://cbdoilproducts.org/cbd-capsules">cbd capsules review - https://cbdoilproducts.org/cbd-capsules</a> cbd cannabis capsules oregon - cbdoilproducts.org

no.12943 barbaranum 93.170.187.48 2017-09-13 23:25

This message is posted here using XRumer + XEvil 3.0 XEvil 3.0 is a revolutionary application that can bypass almost any anti-botnet protection. Captcha Recognition Google, Facebook, Yandex, VKontakte, Captcha Com and over 8.4 million other types! You read this - it means it works! ;) Details on the official website of XEvil.Net, there is a free demo version.

no.12938 barbaranum 93.170.187.48 2017-09-13 21:56

This message is posted here using XRumer + XEvil 3.0 XEvil 3.0 is a revolutionary application that can bypass almost any anti-botnet protection. Captcha Recognition Google, Facebook, Yandex, VKontakte, Captcha Com and over 8.4 million other types! You read this - it means it works! ;) Details on the official website of XEvil.Net, there is a free demo version.

no.12930 maggiejem 151.249.164.95 2017-09-10 16:45

Hello friends! I am an official representative of private company which deals with all kinds of written work (essay, coursework, dissertation, presentation, report, etc) in short time. We are ready to offer a free accomplishment of written work hoping for further cooperation and honest feedback about our service. Send your work topics to our email: discount@edu-paper.com. This offer has limited quantities!!! Details on our website: https://fixxen.com

no.12929 mattressa0 178.137.94.166 2017-09-02 14:32

CBD Side Effects on Liver CBD Gummies amazon [url=https://hempgummies.us/]buy CBD Gummies[/url] CBD Side Effects on Liver cbd Gummies recipe CBD Gummies for Pain <a href="https://gummiescbd.us/">CBD Gummies</a> CBD Gummies Side Effects

no.12924 ceciliahop 151.249.164.95 2017-09-01 10:17

Hello friends! I am an official representative of private company which deals with all kinds of written work (essay, coursework, dissertation, presentation, report, etc) in short time. We are ready to offer a free accomplishment of written work hoping for further cooperation and honest feedback about our service. Send your work topics to our email: discount@edu-paper.com. This offer has limited quantities!!!

no.12923 mattressnp 209.160.112.142 2017-08-30 05:32

cbdoil4u.org cbd oil for sale vape - cbdoil4u.org [url=https://cbdoil4u.org/]cbd oil for cancer treatment of liver disease - cbdoil4u.org[/url] https://cbdoil4u.org/ cbd oil for pain relief vape - cbdoil4u.org pure cbd oil reviews for pain - cbdoil4u.org <a href="https://cbdoil4u.org/">how much cbd oil for dogs with cancer - cbdoil4u.org</a> cbd oil for pain amazon - cbdoil4u.org

no.12917 afrsar777 188.235.130.34 2017-08-29 17:06

Мечтаете как-то разнообразить вашу сексуальную жизнь? Добиться принципиально новых ощущений помогут интим-товары Один из самых популярных способов достигнуть ярких ощущений – <a href="https://afroditalove.ru/category/vibromassazher-vibrator/">купить вибратор</a>. С его помощью достаточно легко добиться дополнительной симуляции эрогенных зон. Только не пользуйтесь им в одиночестве, доверьтесь своей второй половине. Это хорошо укрепит вашу эмоциональную и физическую связь и поможет стать боле

no.12913 donnaTip 46.161.9.41 2017-08-27 01:57

Day ago i learned new shocking knowledge about Omega 3 foods and now i very want to purchase it. But i need a best, only premium omega 3 fish oil. I've seen this [url=https://www.omega-3.club/premium-fish-oil-carlson.html] premium omega 3 fish oil [/url] link. What do you think about this brand?

no.12904 rexong 178.49.154.82 2017-08-23 04:33

Топовые БЕСПЛАТНЫЕ секс флеш игры находятся для вас игры без установки онлайн на https://vk.com/porno_flash_games P.S. - ЗАХОДИТЕ И ИГРАЙТЕ в порно флеш ИГРЫ БЕЗ РЕКЛАМЫ И ВИРУСОВ на https://vk.com/porno_flash_games

no.12901 donnaTip 46.161.9.41 2017-08-17 23:36

Few days ago i got some interesting knowledge about Omega 3 foods and now i really want to get it. But i need a best, some premium omega 3 fish oil. I've found this [url=https://www.omega-3.club/premium-fish-oil-carlson.html] premium omega 3 fish oil [/url] url. What do you think about this name?

no.12896 batarbek0tsa 178.76.243.0 2017-08-17 03:18

[b]Авиабилеты по РУ за 60 процентов от цены кассы.[/b] по МИРУ - 50%| [b]Телеграмм @AviaRussia[/b] только этот, другие не используем. Надежно. Выгодно. Без слётов. И БЕЗ каких-либо проблем. Оплата: ЯндексДеньги, Webmoney (профессиональные счета) Рады сотрудничеству! ________ билеты +на самолет дешево победа авиабилеты дешево купить онлайн авиабилет ру купить авиабилеты дешево официальный сайт s7 авиабилеты дешево санкт купить авиабилеты s7 официальный сайт дешевые билеты

no.12895 donnaTip 46.161.9.41 2017-08-17 02:50

Few days ago i read some cool info about Omega 3 stuff and now i very want to purchase it. But i want a quality, only premium omega 3 fish oil. I've got this [url=https://www.omega-3.club/premium-fish-oil-carlson.html] premium omega 3 fish oil [/url] link. What do you know about this name?

no.12886 vladmir3xk 178.76.243.0 2017-08-16 10:24

[b]Пополение баланса Авито (Avito) за 50%[/b] | [b]Телеграмм @a1garant[/b] [b]Здравствуйте, дорогие друзья![/b] Всегда рады предоставить Всем вам сервис по пополнению баланса на действующие активные аккаунты Avito (а также, абсолютно новые). Если Вам надо определенные балансы - пишите, будем решать. Потратить можно на турбо продажи, любые платные услуги Авито (Avito). [b]Аккаунты не Брут. Живут долго.[/b] Процент пополнения в нашу сторону и стоимость готовых аккаунтов: [b]5

no.12881 donnaTip 46.161.9.41 2017-08-14 15:23

Yesterday i read some shocking info about Omega 3 foods and now i really wanna get it. But i'm not really sure which benefits will i have. I've found this [url=https://buy-omega-3.com] omega 3 info [/url] , and now i want to get it with good price. Any idea?

no.12876 donnaTip 46.161.9.41 2017-08-13 21:33

Day ago i got some amazing info about Omega 3 foods and now i very wanna get it. But i'm not really sure which benefits will i have. I've found this [url=https://buy-omega-3.com] omega 3 info [/url] , and now i wanna get it with good price. Any idea?

no.12871 donnaTip 46.161.9.41 2017-08-13 04:41

Day ago i got some shocking info about Omega 3 foods and now i really wanna get it. But i'm not absolutely sure which pluses will i have. I've got this [url=https://buy-omega-3.com] omega 3 info [/url] , and currently i want to purchase it with lowest price. Any idea?

no.12866 donnaTip 46.161.9.41 2017-08-12 12:25

Yesterday i read some cool info about Omega 3 foods and now i really wanna buy it. But i'm not 100% sure which benefits will i have. I've got this [url=https://buy-omega-3.com] omega 3 info [/url] , and currently i wanna get it with best price. Any idea?

no.12858 leeanngep 93.170.187.48 2017-08-11 19:53

Absolutely NEW update of SEO/SMM package "XRumer 16.0 + XEvil 3.0": captchas breaking of Google, Facebook, Bing, Hotmail, SolveMedia, Yandex, and more than 8400 another types of captchas, with highest precision (80..100%) and highest speed (100 img per second). You can connect XEvil 3.0 to all most popular SEO/SMM software: XRumer, GSA SER, ZennoPoster, Srapebox, Senuke, and more than 100 of other programms. Interested? There are a lot of introducing videos about XEvil in YouTube.

no.12857 donnaTip 46.161.9.41 2017-08-11 19:31

Yesterday i got some cool info about Omega 3 stuff and now i really wanna buy it. But i'm not really sure which benefits will i have. I've found this [url=https://buy-omega-3.com] omega 3 info [/url] , and currently i want to buy it with lowest price. Any idea?

no.12847 donnaTip 46.161.9.41 2017-08-11 03:14

Day ago i read some interesting info about Omega 3 foods and now i really wanna buy it. But i'm not really sure which benefits will i have. I've got this [url=https://buy-omega-3.com] omega 3 info [/url] , and currently i wanna buy it with best price. Any idea?

no.12845 leeanngep 93.170.187.48 2017-08-11 01:47

Absolutely NEW update of SEO/SMM software "XRumer 16.0 + XEvil 3.0": captcha solving of Google, Facebook, Bing, Hotmail, SolveMedia, Yandex, and more than 8400 another categories of captcha, with highest precision (80..100%) and highest speed (100 img per second). You can connect XEvil 3.0 to all most popular SEO/SMM software: XRumer, GSA SER, ZennoPoster, Srapebox, Senuke, and more than 100 of other programms. Interested? There are a lot of introducing videos about XEvil in YouTube

no.12837 donnaTip 46.161.9.41 2017-08-10 11:24

Day ago i read some amazing info about Omega 3 stuff and now i really wanna get it. But i'm not absolutely sure which pluses will i have. I've found this [url=https://buy-omega-3.com] omega 3 info [/url] , and now i want to get it with lowest price. Any idea?

发表评论:

邮箱: