waterye

          #

          mysqld out of memory

          key_buffer_size + tmp_table_size + (read_buffer_size + sort_buffer_size + read_rnd_buffer_size +join_buffer_size )*max_connections = 21215973024

          大于物理內(nèi)存16G,所以導(dǎo)致out of memory

          posted @ 2008-05-27 00:00 waterye 閱讀(570) | 評(píng)論 (0)編輯 收藏

          mysql bugs: #29838

          最近mysql(5.0.45)偶爾出現(xiàn)"Got error 127 when reading table"的錯(cuò)誤.原來(lái)是bug,在5.0.51已fix. 

          Release Notes for MySQL Community Server 5.0.51

          If one thread was performing concurrent inserts, other threads reading from the same table using equality key searches could see the index values for new rows before the data values had been written, leading to reports of table corruption. (Bug#29838)

          posted @ 2008-05-20 20:27 waterye 閱讀(509) | 評(píng)論 (0)編輯 收藏

          tail+grep+awk,好慢

          tail -f sql.log | grep 'table_name', 非常快
          tail -f sql.log | grep 'table_name' | awk '{print substr($0,0,150)}',非常慢

          posted @ 2008-05-05 20:03 waterye 閱讀(1163) | 評(píng)論 (1)編輯 收藏

          mysql table information

          select table_name, engine, row_format, table_rows, data_length, index_length, max_data_length, data_free 
            
          from information_schema.tables 
           
          order by table_rows desc, data_length desc limit 100

          mysql 5.x 增加information_schema

          posted @ 2008-04-26 15:51 waterye 閱讀(320) | 評(píng)論 (0)編輯 收藏

          VisualVM

          VisualVM is a visual tool that integrates several existing JDK software tools and lightweight memory and CPU profiling capabilities. This tool is designed for both production and development time use and further enhances the capability of monitoring and performance analysis for the Java SE platform.

          目前還是用jconsole遠(yuǎn)程觀察jvm. visualvm不知是否像聽(tīng)上去那么好.此項(xiàng)目還在beta2狀態(tài).好像dev.java.net的項(xiàng)目都不怎么樣.

          posted @ 2008-04-18 20:10 waterye 閱讀(322) | 評(píng)論 (0)編輯 收藏

          Adobe AIR

          Adobe AIR is a cross-operating system runtime that enables you to use your existing HTML/Ajax, Flex, or Flash web development skills and tools to build and deploy rich Internet applications to the desktop.

          air就像客戶端的jvm,現(xiàn)在大家都喜歡提供api給developer,希望air能更加open一些,或許能獲得像jvm一樣的成功.

          posted @ 2008-04-04 17:33 waterye 閱讀(321) | 評(píng)論 (0)編輯 收藏

          fisheye

          fisheye: 代碼倉(cāng)庫(kù)查看工具. changelog非常方便查看團(tuán)隊(duì)成員提交的代碼. 當(dāng)然還有rss功能. search也非常強(qiáng)大. 不過(guò)statistic功能就比較簡(jiǎn)單些.

          posted @ 2008-03-22 10:47 waterye 閱讀(450) | 評(píng)論 (2)編輯 收藏

          Mysql Optimization

          show variables like 'table_cache'
          show variables like 'key_buffer_size'
          show variables like 'thread_cache_size'
          show variables like 'tmp_table_size'

          SHOW STATUS LIKE 'open%tables%';
          SHOW STATUS LIKE '%key_read%';
          SHOW STATUS LIKE '%qc%';
          SHOW STATUS LIKE '%Threads_created%';
          SHOW STATUS LIKE '%Created_tmp_disk_tables%';

          set GLOBAL max_connections = 2048
          set GLOBAL table_cache=2048
          set GLOBAL key_buffer_size=4294967296;
          set GLOBAL query_cache_size=536870912;
          set GLOBAL thread_cache_size=400;

          http://trac.symfony-project.com/wiki/MysqlOptimization

          posted @ 2008-01-31 23:22 waterye 閱讀(512) | 評(píng)論 (0)編輯 收藏

          vmstat

          vmstat 1

          posted @ 2008-01-25 21:31 waterye 閱讀(272) | 評(píng)論 (0)編輯 收藏

          FileUpload中文亂碼

          使用fileupload上傳文件,有些瀏覽器會(huì)出現(xiàn)亂碼. 使用setHeaderEncoding就可以解決.

          ServletFileUpload upload = new ServletFileUpload(factory);
          String charset 
          = request.getCharacterEncoding();
          if (charset != null) {
              upload.setHeaderEncoding(charset);
          }

          String charset = request.getCharacterEncoding();
          if (charset!=null) value = item.getString(charset);
          else value = item.getString();

          posted @ 2007-12-30 13:42 waterye 閱讀(2274) | 評(píng)論 (4)編輯 收藏

          僅列出標(biāo)題
          共18頁(yè): 上一頁(yè) 1 2 3 4 5 6 7 8 9 下一頁(yè) Last 
          主站蜘蛛池模板: 武威市| 上杭县| 惠州市| 海阳市| 新干县| 黎城县| 永和县| 蓬安县| 阿合奇县| 商丘市| 任丘市| 乌兰察布市| 乌兰浩特市| 敖汉旗| 平阳县| 枣庄市| 杭锦旗| 怀仁县| 吴桥县| 青海省| 高州市| 苏尼特左旗| 深泽县| 新化县| 滦平县| 鹤山市| 林西县| 乐至县| 永清县| 正阳县| 友谊县| 同德县| 肃宁县| 嵊泗县| 通道| 昌乐县| 日照市| 电白县| 福泉市| 盐亭县| 蒙山县|