如何提高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.119637 uitgebracht 89.108.111.39 2021-01-22 17:07

i am 30 is viagra benificial viagra mexico <a href="https://vgsnake.com/#">cheap viagra online overnight shipping </a> - viagra 10mg login [url=https://vgsnake.com/#]viagra for sell [/url] viagra vs viagra drugs gaestebuch.cgi

no.118791 name4m 178.159.37.69 2020-12-31 12:37

sildenafil citrate cenforce 100 <a href="https://cheapgenericpills.com/">yohimbine sildenafil</a> sildenafil dose reddit https://cheapgenericpills.com/

no.118551 nameww 178.159.37.69 2020-12-29 12:25

is there a generic sildenafil citrate <a href="https://upharmacy24.com/">sildenafil transdermal patch</a> sildenafil 50 https://upharmacy24.com/

no.118478 name4e 178.159.37.69 2020-12-28 18:57

sildenafil erectile dysfunction <a href="https://tevaviagra.com/">purchasing sildenafil</a> sildenafil cost per pill https://tevaviagra.com/

no.118464 namebv 178.159.37.69 2020-12-27 17:11

what does sildenafil citrate come from <a href="https://fortunegraphite.com/">sildenafil drugstore com price</a> sildenafil safeway https://fortunegraphite.com/

no.118281 nameed 178.159.37.69 2020-12-26 07:12

planned parenthood viagra <a href="https://judrxstore.com/">where can i buy viagra over the counter usa</a> viagra ads https://judrxstore.com/

no.118184 cbdz3 178.159.37.69 2020-07-28 06:00

how to use cbd gummies for anxiety <a href="https://cbdediblescandy.com/book.html">by sera relief cbd gummies review</a> cbd gummies recommendation

no.118171 cbd7e 178.159.37.69 2020-07-27 21:10

cbd oil benefits for seizures <a href="https://cannabisoil2018.com/charlottes-web-cbd/index.html">the mental health benefits of cbd oil</a> benefits of ingesting cbd

no.118156 cbdid 178.159.37.69 2020-07-26 01:21

all the health benefits of cbd <a href="https://cannabidioloilfordogs.com/Doggie-Daycare-Washing-New-York-NY.html">cbd oil benefits every day</a> cbd medical benefits antidepressant

no.118150 cbdpv 178.159.37.69 2020-07-25 10:03

cbd oil benefits mercola <a href="https://cbdoilcompanies.com/cannabis-growth-corp-stock.html">cbd benefits 2015</a> benefits of water soluble cbd

no.118145 cbda6 178.159.37.69 2020-07-25 06:55

benefits of cbd oil and gummies <a href="https://cbdhempoilsale.us/tag/cannibinoid-system/index.html">cbd oil benefits for elderly</a> benefits of cbd oil chart

no.118085 thcef 178.159.37.77 2020-07-21 01:15

cbd gummies in clarksville tn <a href="https://cbdediblescandy.com/">happy hemp cbd gummies</a> how long before cbd gummies to work

no.118063 thcr2 178.159.37.77 2020-07-20 04:38

plus cbd capsules 25mg <a href="https://cbdpillsforsale.org/">meds biotech cbd & turmeric capsules</a> cbd oil hemp capsules 10mg

no.118057 cbdwd 178.159.37.69 2020-07-20 01:45

cbd oil nwithout thc benefits <a href="https://cannabisoil2018.com/">cbd bath bomb benefits</a> benefits of cbd erectile dysfunction

no.118048 cbdqc 178.159.37.69 2020-07-19 22:52

best place online buy viagra <a href="https://judproducts.com/generic/diabetes_patch.htm">buy viagra</a> can i buy viagra without a prescription

no.118038 thcsa 178.159.37.77 2020-07-19 20:35

cbd dosage for dogs mg per pound <a href="https://wfieldsforpets.com/">how long for cbd to work on dogs</a> cbd for anxiety dog

no.118037 cbdyq 178.159.37.69 2020-07-19 20:33

where to buy viagra connect usa <a href="https://judpharmacy.com/generic/xalatan_prices.htm">where can you buy viagra cheap</a> buy generic viagra in usa

no.118027 thcib 178.159.37.77 2020-07-19 10:50

cbd oil gave dog diarrhea <a href="https://cbdoilfordog.org/">benefits of cbd oil for dogs</a> what time to give cbd for dogs

no.117575 kiraplastinina56 46.185.114.1 2020-06-23 09:12

Препараты качественные,купили на сайте anticancer24.ru Доставили из Москвы за 3 дня <a href=https://anticancer24.ru/shop/490/desc/sofheetdacheet>софосбувир +и даклатасвир побочные эффекты</a>

no.117418 kiraplastinina56 46.185.114.1 2020-06-15 04:19

Препараты качественные,купили на сайте anticancer24.ru Доставили из Москвы за 3 дня <a href=https://anticancer24.ru/shop/490/desc/sofheetdacheet>пвт софосбувир даклатасвир</a>

no.117398 sikasova 5.44.169.215 2020-06-11 13:44

Реальное секс видео в шикарном качестве, любуйтесь бесплатно: https://porno-go.net Жесткое секс видео бесплатно смотреть на https://porno-go.net/hd-porno/4466-trahnul-devushku-voditelya-taksi-u-nee-v-tachke.html в HD1080 Шикарное порно фильмы без регистрации просмотр на https://porno-go.net/hd-porno/2340-ne-ostavil-kisku-devushki-v-pokoe-ne-na-sekundu..html в HD720 Жгучее секс съемка без регистрации онлайн на https://porno-go.net/amature/3988-koroleva-domashnego-anala-snova-v-dele.html в в

no.117387 grembax 5.44.169.215 2020-06-11 00:15

[img]https://i.ibb.co/vcPfmhQ/1111.jpg[/img] Видео абсолютно разное и большинство из них в хорошем hd1080 качестве, все доступно без смс 24 часа в сутки. Испытайте насыщенное глубокими эмоциями экскурсия по точно собранным группам нивысшее блаженство - сайт подготовил для вас оттянуться просмотром огромного числа все возможных роликов в лучшем качестве HD.Молоденькими позволяют исполнять самые странные эротические сцены которые совсем не сделают выполнить молодые девушки. Видео безусловно р

no.117163 jessmcmill666 5.188.84.150 2020-05-20 01:26

Фейт просто ошеломлённо улыбалась. [url=https://onlinecreditka.site/podat_zaiavku_na_kreditnuiu_kartu_pochta_bank.php]подать заявку на кредитную карту почта банк[/url], [url=https://onlinecreditka.site/vziat_zaim_onlain_srochno_na_kartu_bez_otkaza.php]взять займ онлайн срочно на карту без отказа[/url]. Ясно же, что до темноты они ещё хоть раз, но попытаю

no.117035 cbdbf 178.159.37.69 2020-05-13 09:17

buy australian viagra <a href="https://judpharmacy.com/">buy viagra 100 mg</a> where can i buy viagra today

no.117034 grembax 5.44.169.215 2020-05-13 07:22

[img]https://i.ibb.co/vcPfmhQ/1111.jpg[/img] Смотрите абсолютно разное и большинство из них в замечательном HD качестве, все доступно абсолютно бесплатно 7 дней в неделю. Попробуйте на себе переполненное яркими впечатлениями турне по хорошо постороенным категориям пиковое восторг - туб дает возможность для вас насладится просмотром большого числа разных видео в хорошем качестве ХД.18 летними позволяют вытворять самые необычные эротические сцены которые совсем не могут воплотить молодые деву

no.116992 sikasova 5.44.169.215 2020-05-08 15:07

Приватное секс видео в офигенном качестве, наслаждайтесь бесплатно: https://porno-go.net Чувственное секс ролики без границ онлайн на https://porno-go.net/hd-porno/1351-bdsm-s-ogromnoy-zhopoy.html в высоком качестве Семейное порно фильмы без границ просмотр на https://porno-go.net/azian/808-chinese-baby-in-mask-homemade.html в HD720 Безумное секс ролики бесплатно смотреть на https://porno-go.net/hd-porno/5981-snyal-na-kameru-kak-trahaet-grudastuyu-blondinku-i-konchaet-na-ee-kisku.html в HD

no.116955 sikasova 5.44.169.215 2020-04-28 06:31

Лучшая порнушка видео в высоком качестве, наслаждайтесь бесплатно: https://porno-go.net Нежное порно запись без границ просмотр на https://porno-go.net/uprugie-siski/9618-chtoby-proyti-kasting-suchka-s-pirsingom-daet-sebya-trahnut-v-popku.html в высоком качестве Семейное секс видео без регистрации онлайн на https://porno-go.net/hd-porno/830-jeny-smith-osennyaya-fotosessiya.html в высоком качестве Нежное порно съемка бесплатно просмотр на https://porno-go.net/hd-porno/9188-lesbiyskaya-eblya

no.116881 ant.onz.u.e.e.v.3.4. 109.254.64.113 2020-04-26 19:15

Today, I went to the beach with my children. I found a sea shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She put the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is completely off topic but I had to tell someone! praj.aretenb.se/trends/g-ner-i-vikt-av-att-springa.php ga ner i vikt av att springa

no.116872 a.nt.on.zueev3.4 185.29.255.19 2020-04-26 09:00

Hi, i read your blog from time to time and i own a similar one and i was just wondering if you get a lot of spam feedback? If so how do you protect against it, any plugin or anything you can recommend? I get so much lately it's driving me mad so any support is very much appreciated. chir.aresgrb.se/beautiful-things/wondroos-gezicht-besmettelijk.php wondroos gezicht besmettelijk

no.116865 a.n.t.o.n.zu.eev34. 109.254.64.113 2020-04-26 04:52

Magnificent items from you, man. I have consider your stuff previous to and you are simply extremely fantastic. I actually like what you've obtained here, certainly like what you're stating and the way through which you assert it. You make it entertaining and you continue to take care of to keep it sensible. I can't wait to learn much more from you. This is actually a tremendous website. bolcu.aretenb.se/sport/arctic-thai-boden.php arctic thai boden

no.116852 ant.o.nz.ue.e.v3.4 109.254.64.113 2020-04-25 14:06

What's up, yup this article is actually nice and I have learned lot of things from it on the topic of blogging. thanks. trano.aretenb.se/delicious-dishes/bra-mltidsersaettning-utan-socker.php bra maltidsersattning utan socker

no.116851 a.n.t.o.nzu.e.e.v.34. 185.29.255.19 2020-04-25 12:33

Link exchange is nothing else except it is simply placing the other person's webpage link on your page at suitable place and other person will also do same in favor of you. gueve.aresgrb.se/useful-tips/kycklinglrfile-lchf-recept.php kycklinglarfile lchf recept

no.116835 an.tonzue.e.v3.4. 185.29.255.19 2020-04-24 17:27

Pretty great post. I just stumbled upon your weblog and wanted to mention that I've really loved surfing around your blog posts. In any case I'll be subscribing for your feed and I hope you write again soon! paycfi.aresgrb.se/useful-tips/coop-extra-schampo.php coop extra schampo

no.116802 ant.o.nz.ue.e.v.34 109.254.64.113 2020-04-23 21:42

Today, while I was at work, my sister stole my iPad and tested to see if it can survive a forty foot drop, just so she can be a youtube sensation. My iPad is now destroyed and she has 83 views. I know this is entirely off topic but I had to share it with someone! cruda.aretenb.se/useful-tips/naer-blir-jag-laettast-gravid.php nar blir jag lattast gravid

no.116797 an.to.n.zu.e.e.v.34. 109.254.6.55 2020-04-23 18:21

Attractive section of content. I just stumbled upon your site and in accession capital to assert that I acquire in fact enjoyed account your blog posts. Any way I'll be subscribing to your feeds and even I achievement you access consistently fast. tastyandinteresting.be/for-men/haengmatta-p-stativ.php hängmatta på stativ

no.116792 an.to.n.z.ue.e.v.3.4. 185.29.255.19 2020-04-23 13:27

Hi to every one, because I am actually eager of reading this blog's post to be updated daily. It contains fastidious data. taip.aresgrb.se/trends/antioxidanten-wiki.php antioxidanten wiki

no.116777 anto.nzu.eev3.4. 109.254.64.113 2020-04-23 03:29

Inspiring story there. What occurred after? Good luck! riba.aretenb.se/delicious-dishes/priorin-schampo-omdoeme.php priorin schampo omdome

no.116763 anton.zuee.v.34. 109.254.64.113 2020-04-22 13:06

If you wish for to obtain a good deal from this paragraph then you have to apply these strategies to your won weblog. terd.aretenb.se/delicious-dishes/carolina-klufts-man.php carolina klufts man

no.116760 a.nt.onzuee.v3.4 185.29.255.19 2020-04-22 08:33

Hi! Someone in my Myspace group shared this site with us so I came to give it a look. I'm definitely enjoying the information. I'm book-marking and will be tweeting this to my followers! Excellent blog and great design and style. passt.aresgrb.se/skin-care/skaerp-till-ridbyxor.php skarp till ridbyxor

no.116754 an.t.o.nz.ue.e.v.3.4. 109.254.64.113 2020-04-22 00:01

Hi there! I'm at work surfing around your blog from my new iphone 4! Just wanted to say I love reading through your blog and look forward to all your posts! Keep up the fantastic work! diabl.aretenb.se/for-women/svart-trenchcoat-vero-moda.php svart trenchcoat vero moda

no.116745 a.n.t.o.nzu.ee.v34 185.29.255.19 2020-04-21 02:26

Thanks for sharing your thoughts on. Regards newsandfashionse.be/music/quorn-koettfaersss-recept.php quorn kottfarssas recept

no.116737 an.t.on.zueev34 185.29.255.19 2020-04-20 06:52

Do you mind if I quote a few of your posts as long as I provide credit and sources back to your webpage? My blog is in the exact same niche as yours and my visitors would genuinely benefit from a lot of the information you present here. Please let me know if this okay with you. Appreciate it! newsandfashionse.be/music/loewengrip-care-color-deodorant.php lowengrip care & color deodorant

no.116728 a.n.tonzu.e.ev.3.4. 185.29.255.19 2020-04-19 13:05

These are truly enormous ideas in on the topic of blogging. You have touched some pleasant points here. Any way keep up wrinting. newsandfashionse.be/decorations/supergod-vegetarisk-paj.php supergod vegetarisk paj

no.116720 a.nt.o.nz.ueev.34 185.29.255.19 2020-04-18 18:27

I’m not that much of a internet reader to be honest but your blogs really nice, keep it up! I'll go ahead and bookmark your site to come back in the future. Cheers newsandfashionse.be/music/nem-ide-nglekort-bestilling.php nem ide noglekort bestilling

no.116711 an.t.o.nz.ue.ev.34 185.29.255.19 2020-04-17 07:34

Awesome blog! Is your theme custom made or did you download it from somewhere? A theme like yours with a few simple tweeks would really make my blog shine. Please let me know where you got your theme. Bless you newsandfashionse.be/travels/yoga-games-stockholm.php yoga games stockholm

no.116682 anto.nzu.eev3.4. 185.29.255.19 2020-04-16 00:44

Definitely believe that which you said. Your favorite justification appeared to be on the net the easiest thing to be aware of. I say to you, I certainly get irked while people think about worries that they plainly do not know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side-effects , people can take a signal. Will likely be back to get more. Thanks newsandfashionse.be/decorations/efva-attling-wikipedia.php efva attling wikipedia

no.116679 Agrafena 5.188.210.18 2020-04-15 23:47

[url=https://timeblock.ru/product/timeblock-2-monats-packung/]какие средства ухода за кожей[/url] или [url=https://timeblock.ru/read/news/]аптечный уход за кожей лица[/url] https://timeblock.ru/read/stati/

no.116598 kirapshenik 5.248.224.61 2020-04-13 05:41

Здесь можно [url=https://india-express.net/shop/191/desc/sunitinib]Suninat 50mg (Сунитиниб) - Сунинат (Sunitinib) - аналог Сутент купить[/url]. Лекарство назначают больным, страдающим от онкологии желудка, кишечника, поджелудочной железы, полипов толстой кишки, новообразований в почке и прочих злокачественных опухолей, связанных с желудочно-кишечным трактом. [url=https://india-express.net/shop/191/desc/sunitinib]сутент мнн[/url]

no.116496 grembax 5.44.169.215 2020-04-06 18:06

[img]https://i.ibb.co/vcPfmhQ/1111.jpg[/img] Смотрите абсолютно разное и большинство из них в идеальном hd1080 качестве, все доступно без регистрации 7 дней в неделю. Попробуйте на себе переполненное яркими ощущениями круиз по четко постороенным подразделам пиковое восторг - туб подготовил для вас оттянуться просмотром большого числа все возможных роликов в хорошем качестве HD.18 летними позволяют делать очень необычные вещи в сексе которые совсем не под силу воплотить молоденькие девчонки.

no.116435 tehmaster17 5.188.210.18 2020-03-31 17:32

[url=https://extraint.ru/catalog/gr_categ/svet/page/8/]Люстра Lampadario[/url] или [url=https://extraint.ru/catalog/gidromassazhnaya_vanna_consonance]Стул Mirto IM58B_C[/url] https://extraint.ru/catalog/gr_categ/mebel/page/8/

发表评论:

邮箱: