10月 10th, 2008

高負荷? 証、負荷朎 け側の勘所

Posted in Oracle by admin

 Webサービスの? 負荷? 証試験を実施する場合、検証ケースが本番稼動時の状? をどれだけ再現させられるかどうかで? 証の成功/失敗が別れると思います。そこで? 負荷? 証を実施する場合は出来る限り本番稼動時の状? に蜿 づけようとするはずです。本番環? で稼働する実際のサーバ台数を高負荷? 証用環? に用? できるか?という金銭面の問題もあるかとは思いますが、この場合はサーバ側のチューニングパラメータを調整する事で台数を補う妥協案も必要になります。あるいはサーバ台数の半減に合゜ せて? 荷も半減させ、そこから得られたデータを元に? 測値で? 論を得る方? もあると思います。

 高負荷試験において本番稼動時の状? を再現させる場合、最も難しいのはリクエストする側にあると思います。リクエスト次第によっては、サーバ側? 荷も全く変゜ ってぜ るからです。リクエストする側を本番稼動時の状? に再現できるようにするポイントを記述してみました。

(1) キャッシュの朎 陜
(2) URLパラメータぜ DBデー゜
(3) KeepAliveに対応する
(4) 急朿 な? 荷発生
(5) 負荷分散設定の確認
——————————————-

(1) キャッシュの朎 陜
 負荷朎 け側からリクエストする秒間PV数を本番相? の? 荷にはしているが、ワンパターンなリクエストを繰り返すことでキャッシュが有効になり、実際にはサーバ側に? 荷があまり朎 けられていなかったという失敗例がよぜ あります。キャッシュ? 能はいろいろな所に? み込まれていますので、これを避けるようにリクストパターン? シナリオ? を作成しなければなりません。
 例えば、OSのキャッシュ? 能は性能の遅いディスク読み書きを避ける為に、メモリ? にバッファキャッシュとして朮 しておきます。このキャッシュ? 能を避けるため、画? リクエストの? 荷を生成する場合には? 際のパターンを再現するようリクエストの重複を避ける必要があります。重複のないリクエストパターン? シナリオ? はアクセスログからでも、DocumentRoot配下をfindコマンドで? 索することからでも簡単に? 成出来ると思います。
 DB、特ぜ Oracleのキャッシュ利用? が本番を再現出来ていなければ、DBサーバの? 証は失敗に? ゜ ります。アプリケーションの? りにもよりますが、Oracleのデータを圏 得する条件に採用される情報は、URLパラメータやCOOKIEに格? されていることが多いのではないでしょうか?Oracleのキャッシュ領域は膨大にある為、URLパラメータやCOOKIEに採用する値は全てユニークにすることで、Oracleが重複しないデータブロックへアクセスするのが望ましいと思います。また、RAC環? でアプリケーションパーティショニングを構成している場合やパーティションテーブボ /インデックスを採用している場合は、全てのパーティションに均一にリクエストされるように注? します。

(2) URLパラメータぜ DBデー゜
 リクエストに採用するURLパラメータやCOOKIEは、DBデータとの整合性を保ったものを準備しなければならない為、画? リクエストのように全てのリクエストパターン? シナリオ? をアクセスログ? から圏 得するような? は難しいと思います。そこぜ DBデータを重複のないように? 索して、その? 果からシナリオに採用されるURLパラメータやCOOKIEを生成します。この手順を採用すれば、重複のないDBキャッシュ効? の悪いシナリオを作成できるはずです。

SQL> set escape '\'
SQL>
-- シナリ゜ 100行抽凜
-- SQLインジェクションの脆弱性? っ込みはなしぜ
SELECT
	DISTINCT 'http://wall-climb.com/cgi-bin/Test.cgi?USER_ID=' ||
	B.USER_ID ||
	'\&DEPT_NAME=' ||
	B.DEPT_NAME
FROM
	USER_MASTER A,
	DEPT B
	SAMPLE(5)
WHERE
	A.USER_ID = B.USER_ID AND
	A.DEPT_NO = B.DEPT_NO AND
	ROWNUM < = 100
;

