PHP / MySQL / Drupal kullanarak Bant ile ilgili sorunlar

0 Cevap php

Ben bir arkadaşınızın sunucuda bir site barındırma duyuyorum. Bu MySQL, PHP ve Druapl kullanıyor. O bütün bant genişliği kullanıyor ama neden bana yaşam için bilemiyorum ki şikayet ediyor. Orada hosting görüntü / video değil ve ben o ~ 60 GB / ay olduğuna inanıyorum. Hemen hemen tüm bant genişliği veri tabanları tarafından kullanılacak. Ben sorunun iki aşağıdaki alanlardan birinde yatıyor düşünüyorum.

1) Her 3 saat) Cron'un yoluyla (aşağıdakileri yapın:

For every user (~400) do:
 Get user ID from table
 Get nickname based on ID from table
 Construct URL for XML Requester using nickname
 Using CURL store the contents of URL in string (8,000 characters)
 Convert to object (200 or so properties/fields)
 Store Fields in Database (update if exists, insert otherwise) [This table has ~80,000 (400x200) rows and 3 columns - User, Stat Name, Value]

Ben bu kullanır tahmin zaman başına ~ 3 MB koştu (8.000 * 400 = 3,200,00 byte = 3,2 MB) ve sadece 24 ya da öylesine bir şey bir gün, megs bulunuyor.

2) Request on Table with ~80,000 rows Page allows users to select one of the 200 or so Stat Names and it will create a sorted list of that stat. My question here is if you pass a query to server [select * from table where stat_name="blah"sort by value desc] or such does this use a lot of bandwidth or just server resources (CPU)? Table is indexed btw.

Herhangi bir yardım / öneri / fikirler büyük mutluluk duyacağız.

XML Requester'ı örneği Page İçeriği:

