Calender
Sun Mon Tue Wed Thu Fri Sat
 123456
78910111213
14151617181920
21222324252627
282930    
<< April 2019 >>
広告
SEARCH

SELECTED ENTRIES
RECENT COMMENTS
RECENT TRACKBACK
CATEGORIES
ARCHIVES
LINKS
PROFILE
OTHERS
SKYPE
PC: skype.jojo.jp
chat
iPad: iphone.jojo.jp
chat call
THANKS



本日:
昨日:
多言語
広告
 ▼▲ 作業日報 ▼△
    What's under the hood?
<< VPNプロトコル_PPTP注意 (2012/10/15時点) | main | LinuxUSBブートデバイスの作成 >>
memcached性能調査
朝の9時から夕方16時頃までに集計にかかる処理があったのですが、とりあえずmemcachedでどれぐらい高速化できるかを調べてみました。 本来であれば以下のようなSQLで取得できる値なのですが、レコード数が1千万程度あり以下SQLが帰ってきません。
select ID,min(日付) from テーブル group by id
※実際には高速化の為(インデックスが効くように)有る程度の処理単位で行っています。

リンク:
memcached を使用してサイトのパフォーマンスを高める
処理フロー ・全レコードをSELECT ・memcacheのキーにID、値に日付を入れます ・ 遅いmemcached Array ( [pid] => 4030 [uptime] => 2867 [time] => 1351137630 [version] => 1.2.2 [pointer_size] => 64 [rusage_user] => 6.360397 [rusage_system] => 14.764922 [curr_items] => 1407 [total_items] => 2220 [bytes] => 119442 [curr_connections] => 1 [total_connections] => 7 [connection_structures] => 2 [cmd_get] => 1715504 [cmd_set] => 2220 [get_hits] => 1713752 [get_misses] => 1752 [evictions] => 0 [bytes_read] => 22281715 [bytes_written] => 78745693 [limit_maxbytes] => 536870912 [threads] => 1 ) 13:00:30 13:01:20 Array ( [pid] => 4030 [uptime] => 2917 [time] => 1351137680 [version] => 1.2.2 [pointer_size] => 64 [rusage_user] => 6.752422 [rusage_system] => 15.672979 [curr_items] => 1415 [total_items] => 3189 [bytes] => 120120 [curr_connections] => 1 [total_connections] => 7 [connection_structures] => 2 [cmd_get] => 1815504 [cmd_set] => 3189 [get_hits] => 1812783 [get_misses] => 2721 [evictions] => 0 [bytes_read] => 23681781 [bytes_written] => 83372822 [limit_maxbytes] => 536870912 [threads] => 1 ) −−memcachereboot Array ( [pid] => 5778 [uptime] => 20 [time] => 1351137780 [version] => 1.2.2 [pointer_size] => 64 [rusage_user] => 0.000000 [rusage_system] => 0.000000 [curr_items] => 0 [total_items] => 0 [bytes] => 0 [curr_connections] => 1 [total_connections] => 2 [connection_structures] => 2 [cmd_get] => 0 [cmd_set] => 0 [get_hits] => 0 [get_misses] => 0 [evictions] => 0 [bytes_read] => 18 [bytes_written] => 4 [limit_maxbytes] => 536870912 [threads] => 1 ) 13:03:00 13:03:07 Array ( [pid] => 5778 [uptime] => 26 [time] => 1351137786 [version] => 1.2.2 [pointer_size] => 64 [rusage_user] => 0.376023 [rusage_system] => 0.796049 [curr_items] => 827 [total_items] => 1326 [bytes] => 70203 [curr_connections] => 1 [total_connections] => 2 [connection_structures] => 2 [cmd_get] => 100000 [cmd_set] => 1326 [get_hits] => 99173 [get_misses] => 827 [evictions] => 0 [bytes_read] => 1384315 [bytes_written] => 4605200 [limit_maxbytes] => 536870912 [threads] => 1 )
| - | 17:59 | comments(0) | trackbacks(0) |









http://blog.jojo.jp/trackback/1424897