(3) KeepAliveに対応する
 KeepAliveに対応している負荷朎 けツールはいろいろとありますが、大抵は? 連の? 荷朎 け中全てのリクエストをKeepAliveでコネクションを張ったままリクエストを生成する機能だと思います。しかし、実際のブラウ゜ -Apache間ぜ KeepAliveコネクションは、無霧 ぜ KeepAliveコネクションが張られたり同一ページコンテンツでもKeepAliveコネクションが切れたりと? 雑で、それを再現するのは難しいでしょう。それでもKeepAliveのセッション数? は、Webサーバへ大きな? 担をかけると思いますので、負荷朎 け側ぜ KeepAliveを有効にして? 証を行います。

(4) 急朿 な? 荷発生
 負荷朎 けツール側の設定で、Webサーバ(またぜ LoadBalancer)に? 間200PVの? 荷を朎 けるとします。この時、試? 開始時に? 荷のない状態から急朿 に? 間200PVのリクエストを処理させるのは避けた方がいいでしょう。実際の運用時にこのような急朿 な? 荷は起こりえないでしょうし、試? 結果の分析時に異常な値を検出してしまうかもしれません。この場合、秒間10PVから開始しぜ 10分後に目木 の? 間200PVに到達するなどの段障 的なリクエストを生成します。
 また、負荷発生についてぜ CPUパワーに? 存する為、設? していても実際は処理能力不足で? 荷が朎 けられていなかったという問題が発生する可能性もあります。Apacheアクセスログとリクエストの時刻から実績値としてぜ PV数を圏 得し、? 試? 後に確認した方が良いでしょう。

(5) 負荷分散設定の確認
これはリクエストする側というよりもサーバ側設定に蜿 いのですが、注? するポイントとして? 荷分散のチェックを挙げておきます。
ボ LoadBalancerぜ IPにリクエストする場合、Webサーバへのリクエストを正しく負荷分散出来ているか?
ボ Apacheをリバースプロキシとして動作させる場合、バックエンドのサーバへ正しく負荷分散出来ているか?
・バックエンドサーバから複? DBへコネクションプーリングしている場合、リクエスト分散、各DBへのコネクション数は? しいか

You can leave a comment, or trackback from your own site. RSS 2.0

