<commit_before>#!/bin/bash
# Set core affinity for redis and dynomite processes
#

# Requires setting the EC2 Instance type as ENV variable.
# If Dynomite is used outside of AWS environment,
# the core affinity script can be configured accordingly.
echo "$EC2_INSTANCE_TYPE"

if [ "$EC2_INSTANCE_TYPE" == "r3.xlarge" ]; then
   dynomite_pid=`pgrep dynomite`
   echo "dynomite pid: $dynomite_pid"
   taskset -pac 2,3 $dynomite_pid

   redis_pid=`ps -ef | grep 22122 | grep redis | awk -F' '  '{print $2}'`
   echo "redis pid: $redis_pid"
   taskset -p 1 $redis_pid

else

   dynomite_pid=`pgrep dynomite`
   echo "dynomite pid: $dynomite_pid"
   taskset -pac 2,5,6 $dynomite_pid

   redis_pid=`ps -ef | grep 22122 | grep redis | awk -F' '  '{print $2}'`
   echo "redis pid: $redis_pid"
   taskset -p 3,7 $redis_pid

fi
<commit_msg>added core affinity for centos<commit_after>#!/bin/bash
# Set core affinity for redis and dynomite processes
#

# Requires setting the EC2 Instance type as ENV variable.
# If Dynomite is used outside of AWS environment,
# the core affinity script can be configured accordingly.
echo "$EC2_INSTANCE_TYPE"

if [ "$EC2_INSTANCE_TYPE" == "r3.xlarge" ]; then
   dynomite_pid=`pgrep dynomite`
   echo "dynomite pid: $dynomite_pid"
   taskset -p 2,3 $dynomite_pid

   redis_pid=`ps -ef | grep 22122 | grep redis | awk -F' '  '{print $2}'`
   echo "redis pid: $redis_pid"
   taskset -p 1 $redis_pid

else

   dynomite_pid=`pgrep dynomite`
   echo "dynomite pid: $dynomite_pid"
   taskset -p 2,5,6 $dynomite_pid

   redis_pid=`ps -ef | grep 22122 | grep redis | awk -F' '  '{print $2}'`
   echo "redis pid: $redis_pid"
   taskset -p 3,7 $redis_pid

fi

{'fraction_non_alphanumeric': 0.11117752540346683, 'fraction_numerical': 0.02869097429766886, 'mean_word_length': 3.7965616045845274, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6792086', 'n_tokens_mistral': 693, 'n_tokens_neox': 645, 'n_words': 200}