<player_stats aid="25">
<stat name="nickname">S2Moebiwan</stat>
<stat name="acc_games_played">56</stat>
<stat name="acc_wins">26</stat>
<stat name="acc_losses">30</stat>
<stat name="acc_concedes">14</stat>
<stat name="acc_concedevotes">4</stat>
<stat name="acc_buybacks">15</stat>
<stat name="acc_discos">0</stat>
<stat name="acc_kicked">0</stat>
<stat name="acc_pub_skill">1525</stat>
<stat name="acc_pub_count">56</stat>
<stat name="acc_pub_pset">1</stat>
<stat name="acc_avg_score">0.00</stat>
<stat name="acc_herokills">360</stat>
<stat name="acc_herodmg">830726</stat>
<stat name="acc_heroexp">430859</stat>
<stat name="acc_herokillsgold">99989</stat>
<stat name="acc_heroassists">568</stat>
<stat name="acc_deaths">321</stat>
<stat name="acc_goldlost2death">118770</stat>
<stat name="acc_secs_dead">17551</stat>
<stat name="acc_teamcreepkills">6187</stat>
<stat name="acc_teamcreepdmg">3343661</stat>
<stat name="acc_teamcreepexp">517995</stat>
<stat name="acc_teamcreepgold">239674</stat>
<stat name="acc_neutralcreepkills">639</stat>
<stat name="acc_neutralcreepdmg">467881</stat>
<stat name="acc_neutralcreepexp">43035</stat>
<stat name="acc_neutralcreepgold">26940</stat>
<stat name="acc_bdmg">75237</stat>
<stat name="acc_bdmgexp">0</stat>
<stat name="acc_razed">54</stat>
<stat name="acc_bgold">99171</stat>
<stat name="acc_denies">346</stat>
<stat name="acc_exp_denied">15424</stat>
<stat name="acc_gold">469389</stat>
<stat name="acc_gold_spent">550152</stat>
<stat name="acc_exp">996135</stat>
<stat name="acc_actions">315974</stat>
<stat name="acc_secs">159980</stat>
<stat name="acc_consumables">739</stat>
<stat name="acc_wards">83</stat>
<stat name="acc_em_played">0</stat>
<stat name="acc_time_earning_exp">85393</stat>
<stat name="AR">0</stat>
<stat name="AREM">0</stat>
<stat name="AP">0</stat>
<stat name="APEM">0</stat>
<stat name="level">6</stat>
<stat name="total_discos">0</stat>
<stat name="total_possible_discos">0</stat>
<stat name="rnk_games_played">0</stat>
<stat name="rnk_wins">0</stat>
<stat name="rnk_losses">0</stat>
<stat name="rnk_concedes">0</stat>
<stat name="rnk_concedevotes">0</stat>
<stat name="rnk_buybacks">0</stat>
<stat name="rnk_discos">0</stat>
<stat name="rnk_kicked">0</stat>
<stat name="rnk_amm_solo_rating">1500.00</stat>
<stat name="rnk_amm_solo_count">0</stat>
<stat name="rnk_amm_solo_conf">0.00</stat>
<stat name="rnk_amm_solo_prov">0</stat>
<stat name="rnk_amm_solo_pset">0</stat>
<stat name="rnk_amm_team_rating">1500.00</stat>
<stat name="rnk_amm_team_count">0</stat>
<stat name="rnk_amm_team_conf">0.00</stat>
<stat name="rnk_amm_team_prov">0</stat>
<stat name="rnk_amm_team_pset">0</stat>
<stat name="rnk_herokills">0</stat>
<stat name="rnk_herodmg">0</stat>
<stat name="rnk_heroexp">0</stat>
<stat name="rnk_herokillsgold">0</stat>
<stat name="rnk_heroassists">0</stat>
<stat name="rnk_deaths">0</stat>
<stat name="rnk_goldlost2death">0</stat>
<stat name="rnk_secs_dead">0</stat>
<stat name="rnk_teamcreepkills">0</stat>
<stat name="rnk_teamcreepdmg">0</stat>
<stat name="rnk_teamcreepexp">0</stat>
<stat name="rnk_teamcreepgold">0</stat>
<stat name="rnk_neutralcreepkills">0</stat>
<stat name="rnk_neutralcreepdmg">0</stat>
<stat name="rnk_neutralcreepexp">0</stat>
<stat name="rnk_neutralcreepgold">0</stat>
<stat name="rnk_bdmg">0</stat>
<stat name="rnk_bdmgexp">0</stat>
<stat name="rnk_razed">0</stat>
<stat name="rnk_bgold">0</stat>
<stat name="rnk_denies">0</stat>
<stat name="rnk_exp_denied">0</stat>
<stat name="rnk_gold">0</stat>
<stat name="rnk_gold_spent">0</stat>
<stat name="rnk_exp">0</stat>
<stat name="rnk_actions">0</stat>
<stat name="rnk_secs">0</stat>
<stat name="rnk_consumables">0</stat>
<stat name="rnk_wards">0</stat>
<stat name="rnk_em_played">0</stat>
<stat name="rnk_level">1</stat>
<stat name="rnk_time_earning_exp">0</stat>
</player_stats>
−
<player_stats aid="28">
<stat name="nickname">S2KingKtulu</stat>
<stat name="acc_games_played">0</stat>
<stat name="acc_wins">0</stat>
<stat name="acc_losses">0</stat>
<stat name="acc_concedes">0</stat>
<stat name="acc_concedevotes">0</stat>
<stat name="acc_buybacks">0</stat>
<stat name="acc_discos">0</stat>
<stat name="acc_kicked">0</stat>
<stat name="acc_pub_skill">1500</stat>
<stat name="acc_pub_count">0</stat>
<stat name="acc_pub_pset">1</stat>
<stat name="acc_avg_score">0.00</stat>
<stat name="acc_herokills">0</stat>
<stat name="acc_herodmg">0</stat>
<stat name="acc_heroexp">0</stat>
<stat name="acc_herokillsgold">0</stat>
<stat name="acc_heroassists">0</stat>
<stat name="acc_deaths">0</stat>
<stat name="acc_goldlost2death">0</stat>
<stat name="acc_secs_dead">0</stat>
<stat name="acc_teamcreepkills">0</stat>
<stat name="acc_teamcreepdmg">0</stat>
<stat name="acc_teamcreepexp">0</stat>
<stat name="acc_teamcreepgold">0</stat>
<stat name="acc_neutralcreepkills">0</stat>
<stat name="acc_neutralcreepdmg">0</stat>
<stat name="acc_neutralcreepexp">0</stat>
<stat name="acc_neutralcreepgold">0</stat>
<stat name="acc_bdmg">0</stat>
<stat name="acc_bdmgexp">0</stat>
<stat name="acc_razed">0</stat>
<stat name="acc_bgold">0</stat>
<stat name="acc_denies">0</stat>
<stat name="acc_exp_denied">0</stat>
<stat name="acc_gold">0</stat>
<stat name="acc_gold_spent">0</stat>
<stat name="acc_exp">0</stat>
<stat name="acc_actions">0</stat>
<stat name="acc_secs">0</stat>
<stat name="acc_consumables">0</stat>
<stat name="acc_wards">0</stat>
<stat name="acc_em_played">0</stat>
<stat name="acc_time_earning_exp">0</stat>
<stat name="AR">0</stat>
<stat name="AREM">0</stat>
<stat name="AP">0</stat>
<stat name="APEM">0</stat>
<stat name="level">1</stat>
<stat name="total_discos">0</stat>
<stat name="total_possible_discos">0</stat>
<stat name="rnk_games_played">0</stat>
<stat name="rnk_wins">0</stat>
<stat name="rnk_losses">0</stat>
<stat name="rnk_concedes">0</stat>
<stat name="rnk_concedevotes">0</stat>
<stat name="rnk_buybacks">0</stat>
<stat name="rnk_discos">0</stat>
<stat name="rnk_kicked">0</stat>
<stat name="rnk_amm_solo_rating">1350.00</stat>
<stat name="rnk_amm_solo_count">0</stat>
<stat name="rnk_amm_solo_conf">0.00</stat>
<stat name="rnk_amm_solo_prov">0</stat>
<stat name="rnk_amm_solo_pset">1</stat>
<stat name="rnk_amm_team_rating">1500.00</stat>
<stat name="rnk_amm_team_count">0</stat>
<stat name="rnk_amm_team_conf">0.00</stat>
<stat name="rnk_amm_team_prov">0</stat>
<stat name="rnk_amm_team_pset">0</stat>
<stat name="rnk_herokills">0</stat>
<stat name="rnk_herodmg">0</stat>
<stat name="rnk_heroexp">0</stat>
<stat name="rnk_herokillsgold">0</stat>
<stat name="rnk_heroassists">0</stat>
<stat name="rnk_deaths">0</stat>
<stat name="rnk_goldlost2death">0</stat>
<stat name="rnk_secs_dead">0</stat>
<stat name="rnk_teamcreepkills">0</stat>
<stat name="rnk_teamcreepdmg">0</stat>
<stat name="rnk_teamcreepexp">0</stat>
<stat name="rnk_teamcreepgold">0</stat>
<stat name="rnk_neutralcreepkills">0</stat>
<stat name="rnk_neutralcreepdmg">0</stat>
<stat name="rnk_neutralcreepexp">0</stat>
<stat name="rnk_neutralcreepgold">0</stat>
<stat name="rnk_bdmg">0</stat>
<stat name="rnk_bdmgexp">0</stat>
<stat name="rnk_razed">0</stat>
<stat name="rnk_bgold">0</stat>
<stat name="rnk_denies">0</stat>
<stat name="rnk_exp_denied">0</stat>
<stat name="rnk_gold">0</stat>
<stat name="rnk_gold_spent">0</stat>
<stat name="rnk_exp">0</stat>
<stat name="rnk_actions">0</stat>
<stat name="rnk_secs">0</stat>
<stat name="rnk_consumables">0</stat>
<stat name="rnk_wards">0</stat>
<stat name="rnk_em_played">0</stat>
<stat name="rnk_level">1</stat>
<stat name="rnk_time_earning_exp">0</stat>
</player_stats>
</stats>
</xmlRequest>

0 Cevap