45 comments

  1. Annis says:

    Buyers do pay direct and indirect prices.

    4月 20th, 2019 at 11:56:41

  2. Mauro Pereira Martins cunhado says:

    Hey there, You have done a fantastic job. I will certainly
    digg it and personally recommend to my friends. I’m
    confident they will be benefited from this web site.

    4月 24th, 2019 at 0:12:15

  3. Rodrigo Branco says:

    Thank you for sharing your info. I truly appreciate your efforts and I will
    be waiting for your next post thanks once again.

    4月 24th, 2019 at 0:29:07

  4. Terrance says:

    Hello there, just became aware of your blog through Google, and found that it
    is truly informative. I’m gonna watch out for brussels.
    I’ll be grateful if you continue this in future. A lot of people will be benefited from your writing.
    Cheers!

    4月 24th, 2019 at 2:12:49

  5. tinyurl.com says:

    Hi there to all, how is the whole thing, I think every one is getting more from
    this web site, and your views are good in support of new
    people.

    4月 24th, 2019 at 4:20:56

  6. tinyurl.com says:

    Hi there, after reading this remarkable article i am too happy
    to share my familiarity here with friends.

    4月 24th, 2019 at 4:29:08

  7. http://tinyurl.com says:

    I am not sure where you are getting your info, but good topic.
    I needs to spend some time learning much more or understanding more.
    Thanks for magnificent information I was looking for this info for my mission.

    4月 24th, 2019 at 5:57:58

  8. Leonardo Martins de Almeida says:

    Your style is so unique in comparison to other folks
    I’ve read stuff from. Thank you for posting when you
    have the opportunity, Guess I will just bookmark this blog.

    4月 24th, 2019 at 6:42:18

  9. http://tinyurl.com/y3utmrt5 says:

    Great info. Lucky me I ran across your website by
    accident (stumbleupon). I’ve saved as a favorite for later!

    4月 24th, 2019 at 7:18:05

  10. Leonardo Martins de Almeida says:

    I was recommended this website by my cousin. I’m not
    sure whether this post is written by him as no one else know such detailed about my difficulty.

    You are incredible! Thanks!

    4月 24th, 2019 at 7:18:38

  11. Americo Amadeu Filho says:

    hi!,I really like your writing very a lot! proportion we keep up
    a correspondence more about your article on AOL? I need an expert in this house to
    unravel my problem. Maybe that is you! Taking a look forward to see you.

    4月 24th, 2019 at 7:35:03

  12. Luiz Gastão Bittencourt says:

    What a data of un-ambiguity and preserveness of precious know-how concerning unpredicted emotions.

    4月 24th, 2019 at 9:10:48

  13. http://tinyurl.com/y6gc5sfv says:

    Somebody essentially assist to make severely posts I might state.
    That is the very first time I frequented your web page and so far?
    I amazed with the analysis you made to make this particular
    post incredible. Great task!

    4月 24th, 2019 at 12:17:00

  14. http://bit.ly/2XmqFZZ says:

    Hmm it seems like your blog ate my first comment (it
    was extremely long) so I guess I’ll just sum it up what
    I submitted and say, I’m thoroughly enjoying your blog. I as well am an aspiring blog writer
    but I’m still new to everything. Do you have any helpful hints
    for beginner blog writers? I’d definitely appreciate it.

    4月 24th, 2019 at 13:12:08

  15. Rodrigo Branco says:

    Usually I don’t read article on blogs, but I would like to say that this write-up very forced me to check out and do it!

    Your writing style has been surprised me. Thanks, very nice post.

    4月 24th, 2019 at 13:52:58

  16. Rodrigo Branco says:

    Very nice post. I just stumbled upon your weblog and wanted to
    say that I’ve truly enjoyed surfing around your blog
    posts. In any case I’ll be subscribing to your feed and I hope you write again very soon!

    4月 24th, 2019 at 14:14:33

  17. Carlos Eduardo Veiga Petrobras says:

    Nice blog here! Also your website loads up fast! What host are you using?

    Can I get your affiliate link to your host? I wish my web site loaded
    up as quickly as yours lol

    4月 24th, 2019 at 14:58:04

  18. Kaitlyn says:

    Thanks for ones marvelous posting! I certainly enjoyed reading it, you might be a great author.I will
    be sure to bookmark your blog and will eventually come
    back someday. I want to encourage you continue your great writing, have a nice weekend!

    4月 24th, 2019 at 17:08:40

  19. Rodrigo Branco says:

    I visited multiple blogs except the audio feature
    for audio songs current at this web page is really superb.

    4月 24th, 2019 at 17:45:56

  20. http://tinyurl.com says:

    After checking out a number of the articles on your blog, I really appreciate your
    way of blogging. I saved as a favorite it to my bookmark site list and will
    be checking back soon. Take a look at my website as well and let
    me know what you think.

    4月 24th, 2019 at 18:23:53

  21. Leonardo Martins de Almeida says:

    Hello! I’m at work browsing your blog from my new iphone!

    Just wanted to say I love reading your blog and look forward to all your posts!

    Carry on the great work!

    4月 24th, 2019 at 19:52:23

  22. http://tinyurl.com/yxqau8cr says:

    Hello! This is my first comment here so I just wanted to
    give a quick shout out and say I genuinely enjoy reading your posts.

    Can you recommend any other blogs/websites/forums that cover the same topics?
    Thank you!

    4月 24th, 2019 at 20:12:49

  23. Rodrigo Branco says:

    Hello! This is my first comment here so I just wanted to give a quick shout out and
    tell you I truly enjoy reading through your posts.
    Can you recommend any other blogs/websites/forums that cover the same subjects?
    Many thanks!

    4月 24th, 2019 at 20:40:18

  24. Heather says:

    I don’t even know the way I stopped up here, however I believed this submit
    was once great. I don’t recognise who you’re but definitely
    you are going to a well-known blogger in case you are not already.
    Cheers!

    4月 24th, 2019 at 20:47:44

  25. Aubrey says:

    Undeniably believe that which you said. Your favorite
    justification seemed to be on the internet the easiest thing to be
    aware of. I say to you, I certainly get irked while people
    consider worries that they just don’t know about.
    You managed to hit the nail upon the top and also defined out the whole thing without having
    side-effects , people can take a signal.
    Will probably be back to get more. Thanks

    4月 24th, 2019 at 21:41:40

  26. Jed says:

    You really make it seem so easy with your presentation but I find this matter
    to be really something which I think I would never understand.
    It seems too complicated and extremely broad for me.
    I’m looking forward for your next post, I will try to get
    the hang of it!

    4月 24th, 2019 at 21:43:20

  27. Angelika says:

    Hello to every body, it’s my first pay a quick visit
    of this blog; this blog includes awesome and actually good data designed for visitors.

    4月 25th, 2019 at 1:20:51

  28. http://tinyurl.com/ says:

    I don’t know if it’s just me or if everybody else experiencing problems
    with your blog. It appears as if some of the text in your posts are running off the screen. Can somebody else please comment and let me know if this is happening to them
    too? This might be a problem with my internet
    browser because I’ve had this happen before.
    Thank you

    4月 25th, 2019 at 2:02:24

  29. Leonardo Martins de Almeida says:

    I visited many websites but the audio quality for audio songs existing at this web page is genuinely wonderful.

    4月 25th, 2019 at 4:01:09

  30. Lizzie says:

    I couldn’t resist commenting. Well written!

    4月 25th, 2019 at 4:28:19

  31. Rodrigo Branco says:

    What’s up, yes this article is genuinely good
    and I have learned lot of things from it about blogging. thanks.

    4月 25th, 2019 at 5:15:45

  32. Jayden says:

    I’m not certain where you are getting your info,
    but great topic. I needs to spend a while finding out more or figuring out more.
    Thanks for great info I used to be looking for this information for
    my mission.

    4月 25th, 2019 at 7:30:35

  33. Leonardo Martins de Almeida says:

    This is my first time pay a quick visit at here and i am actually pleassant to read all at single place.

    4月 25th, 2019 at 9:40:13

  34. http://tinyurl.com/y3dsut37 says:

    Greetings! Very useful advice within this article! It’s the little changes that make the largest changes.
    Thanks a lot for sharing!

    4月 25th, 2019 at 10:17:19

  35. Rodrigo Branco says:

    Hello to every one, the contents existing at this web page are actually remarkable for people experience, well, keep up the nice work fellows.

    4月 25th, 2019 at 10:22:37

  36. Thalia says:

    I am curious to find out what blog system you have been working with?
    I’m experiencing some small security problems
    with my latest blog and I’d like to find something more risk-free.
    Do you have any suggestions?

    4月 25th, 2019 at 11:00:48

  37. tinyurl.com says:

    Having read this I thought it was rather informative.

    I appreciate you finding the time and effort to put this information together.

    I once again find myself spending a lot of time both reading and commenting.
    But so what, it was still worthwhile!

    4月 25th, 2019 at 12:26:34

  38. tinyurl.com says:

    you are actually a excellent webmaster. The web site loading speed is incredible.
    It sort of feels that you’re doing any distinctive trick. Moreover, The contents are masterwork.
    you’ve performed a excellent process on this topic!

    4月 25th, 2019 at 12:33:30

  39. Rodrigo Branco says:

    Can you tell us more about this? I’d care to find out more
    details.

    4月 25th, 2019 at 13:04:08

  40. Rodrigo Branco says:

    I used to be able to find good info from your content.

    4月 25th, 2019 at 15:41:22

  41. http://tinyurl.com/y6phhkxs says:

    I am sure this article has touched all the internet visitors, its really really good
    piece of writing on building up new website.

    4月 25th, 2019 at 18:00:16

  42. tinyurl.com says:

    Howdy! Someone in my Facebook group shared this site with
    us so I came to check it out. I’m definitely loving the information. I’m bookmarking and will be tweeting this to my followers!

    Superb blog and great style and design.

    4月 25th, 2019 at 18:14:39

  43. Leonardo Martins de Almeida says:

    Hi to all, how is the whole thing, I think every one is getting more from this web site, and your views are
    pleasant in support of new visitors.

    4月 25th, 2019 at 18:19:15

  44. Brittny says:

    Just wish to say your article is as amazing. The clearness to your post is just spectacular and i
    can assume you are a professional in this subject.
    Well with your permission allow me to grab your RSS feed to keep up to date with approaching post.

    Thanks 1,000,000 and please carry on the rewarding work.

    4月 25th, 2019 at 18:51:11

  45. Malinda says:

    I think this is among the most vital info for me. And i’m glad
    reading your article. But should remark on few general things, The web
    site style is great, the articles is really great : D.
    Good job, cheers

    4月 25th, 2019 at 19:41:02

Leave a comment