본문 바로가기

人 煙382

MALLOC_ARENA_MAX 서버 프로그램을 작성하다 보면, 학습,색인 등의 특정 프로세스 이후 대용량의 knowledge 를 로딩하는 경우가 있다. 분명히 메모리 할당 해지 부분을 잘 넣었음에도 증가하는 메모리가 있는 경우가 있는데, 이때 환경변수로 MALLOC_ARENA_MAX=1 를 사용하게 되면 메모리 증가를 막을 수 있다. 단 메모리 할당 속도가 현저히 저하되므로 용도에 맞게 잘 사용해야 한다. 보다 자세한 내용은 아래를 참고한다. https://devcenter.heroku.com/articles/tuning-glibc-memory-behavior 2017. 4. 21.
JDBC MYSQL : addbatch() 를 사용했는데도 commit시 delay 가 있는 경우 DATABASE URL 에 아래의 인자를 추가하면 속도가 향상된다. 1String DATABASE_URL = "jdbc:mysql://your.db.address:dbport?rewriteBatchedStatements=true";Table 구조에서 성능저하를 일으킬 수 있는 불필요한 부분을 삭제한다. ( 절대 빈값이 들어갈수 없는 INSERT 문을 이용하는데 NOT NULL을 사용함, 검색을 자주하지 않는 필드에 대해서 인덱스를 사용함 등…) 2016. 4. 21.
How to create simple / fast socket server in bash Use “nc” command.1$ nc -k -l {port} > {output.filename}(ex) $ nc -k -l 1818 > output.file 2016. 3. 9.
How to find log directory of storm nimbus / supervisor (worker) See the command argument of nimbus (or supervisor) 1 2 3 4 5 $ ps aux | grep nimbus or $ ps aux | grep supervisor Search storm.log.dir in the command argument 1 -Dstorm.log.dir=/opt/storm/apache-storm-0.9.6/logs 2016. 1. 26.